Wednesday, May 2, 2018

How do I "combine" two hard drives in Ubuntu?


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/.


Answer



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.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...