Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Monday, January 4, 2016

Linux Commands to scan/rescan Virtual Disk - Linux

Linux Commands to scan/rescan Virtual Disks:

1. If a new disk is added to VM:

#cd /sys/class/scsi_host/

# ls –lrt  It will show host0, host1….

#echo "- - -" > /sys/class/scsi_host/host[0-1-2]/scan


2. To rescan existing disk. If a existing disk is extended by VMWare team. Then rescan the same disk so the extended size of pv will reflect.

Note down the path [2:0:4:0] or disk name [/dev/sde] which is extended by VMWare team.

#echo 1 > /sys/class/scsi_device/*/device/rescan

# echo 1 > /sys/class/scsi_device/2:0:4:0/device/rescan --> fdisk -l will show new size of that lun

or go to #cd /sys/class/scsi_device/2:0:4:0/device/
#echo 1 > rescan

then

#pvresize [particular PV]

#pvresize /dev/sde --> #pvs command will show extended size of that PV

No comments:

Post a Comment