Skip to content

Instantly share code, notes, and snippets.

@BigAl
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BigAl/0cb50529f7765c776964 to your computer and use it in GitHub Desktop.
Save BigAl/0cb50529f7765c776964 to your computer and use it in GitHub Desktop.
RHEL/CentOS Rescan as resized VMware disk
After reszing /dev/sdc on vmware
ls -alrt /dev/disk/by-path/
total 0
drwxr-xr-x. 2 root root 200 May 20 12:12 .
lrwxrwxrwx. 1 root root 9 May 20 12:12 pci-0000:00:07.1-scsi-1:0:0:0 -> ../../sr0
lrwxrwxrwx. 1 root root 9 May 20 12:12 pci-0000:1b:00.0-scsi-0:0:0:0 -> ../../sdd
lrwxrwxrwx. 1 root root 9 May 20 12:12 pci-0000:04:00.0-scsi-0:0:0:0 -> ../../sdb
lrwxrwxrwx. 1 root root 9 May 20 12:12 pci-0000:03:00.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx. 1 root root 10 May 20 12:12 pci-0000:03:00.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 May 20 12:12 pci-0000:03:00.0-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx. 1 root root 10 May 20 12:12 pci-0000:03:00.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 9 Jun 17 10:23 pci-0000:13:00.0-scsi-0:0:0:0 -> ../../sdc
cd /sys/class/scsi_disk
ls -al
total 0
drwxr-xr-x. 2 root root 0 Jun 17 10:17 .
drwxr-xr-x. 43 root root 0 Jun 17 09:49 ..
lrwxrwxrwx. 1 root root 0 Jun 17 10:20 2:0:0:0 -> ../../devices/pci0000:00/0000:00:15.0/0000:03:00.0/host2/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0
lrwxrwxrwx. 1 root root 0 Jun 17 10:20 3:0:0:0 -> ../../devices/pci0000:00/0000:00:15.1/0000:04:00.0/host3/target3:0:0/3:0:0:0/scsi_disk/3:0:0:0
lrwxrwxrwx. 1 root root 0 Jun 17 10:20 4:0:0:0 -> ../../devices/pci0000:00/0000:00:17.0/0000:13:00.0/host4/target4:0:0/4:0:0:0/scsi_disk/4:0:0:0
lrwxrwxrwx. 1 root root 0 Jun 17 10:20 5:0:0:0 -> ../../devices/pci0000:00/0000:00:18.0/0000:1b:00.0/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0
echo '1' > 4\:0\:0\:0/device/rescan
sudo fdisk -l | grep Disk | grep sd
Disk /dev/sda: 59.1 GB, 59055800320 bytes
Disk /dev/sdb: 75.2 GB, 75161927680 bytes
Disk /dev/sdd: 128.8 GB, 128849018880 bytes
Disk /dev/sdc: 34.4 GB, 34359738368 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment