My current system is laid out across two drives:

  1. 40GB for / and /swap (dev/sdb)
  2. 1TB for /home (dev/sdc)

As my /home drive is running out of space, and storage is cheap, I've bought a 2TB drive with the intent of expanding /home across that drive too (so /home is spread over two drives/3TB).

I expected this to happen automagically (though I have no idea why I would expect that, really), the drive is installed (dev/sda), formatted as ext4, but I've no idea where to go next. Is this easy, is there a tool that can do this?

I've read the following questions:

But I can't piece together the advice in such a way that it makes sense to me, or how it enables:

  • Expansion of /home,
  • Auto-mounts the new drive.

I've been using Ubuntu for almost three years, and I still need schoolin'...sigh.

  • I can think of two solutions but I don't have have experience to turn it to into good answers. What I'm thinking of is to either mount the new drive in a directory of /home or to make your 1 TB and 2 TB drive into one logical partition with LVM and mount it in /home. – N.N. Jul 9 '11 at 12:28
  • @N.N.: thanks, if you could expand that into an answer, I'd certainly give it a go. Though, like you, I lack the experience to do so by myself, at least not without fairly explicit guidance. – David says reinstate Monica Jul 9 '11 at 12:37
  • Why does it have to be home? I have /, swap, /home at a total of 50 Gb and added my 2nd and 3rd internal disc under /discworld and /discworld2. – Rinzwind Jul 9 '11 at 13:16
  • @Rinzwind: mainly because on a multiple-user machine (without a hard drive per user) it seems to make more sense to share the potential space via /home, and slightly less trouble (once set up). – David says reinstate Monica Jul 9 '11 at 15:08
  • 1
    I've not had great experiences with LVM. IIRC, if you lose a drive you lose everything. It might be better/easier to just copy the contents of /home to the new drive then mount the new drive in at /home rather than the old partition. – tgm4883 Jul 9 '11 at 19:51

As mentioned in my comment, creating a symlink is probably the easiest way of accomplishing your goal. There is one downside to going this route and I'll explain it at the end.

Here's what you need to do:

  1. Find the mount point of your new 2TB drive. If the drive is currently mounted, you can easily find this information by running the mount command - which will list all currently mounted drives / partitions.
  2. Once you have the mount point, you can create a symlink to that folder in your home directory by running the following command:

    ln -s [MOUNT POINT]  ~/secondary

    This will create a folder in your /home directory named secondary that contains all of the contents of your 2TB drive. Now whenever you want to save something to your 2TB drive, simply save it in the secondary folder.

Now you've probably already spotted the downside to going this method. Although it is simple to set up, it doesn't automatically split content across the drive for you. You'll have to do this yourself. If you wanted to, you could copy all of the contents of a folder in your home directory (like Music or Desktop) to your 2TB drive and then replace 'secondary' with the name of that folder in the command above.

  • Thank you, kindly! Is this really as difficult as it's meant to be ('difficult' defined, here, as having to ask the question in the first place)? Your solution accepted, plus-one-ed, and much, much appreciated. :) – David says reinstate Monica Jul 10 '11 at 21:30
  • @David: Glad I could help! – Nathan Osman Jul 10 '11 at 21:32

Here are two packages that can merge two partitions in a single mountpoint:

unionfs-fuse - Fuse implementation of unionfs
mhddfs - file system for unifying several mount points into one
  • +1 I found mhddfs to be easier and hassle-free than LVM, especially if your existing setup is non-LVM. Thanks for this. – Rey Leonard Amorato Aug 8 '13 at 14:13

Yes you would need to do some hacking with LVM,but I think you would lose your data once you setup as an LVM partition. LVM is great if you use it from the start, but a pain in the but if you change your mind later. I would back up all of your data and reinstall from scratch and setup all of your drives for LVM and then restore the data from before.

  • 2
    Saying, "go google this" it's not an answer, you could at least provide the OP with a link with what you could have found.There's a reason why he asked here instead of just googling. – Uri Herrera Jul 10 '11 at 1:22

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.