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
Site Admin
Posts: 33202
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.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

anglican
Posts: 38
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