Skip to content

Instantly share code, notes, and snippets.

@ismailyenigul
Created April 28, 2021 20:59
Show Gist options
  • Save ismailyenigul/2d481f7a407ca7c84a72f1274a8a1241 to your computer and use it in GitHub Desktop.
Save ismailyenigul/2d481f7a407ca7c84a72f1274a8a1241 to your computer and use it in GitHub Desktop.
Detect Linux new disk on vmware
#if you added new disk
for host in $(ls -1d /sys/class/scsi_host/*); do echo "- - -" > ${host}/scan ; done
#if you resized the existing disk
for device in $(ls -1d /sys/class/scsi_disk/*); do echo "1" > ${device}/device/rescan ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment