Making a second HD transparent to the user

The time is coming when I will have to increase my hard drive storage. I could backup, replace the current drive with something larger, and then copy the backup to the new, larger drive. Or I could add a second SATA drive. Is it possible to configure that second drive so that it seamlessly appears as an increase of size of the first drive? Peter -- Peter Hiscocks Syscomp Electronic Design Limited, Toronto http://www.syscompdesign.com USB Oscilloscope and Waveform Generator 647-839-0325

On 9 April 2016 at 11:51, <phiscock@ee.ryerson.ca> wrote:
The time is coming when I will have to increase my hard drive storage. I could backup, replace the current drive with something larger, and then copy the backup to the new, larger drive.
Or I could add a second SATA drive. Is it possible to configure that second drive so that it seamlessly appears as an increase of size of the first drive?
If you were using a filesystem that supports multiple partitions, then sure, you could do that. I remember that being a big deal with Digital AdvFS, a long time ago, on architectures now far, far away... <https://en.wikipedia.org/wiki/AdvFS> Filesystems you could actually choose that support adding multiple block devices to a filesystem include BTRFS (I have used the facility) and probably ZFS. Unfortunately, if you make your filesystem dependent on multiple drives all functioning properly, you have accepted a pretty big dollop of risk, so I'd be inclined, myself, to copy material over to the new, larger drive. (The problem is, and I did run into this, that if ANY drive fails, there's a fair chance you wind up losing the entirety of the filesystem.) But if your appetite for risk is higher, that may be acceptable. (I accepted the risk, at the time.) -- When confronted by a difficult problem, solve it by reducing it to the question, "How would the Lone Ranger handle this?"

Sort of... - You don't have to copy the whole root filesystem over. You can mount the new drive as /home or /home/user only, and then copy over only that directory. - Or, if you're using mdraid or btrfs, then you can add the new drive using 'mdadm' or 'btrfs'. -- William On Sat, Apr 09, 2016 at 11:51:58AM -0400, phiscock@ee.ryerson.ca wrote:
The time is coming when I will have to increase my hard drive storage. I could backup, replace the current drive with something larger, and then copy the backup to the new, larger drive.
Or I could add a second SATA drive. Is it possible to configure that second drive so that it seamlessly appears as an increase of size of the first drive?
Peter

On 04/09/2016 11:51 AM, phiscock@ee.ryerson.ca wrote:
The time is coming when I will have to increase my hard drive storage. I could backup, replace the current drive with something larger, and then copy the backup to the new, larger drive.
Or I could add a second SATA drive. Is it possible to configure that second drive so that it seamlessly appears as an increase of size of the first drive?
Peter
Yes. What you can do is move the contents of a directory, such as /home to the new drive and then mount it on /home as is normally done with mounting partitions.

You didn't mention any particulars, so this may or may not be helpful. Many distributions default to creating partitions using lvs. If the "df" command shows you devices with names like /dev/mapper/VolGroup00-LogVol00 they are using lvs. With lvs, you can dynamically expand a partition. If it looks like your machine is using lvs, check the output of the pvs, vgs, and lvs commands. If you are using lvs, and add a new disk to the system (likely /dev/sdb), then something like this (modified to suit your system): pvcreate /dev/sdb vgextend VolGroup00 /dev/sdb lvextend --size=+50G /dev/mapper/VolGroup00-LogVol00 and depending on your filesystem, something like resize2fs /dev/mapper/VolGroup00-LogVol00 or xfs_growfs / But - with the low price of disks these days, if you have room for two disks, it's often best to get two larger disks and mirror them. Hope that helps - cheers John On Sat, 2016/04/09 11:51:58AM -0400, phiscock@ee.ryerson.ca <phiscock@ee.ryerson.ca> wrote: | The time is coming when I will have to increase my hard drive storage. I | could backup, replace the current drive with something larger, and then | copy the backup to the new, larger drive. | | Or I could add a second SATA drive. Is it possible to configure that | second drive so that it seamlessly appears as an increase of size of the | first drive? | | Peter | | | -- | Peter Hiscocks | Syscomp Electronic Design Limited, Toronto | http://www.syscompdesign.com | USB Oscilloscope and Waveform Generator | 647-839-0325 | | --- | Talk Mailing List | talk@gtalug.org | https://gtalug.org/mailman/listinfo/talk

On Sat, Apr 09, 2016 at 11:51:58AM -0400, phiscock@ee.ryerson.ca wrote:
The time is coming when I will have to increase my hard drive storage. I could backup, replace the current drive with something larger, and then copy the backup to the new, larger drive.
Or I could add a second SATA drive. Is it possible to configure that second drive so that it seamlessly appears as an increase of size of the first drive?
If your original install uses LVM (which certainly some distributions have done for a while), then extending the LVM is simple. Otherwise, things are more complicated. -- Len Sorensen
participants (6)
-
Christopher Browne
-
James Knott
-
John Sellens
-
Lennart Sorensen
-
phiscock@ee.ryerson.ca
-
William Park