Topic: Raid 1 shrink home size and grow root
Hello,
When I set up this server I made the mistake of only having 35 GB for root. Now I want to increase it to 100 GB and reduce home by 65 GB. Since I have never modified partitions on a server with data, I would like some advice before I proceed.
I used fsarchiver on a live disk to make a copy of root and a copy of home and those are on a different drive SDc.
When you launch gparted from the live CD, it shows the MDs and the SDs although the MD numbers are different than using gparted when you just let the system boot.
(1) The first thing I wanted to try is to reduce the home MD by 65 GB but leave the partition alone.
(2) Then reboot the computer and see what the MD home looks like in gparted. I believe it will show that it is smaller than the physical SD partitions. (wasted space at the end of the MD partition).
(3) If step 2 works as I expected then I plan on reducing both SDa2 and SDb2 to the size of the home MD.
(4) Reboot the computer and gparted should show some unused space between home and root.
(5) Then increase the size of both SDa3 and SDb3 by moving the start to the beginning of the unallocated space.
(6) Then try to reboot and hopefully it will start up and gparted will show that the root MD does not fill all of the SDs size (wasted space at the end of the SDa3 and SDb3.
(7) Then use gparted to increase the size of MD root to fill the SD3 partions.
(8) Reboot and see if everything is working
Is it that simple of do I need to do something else to shrink and grow the MDs and change the physical partition sizes?
I added the File system names
# parted --list
Model: ATA WDC WD30EZRZ-22Z (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: pmbr_boot
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 2960GB 2960GB home raid
3 2960GB 2998GB 37.6GB root raid
4 2998GB 2999GB 1074MB boot raid
5 2999GB 3001GB 2003MB swap raid
Model: ATA WDC WD30EZRZ-22Z (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: pmbr_boot
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB grub bios_grub
2 2097kB 2960GB 2960GB home raid
3 2960GB 2998GB 37.6GB root raid
4 2998GB 2999GB 1074MB boot raid
5 2999GB 3001GB 2003MB swap raid
Model: ATA ST3750640AS (scsi)
Disk /dev/sdc: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 750GB 750GB primary ext4
Model: Linux Software RAID Array (md)
Disk /dev/md127: 37.5GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 37.5GB 37.5GB ext4
Model: Linux Software RAID Array (md)
Disk /dev/md125: 2001MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 2001MB 2001MB linux-swap(v1)
Model: Linux Software RAID Array (md)
Disk /dev/md126: 1072MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 1072MB 1072MB ext4
Model: Linux Software RAID Array (md)
Disk /dev/md124: 2960GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 2960GB 2960GB ext4
Thanks for taking a look at my question,
Craig