1

I have a question. I'm trying to increase the disk partition to more than 50G, which I recall was the default given by CentOS7 during installation. I'm wondering how to go about doing so, since I have this as a raid0 setup. And I obviously don't want to wipe and re-install everything.

Below is the lsblk output of this workstation, I'm interested in increasing /dev/md126p4 to perhaps 100G (or greater) to ensure plenty of space is left for future application installations. Thanks!

NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda           8:0    0  10.9T  0 disk  
├─sda1        8:1    0     2T  0 part  
└─md0         9:0    0  10.9T  0 raid1 /mnt/data
sdb           8:16   0  10.9T  0 disk  
└─md0         9:0    0  10.9T  0 raid1 /mnt/data
sdc           8:32   0  10.9T  0 disk  
└─md1         9:1    0  10.9T  0 raid1 /mnt/data1
sdd           8:48   0  10.9T  0 disk  
└─md1         9:1    0  10.9T  0 raid1 /mnt/data1
sde           8:64   0 465.8G  0 disk  
└─md126       9:126  0   1.8T  0 raid0 
├─md126p1 259:0    0   200M  0 md    /boot/efi
├─md126p2 259:1    0     1G  0 md    /boot
├─md126p3 259:2    0     4G  0 md    [SWAP]
├─md126p4 259:3    0    50G  0 md    /
└─md126p5 259:4    0   1.8T  0 md    /home
sdf           8:80   0 465.8G  0 disk  
└─md126       9:126  0   1.8T  0 raid0 
├─md126p1 259:0    0   200M  0 md    /boot/efi
├─md126p2 259:1    0     1G  0 md    /boot
├─md126p3 259:2    0     4G  0 md    [SWAP]
├─md126p4 259:3    0    50G  0 md    /
└─md126p5 259:4    0   1.8T  0 md    /home
sdg           8:96   0 465.8G  0 disk  
└─md126       9:126  0   1.8T  0 raid0 
├─md126p1 259:0    0   200M  0 md    /boot/efi
├─md126p2 259:1    0     1G  0 md    /boot
├─md126p3 259:2    0     4G  0 md    [SWAP]
├─md126p4 259:3    0    50G  0 md    /
└─md126p5 259:4    0   1.8T  0 md    /home
sdh           8:112  0 465.8G  0 disk  
└─md126       9:126  0   1.8T  0 raid0 
├─md126p1 259:0    0   200M  0 md    /boot/efi
├─md126p2 259:1    0     1G  0 md    /boot
├─md126p3 259:2    0     4G  0 md    [SWAP]
├─md126p4 259:3    0    50G  0 md    /
└─md126p5 259:4    0   1.8T  0 md    /home
sr0          11:0    1  1024M  0 rom   
Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
Ming Lee
  • 11
  • 1
  • Possible duplicate https://serverfault.com/questions/320310/how-to-resize-raid1-array-with-mdadm , op can also check https://sergtech.com.au/2020/05/13/mdadm-mdraid-raid10-grow-resize-reshape/ – akostadinov Oct 16 '20 at 10:17
  • Thanks for the suggestions, I checked out both links but one issue is that using the command mdadm --grow /dev/md126 --size=max, I get the following errors: mdadm: not enough devices with space to create array. mdadm: Error. Cannot find maximum available space. Seems to be because I created this partition first, thus this approach isn't ideal. I don't really want to re-install everything (although that may be an option of last resort), so currently I'm still stuck. – Ming Lee Oct 17 '20 at 06:12
  • If ti is first partition, you perhaps can reduce other partitions, then move them, then extend this one. I have little experience with mdraid from a very long time ago. It sounds so complicated that it might be better to rebuild it. I usually use LVM because it allows for adding space to partition from other parts of the disk. – akostadinov Oct 17 '20 at 14:10

0 Answers0