Page 1 of 1

Echo command is not working for New HDD discover without reboot server

Posted: 2019/06/28 22:39:00
by Linux@admin
Echo command is not working for New HDD discover without reboot server

Hello Friends,
I am trying
echo "- - -" /sys/class/scsi_host/host0/scan
echo "- - -" /sys/class/scsi_host/host1/scan
echo "- - -" /sys/class/scsi_host/host2/scan

for discovering newly added HDD in VM. i'm getting below error after this command.

bash: echo: write error: Invalid argument

please help, server is in running environment.

Re: Echo command is not working for New HDD discover without reboot server

Posted: 2019/06/28 23:54:52
by TrevorH
What sort of host is it running on?

Are you sure you need to do this - check the output of `dmesg` to see if it was already detected.

Re: Echo command is not working for New HDD discover without reboot server

Posted: 2019/07/01 10:51:39
by anglican
I think you're missing the ">" in those commands:

Code: Select all

echo "- - -" /sys/class/scsi_host/host0/scan 
echo "- - -" /sys/class/scsi_host/host1/scan 
echo "- - -" /sys/class/scsi_host/host2/scan 
should be:

Code: Select all

echo "- - -" > /sys/class/scsi_host/host0/scan 
echo "- - -" > /sys/class/scsi_host/host1/scan 
echo "- - -" > /sys/class/scsi_host/host2/scan 
H