Easy way to increase partition size on RAID-1 pair?

68 views
Skip to first unread message

Vince Averello

unread,
Jun 27, 2020, 5:10:16 PM6/27/20
to Alt-F
Currently I'm running Alt-F on a DNS-321 with a pair of mirrored 2TB WD drives. I want to replace the 2TB drives with 3TB drives. Is there any easy way to do this without loss of data? I'm currently copying the data off the drives anyway but I'd love to do it loss-free.

Thanks

João Cardoso

unread,
Jun 28, 2020, 1:18:45 PM6/28/20
to Alt-F


On Saturday, 27 June 2020 22:10:16 UTC+1, Vince Averello wrote:
Currently I'm running Alt-F on a DNS-321 with a pair of mirrored 2TB WD drives. I want to replace the 2TB drives with 3TB drives. Is there any easy way to do this without loss of data? I'm currently copying the data off the drives anyway but I'd love to do it loss-free.

Are there any restrictions?

-The faster way is to use a linux desktop PC, attach one of the 2TB disks on a degraded RAID1, attach one of the new 3TB disks on a degraded RAID1, copy the data, plug both 3TB on the box, and after a few more ops you will have your data available.
There are yet a couple of details to follow, such as how and where to create the degraded 3TB RAID (tip: on the box, not on the PC, because otherwise a 64bit filesystem would certainly be created, not compatible with the fsck program on the box). Or do the RAID rsync on both 3TB disks the PC, which is also faster

-doing it in the box is essentially identical to the above, but the copy and rsync operation will take some 10x more time:
1-power off, unplug one of the 2TB disks, and save it in a drawer-- its your backup. No setup is needed before power-off.
2-plug one of the 3TB disks in the empty slot, with one other 2TB disk on the other slot, and power up. You will have you data available on a degraded RAID1 on the 2TB disk, let's call it md0
3-use the Disk Wizard to create a degraded RAID1 on the new 3TB disk -- be certain to select only one disk, the 3TB one; you will now have 2 degraded RAID1, the 2TB md0 and the new empty 3TB md1
4-copy all you data from the md0 to md1(*)
5-power off, unplug the 2TB and plug-in the second 3TB, power up
6-copy the 1st 3TB disks partition table (it might be sda or sdb, look at md0 component name in Disk RAID) to the just plugged-in 2nd 3TB partition table. using the upper section of the Disk Partitioner
7-In Disk RAID add the 2nd 3TB disk larger partition (if the existing RAID1 component is called sda2, the to-add partition will be called sdb2 and vice-versa) to the existing RAID and let it sync.

(*)-copying data from md0 to md1 is the mos challenging task:
-using 'cp -a /mnt/md0/* /mnt/md1' from the cmd line is the fastest way, but it totally lacks *any* progress indication.
-using Setup Folders you can browse to /mnt/md0 and select Copy Contents, then browse to /mnt/md1 and select Paste, but it was not designed for such huge amounts of data and will be very slow or even hang, I don't advise using it.
-using 'rsync' from the command line is slower then using 'cp', but provides global or file-level progress indicator; you probably want a global progress indication, so I would use 'rsync -a --info=progress2 /mnt/md0/ /mnt/md1'
 
Don't touch the 2TB backup disk on the drawer until everything is really finished, including the RAID resync.

Can you write a more detailed wiki page on this?


Thanks
Reply all
Reply to author
Forward
0 new messages