Page 1 of 1

How to enable detected hotplugged SATA drives

Posted: 2009/02/23 07:52:02
by Confused
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?

How to enable detected hotplugged SATA drives

Posted: 2009/02/23 15:29:37
by gerald_clark
What does 'fdisk -l' show ?

Re: How to enable detected hotplugged SATA drives

Posted: 2009/02/23 18:33:22
by Confused
[quote]
gerald_clark wrote:
What does 'fdisk -l' show ?[/quote]

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.

Re: How to enable detected hotplugged SATA drives

Posted: 2009/02/27 08:12:24
by BartSimpson
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

Re: How to enable detected hotplugged SATA drives

Posted: 2009/02/27 17:57:00
by rsw686
If you know the host adapter number use this command replacing 0 with the host adapter.

[code]echo "- - -" > /sys/class/scsi_host/host0/scan[/code]

Otherwise rescan all the host adapters with this command.

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

Re: How to enable detected hotplugged SATA drives

Posted: 2017/12/04 12:07:19
by Mic.G.
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.