How to enable detected hotplugged SATA drives

Issues related to hardware problems
Confused
Posts: 13
Joined: 2008/06/18 17:05:33

How to enable detected hotplugged SATA drives

Postby Confused » 2009/02/23 07:52:02

I'm in rescue mode with Centos 5.2 disk trying to install/mount a new disk to extract data out from the failed server.

Plugged in a new SATA drive and syslog shows the drive being detected

SCSI device sdg: blah
sdg: Mode Sense: 00 3a 00 00
.
.
.
sdg: unknown partition table
sd 3:0:0:0: attached scsi disk sdg

However fdisk and mount does not find the drive.
I tried echo "---" /sys/class/scsi_host/host3/scan based on one of the previous threads but get "write error: invalid argument".

Please advise how should I get the drive to be usable?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

How to enable detected hotplugged SATA drives

Postby gerald_clark » 2009/02/23 15:29:37

What does 'fdisk -l' show ?

Confused
Posts: 13
Joined: 2008/06/18 17:05:33

Re: How to enable detected hotplugged SATA drives

Postby Confused » 2009/02/23 18:33:22

gerald_clark wrote:
What does 'fdisk -l' show ?


The rest of the drives that already are there. Not even a mention of say invalid partition on /dev/sdg like it does for my other already plugged in drive with corrupted md/lvm headers.

As far as fdisk/mount is concerned, the new drive just doesn't exist.

BartSimpson
Posts: 23
Joined: 2007/03/03 10:33:34

Re: How to enable detected hotplugged SATA drives

Postby BartSimpson » 2009/02/27 08:12:24

When the disk is run at the same port as the damaged one tell the kernel to reload the partition table.
hdparam -z /dev/xxxxx

rsw686
Posts: 39
Joined: 2008/12/01 01:34:19

Re: How to enable detected hotplugged SATA drives

Postby rsw686 » 2009/02/27 17:57:00

If you know the host adapter number use this command replacing 0 with the host adapter.

Code: Select all

echo "- - -" > /sys/class/scsi_host/host0/scan


Otherwise rescan all the host adapters with this command.

Code: Select all

for f in /sys/class/scsi_host/host*; do echo "- - -" > $f/scan; done

Mic.G.
Posts: 1
Joined: 2017/12/04 11:17:22

Re: How to enable detected hotplugged SATA drives

Postby Mic.G. » 2017/12/04 12:07:19

Although it's old, I put the response for the sake of documentation - for anyone searching it.

The command was right:

Code: Select all

 echo '- - -' > /sys/class/scsi_host/host0/scan


The mistake was that the dashes should be separated by space, like in the line above:

Code: Select all

 - - -

In the command the author tried, there were no spaces in between.