There are basically four ways to use two physical disks in Ubuntu, but only one of them is likely to be easy to set up, given your likely current configuration. (I'd need to see the output of df
or sudo parted -l
to be sure, though.) The methods are:
- Mount multiple filesystems -- This is the method that's likely to be easiest for you to set up. Basically, you create a new partition in the freed space and mount it somewhere convenient (say,
/home/{yourusername}/morespace
). You'd normally create an entry in /etc/fstab
to mount the new partition somewhere convenient, as described here. Although this method is easy to set up, it's likely to be awkward, since the partition sizes might not match what you need, and you'll have to access the new space via whatever mount point you decide to use.
- Use a filesystem with spanning features -- Some filesystems, such as Btrfs, provide spanning features -- that is, one filesystem can span multiple devices (disks). If you're already using such a filesystem, you can probably reconfigure it to expand across the new volume, although I'm not 100% positive that's possible. See the Btrfs wiki for more on this approach generically. If you're not already using Btrfs, converting to use it will require awkward backup-and-restore operations, or moving your installation to Btrfs on the freed disk and then expanding over to the one you're using now.
- Use RAID -- In a Redundant Array of Independent Disks (RAID) setup, multiple disks are combined together to act like one. Disks can be combined to improve reliability, speed of access, or both. Unless you're already using RAID, though, converting to a RAID setup is likely to be awkward. Note also that there are two types of software RAID and hardware RAID. (Unless you're using a server, you'd probably need to buy a special controller card to use hardware RAID.) See here for information on one of the software RAID types.
- Use LVM -- Logical Volume Management (LVM) is another way to combine devices. In LVM, one or more partitions (aka physical volumes) are combined together into one volume group, which is then re-allocated into logical volumes. You store most filesystems on logical volumes, rather than directly on partitions. The advantage is that this gives you greater flexibility to adjusting logical volumes than a traditional partitioning scheme provides. Among other things, you can add new physical volumes and expand logical volumes to fill the new space quite easily -- which of course is exactly what you want to do. Unfortunately, unless you're already using LVM, converting to such a setup is likely to be awkward, requiring backup/restore or installation-moving operations similar to what would be required when converting to Btrfs or RAID. See the Ubuntu wiki page on LVM for an introduction to LVM. There is a tool, called blocks, that's supposed to convert to LVM in place, but I've never used it, and AFAIK it doesn't come with Ubuntu.
A default Ubuntu installation uses ext4fs (which does not support spanning) on a plain partition configuration (that is, no RAID or LVM, unless your computer uses hardware RAID). Thus, chances are only the first of these options will be easy to implement for you; however, I can't be positive of that. If you used an advanced installation option, it might have used software RAID or (more likely) LVM, in which case expanding onto the freed space on your second disk may be relatively easy.
If you're got a default straight partition setup but want more flexibility, my suggestion would be to migrate to LVM. You could either re-install entirely or migrate your existing setup. I tried Googling but I didn't find a good step-by-step procedure for doing such a conversion. (I found a couple that were rather vague on some critical details.) It's certainly possible -- I've done it -- but it is awkward and requires either expertise or good instructions. Overall, backing up your user data and re-installing may be the best way to accomplish the goal. Fortunately, with extra space at hand, the backup part might be easy -- you could create an LVM with a new logical volume for /home
in the newly-freed space, copy your existing /home
there, and then re-install, telling the installer to use the new /home
logical volume, then tweak logical volume sizes as desired.