Last active
September 28, 2017 19:40
-
-
Save DavidPesticcio/e38a25dc8f45ef7866f3d04f9b91e499 to your computer and use it in GitHub Desktop.
Linux: scan and activate new drives
This file contains hidden or 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
#!/bin/bash | |
echo "Before scan:" | |
dmesg | awk '/scsi/ && /Direct-Access/' | |
for i in $(ls -d /sys/class/scsi_host/*); do echo "- - -" > $i/scan; done | |
echo "After scan:" | |
dmesg | awk '/scsi/ && /Direct-Access/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment