5

My old hard drive layout was:

  • 200GB holding /
  • 500GB holding /home/

However, the 200GB drive kicked the bucket this morning, and I have a new 500GB to replace it. I don't need a full 500GB for /, since most of my data is on /home/, but I could do with more space on /home/. Is there any way to transparently combine the disks?

I'm going to put Ubuntu Karmic on the new drive, and don't care what filesystem I use. I'm using reiserFS (I think reiser3, not certain) on /home/.

3 Answers 3

9

LVM is the best way I think, make sure to create a Volume Group (VG) that contains all your Physical Volumes (PV, i.e. your partitions), and then you can divide the VG into several Logical Volumes (LV) for your need.

LVM is not easy to grasp at first, and an image might help :

LVM Schema

I've also seen mdadm used together with LVM. mdadm provides a software RAID system to gather the various drives. If it's to make a RAID0 system (striped disks), it might not be worth it, but it gets interesting if you want to have a RAID1 (mirror) with your two drives, and still use LVM on top of it.

2
  • Great description. I went with LVM and its exactly what I need. Its not hugely hard to deal with or grasp, but I've been partitioning my drives weirdly for about 10 years, so YMMV. Dec 20, 2009 at 1:34
  • +1 for MANY reasons. To state a few: he explains in the first sentence what is LVM and the 3 key parts to LVM which are the VC, PV, LV. Then he goes further and shows how they are all used with a diagram. Sep 13, 2011 at 16:49
3

You'll either need to do a RAID, which will mean you'll have to backup everything and start again

Or use a program called Linux Volume Management

With logical volume management, the whole disk would be allocated to a single volume group and logical volumes created to hold the / /usr and /home file systems. If, for example the /home logical volume later filled up but there was still space available on /usr then it would be possible to shrink /usr by a few megabytes and reallocate that space to /home.

1
2

As an alternative, there's a bunch of filesystems that can "merge" two filesystems into one tree. Most notable one is UnionFS, but there's also Aufs and mhddfs, last one supports some extensive features as route writing to the volume with most free space on it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .