Server lvm raid 1 extention with unallocated space


(segma1900) #1

NethServer Version: 7.4.1708

i notice that i did big mistake in assigning spaces to the lvm raid 1 configuration on my server
i have two 2x2TB hard drive raid1(2 TB) under LVM

— Logical volume —
LV Path /dev/centos/swap00
LV Name swap00
VG Name centos
LV UUID 3oXeNS-L2Zf-1STZ-rCWF-w0Lw-xZ6C-godhjF
LV Write Access read/write
LV Creation host, time localhost, 2018-04-25 11:49:25 +0300
LV Status available

open 2

LV Size <7.88 GiB
Current LE 2016
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:1

— Logical volume —
LV Path /dev/centos/root00
LV Name root00
VG Name centos
LV UUID 8SYZli-lX0R-oVCv-FAob-eI05-hFMT-GhOTZR
LV Write Access read/write
LV Creation host, time localhost, 2018-04-25 11:49:26 +0300
LV Status available

open 1

LV Size 186.26 GiB
Current LE 47683
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:0

and i have 2x3TB hard drive raid 1(3 TB)

— Logical volume —
LV Path /dev/cloud/home00
LV Name home00
VG Name cloud
LV UUID yuJ9EY-JmY5-dP9O-ddhv-RLhx-jW7E-IIZ5ys
LV Write Access read/write
LV Creation host, time localhost, 2018-04-25 11:49:36 +0300
LV Status available

open 1

LV Size 279.39 GiB
Current LE 71525
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 256
    Block device 253:2

as noticable i didnt assign the full capacity of the disk so can i extend the lvm and raid volumes to the full capacity??? should i create new partiions and add them to the lvm vloume and then resize raid to full size?? or how? thx in advance

here is the lsblk output

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 194.3G 0 part
└─md127 9:127 0 194.2G 0 raid1
├─centos-root00 253:0 0 186.3G 0 lvm /
└─centos-swap00 253:1 0 7.9G 0 lvm [SWAP]
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 194.3G 0 part
└─md127 9:127 0 194.2G 0 raid1
├─centos-root00 253:0 0 186.3G 0 lvm /
└─centos-swap00 253:1 0 7.9G 0 lvm [SWAP]
sdc 8:32 0 2.7T 0 disk
└─sdc1 8:33 0 279.5G 0 part
└─md126 9:126 0 279.4G 0 raid1
└─cloud-home00 253:2 0 279.4G 0 lvm /home
sdd 8:48 0 2.7T 0 disk
└─sdd1 8:49 0 279.5G 0 part
└─md126 9:126 0 279.4G 0 raid1
└─cloud-home00 253:2 0 279.4G 0 lvm /home
sr0 11:0 1 1024M 0 rom


(segma1900) #2

i just want to be safe in doing this i think if i follow the guide in this site Expanding existing partitions part
https://raid.wiki.kernel.org/index.php/Growing
it will serve my need am i right?


(Markus Neuberger) #3

Yes but having a backup is always good in such cases.


(segma1900) #4

thx yes the process ended successfully with no issues

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 1.8T 0 part
└─md127 9:127 0 1.8T 0 raid1
├─centos-root00 253:0 0 1.8T 0 lvm /
└─centos-swap00 253:1 0 7.9G 0 lvm [SWAP]
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part
└─md127 9:127 0 1.8T 0 raid1
├─centos-root00 253:0 0 1.8T 0 lvm /
└─centos-swap00 253:1 0 7.9G 0 lvm [SWAP]
sdc 8:32 0 2.7T 0 disk
└─sdc1 8:33 0 2.7T 0 part
└─md126 9:126 0 2.7T 0 raid1
└─cloud-home00 253:2 0 2.7T 0 lvm /home
sdd 8:48 0 2.7T 0 disk
└─sdd1 8:49 0 2.7T 0 part
└─md126 9:126 0 2.7T 0 raid1
└─cloud-home00 253:2 0 2.7T 0 lvm /home
sr0 11:0 1 1024M 0 rom