I recently purchased Lenovo Thinkpad P50 (i am not sure whether Ubuntu has all the drivers for this Laptop).

But what i waned to do is i have installed 2 additional m.2 500gb SSD's. So now it has 1 500gb SATA hdd + 2 m.2 500gb SSDs (Total 3 hard drives) So now how to partition amongs't all these drives & utilize all the space.

Lets say :

 -- sda1 - 250gb for root partition  - /
 -- sda2 - 512mb for boot partition  - /boot
 -- sda3 - Freespace (or /home)      - /home

sdb (SATA hdd)
 -- Freespace (500gb)

sdc (another m.2 ssd)
 -- Freespace (500gb)

Now my question is as the other 2 drives are totally free how can i utilize or lets say merge the other 500gb SSD (sdc) with the one created on sda Because it only allows us to create 1 /home partition or mount point.

And how can i utilize the space on my SATA hdd by lets say creating a partition for softwares, videos, pictures ..etc .

  • The root partition is not /root - it's /. /root is root's home folder, and usually contains almost nothing, as root is not really used on ubuntu (or other modern linux distros). – vidarlo Feb 12 '17 at 18:08
  • Ya .. just to explain..m editing it.. – Aijaz Feb 12 '17 at 18:33
  • You make one or more partitions on the supplementary drives, make filesystems on those partitions, and mount them somewhere. For example, on my home server I have two external drives which are mounted on /srv/media/data and /srv/media/public. – AlexP Feb 12 '17 at 18:36
  • 1
    I do not suggest separate /boot partition, and /home is optional if large / or most data in separate data partition(s). If UEFI system you also need ESP - efi system partition and must use gpt partitioning. But I mount other data partition(s) in fstab and link folders back into /home. I used to use NTFS like this, but now without Windows use ext4. But with ext4 you have to also set ownership & permissions. askubuntu.com/questions/524943/… – oldfred Feb 12 '17 at 18:49
  • If your question is: can I expand the /home located on /dev/sda with space from /dev/sdb and/or /dev/sdc... one answer might be to use LVM, and make all three disks look like one to the system, and then have logical partitions however you wish (even overlapping over physical drives). Another way to do it is to relocate /home to sdb or sdc. Many choices... it all depends on what your master plan is for this machine. – heynnema Feb 12 '17 at 23:25

There are several ways to do what you want:

  • Separate mount points -- You can create whatever partition(s) you want on each disk and mount them wherever it's convenient. Given your disks' sizes (500 GB apiece), chances are you'll be using most of all of them for user files, so you'd probably mount most of this space somewhere within your home directory -- say, /home/aijaz/ssd1 and /home/aijaz/ssd2. This gives you explicit control over where any given file goes, which might be helpful if you want to take advantage of SSD speeds for some files but not others, or if one or more disk is removable and you plan to periodically remove it to transport big files elsewhere.
  • LVM -- In Logical Volume Management (LVM), disks or partitions (logical volumes in LVM-speak) can be combined into a volume group and then split up into logical volumes. The point of this is that the logical volumes can be any size you want -- smaller or bigger than the physical volumes. In your case, you could put most of your disk space into a volume group and then create one big storage area that spans most of your available disk space, giving you a 1000 GB (or larger) filesystem that you might mount at /home.
  • RAID -- You could set up a software RAID 0 array across your two SSDs, or potentially even across both SSDs and your hard disk, to achieve effects similar to LVM. LVM is more flexible for your use case, but RAID is, in some ways, simpler. (RAID levels above RAID 0 can be used to improve reliability, which LVM can't do.)
  • Spanning Btrfs -- The (relatively) new filesystem Btrfs provides disk-spanning features similar to those in LVM or RAID 0; you can use it to make one filesystem that covers multiple devices.

Any of the last three options has the drawback that they make your filesystem more vulnerable to disk failures -- if one disk physically fails, you're likely to lose access even to files stored on the good disk(s), and recovery becomes more complex. OTOH, the flexibility of these approaches can be significant, and there can be performance benefits because access can span multiple disks, rather than be limited by the performance features of just one disk. (I'm not sure if this performance benefit would be significant for SSDs, though. It's certainly an issue for hard disks.) If you were to span your SSDs and your HDD, you'd likely get either variable speed or speeds between those of the SSDs and your HDD, depending on how you set it up.

One important question, and perhaps complication, is how the performance of the HDD vs. your SSDs interact. If you put the main OS installation on the HDD, as specified in your question, chances are its performance will suffer compared to what it might be if it were on the SSD. Personally, I'd probably create an LVM setup that spans at least most of both SSDs, and maybe all three disks, put the root (/) filesystem inside the LVM as a logical volume, and create a /home logical volume that spans most of the rest of the SSD space. I'd then treat the HDD as slower storage for rarely-accessed files, or those that don't need great speed -- essentially, combining the "separate mount points" and "LVM" configurations. OTOH, you might have need of super-speedy access to user files, in which case doing it as you outlined above (with the OS on the HDD) might make more sense. If you don't care much about speed, and want a simple directory layout, putting (almost) everything in one LVM volume group and letting the access speed vary might make sense.

Note that with the LVM and RAID setups, having a separate /boot partition makes sense, because this puts the kernel and related files outside of the LVM/RAID configuration. Although GRUB 2 can read Linux LVM and RAID setups, this feature is relatively new, and not all boot loaders can handle this trick, so if you don't have a non-LVM/non-RAID /boot partition, you'll be limiting your choice of boot loaders. Also, most new computers boot natively in EFI mode, which requires a separate EFI System Partition (ESP), which must be outside of LVM and (Linux software) RAID.

One final note: 250 GB for the root (/) filesystem is almost certainly excessive. Most installations only need 10 GB or so for the basic installation, although you could go to 30-50 GB if you want to have lots of space for expansion. If you need more than that amount of space outside of /home, you might want to consider splitting something else off. For instance, a server computer might need lots of space in /var or some other location where the server stores files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.