Created
April 28, 2021 20:59
-
-
Save ismailyenigul/2d481f7a407ca7c84a72f1274a8a1241 to your computer and use it in GitHub Desktop.
Detect Linux new disk on vmware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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