Gibbserv.net

Icon

A slow updating blog I write for no particular reason.

Online resize of Raid 6 post reshape

Previously I described the process I followed to move my Raid 5 to a newer version of CentOS as well as a newer version of MDADM. I outlined how I recovered the raid and LVM sitting on top of it and showed how to convert it to a raid 6. Now I am going to lay out the steps I took to grow the Logical Volume and resize the filesystem once the raid had completed the reshape process.

I started by resizing the physical volume:
# pvresize /dev/md127
Physical volume "/dev/md127" changed
1 physical volume(s) resized / 0 physical volume(s) not resized

I then verified that I could see Free Extents:
# pvdisplay
--- Physical volume ---
PV Name /dev/md127
VG Name lvm_data
PV Size 4.55 TiB / not usable 3.44 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1192333
Free PE 238466
Allocated PE 953867
PV UUID VT8iLZ-3J04-mT0Z-S2dd-1lxS-vl5X-rcMlLo

I extended the logical volume (the following command will extend using all free extents available):
# lvextend -l +100%FREE /dev/lvm_data/lv_data
Extending logical volume lv_data to 4.55 TiB
Logical volume lv_data successfully resized

Then I initiated the resize of the filesystem:
]# resize2fs /dev/lvm_data/lv_data
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/lvm_data/lv_data is mounted on /mnt/nas; on-line resizing req uired
old desc_blocks = 233, new_desc_blocks = 292

Performing an on-line resize of /dev/lvm_data/lv_data to 1220948992 (4k) blocks.
The filesystem on /dev/lvm_data/lv_data is now 1220948992 blocks long.

Category: CentOS, Linux, Servers

Tagged: , , ,

Leave a Reply

You must be logged in to post a comment.