Gibbserv.net

Icon

A slow updating blog I write for no particular reason.

Discovering New Disks Without Rebooting

This is going to be a quick post. If you just added a disk to an online Linux node and you don’t have the luxury of rebooting so the system and discover the new disk you can simply run the following:

echo "- - -" > /sys/class/scsi_host/host#/scan

Replace host# with what appears in /sys/class/scsi_host/. Kicking off an fdisk -l will show your new unformatted disk.

I tend to use this when I need to grow an partition created under a logical volume on a Linux VM.

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

Read the rest of this entry »