Sunday, May 22, 2011

linux discover and add new disk without reboot dynamically

To Discover and add new disk to a linux machine without having to reboot the server (e.g when virtual disk is added to a machine online) do the below:

ls /sys/class/scsi_host

#output is host0
#new rescan the scsi bus
echo "- - -" > /sys/class/scsi_host/host0/scan

#now you can see the new disk
fdisk -l

# add the new disk to the lvm if you want

No comments: