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

Issues related to hardware problems
Post Reply
Linux@admin
Posts: 1
Joined: 2019/06/28 22:03:37

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

Post by Linux@admin » 2019/06/28 22:39:00

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.

User avatar
TrevorH
Forum Moderator
Posts: 27127
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2019/06/28 23:54:52

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

anglican
Posts: 31
Joined: 2015/06/11 08:30:33

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

Post by anglican » 2019/07/01 10:51:39

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

Post Reply

Return to “CentOS 6 - Hardware Support”