PDA

View Full Version : Detect new hard disk in system without reboot.



agarud
30-Jun-2015, 08:21
Hello All,

We have added new hard disk to extend an existing partition on Production server. Is there a command or any other way where we can detect the newly added hard disks without rebooting the server.


Thanks
agarud

thsundel
30-Jun-2015, 08:54
Hello All,

We have added new hard disk to extend an existing partition on Production server. Is there a command or any other way where we can detect the newly added hard disks without rebooting the server.


Thanks
agarud

Is this a SAN disk, if so then maybe rescan-scsi-bus.sh?

https://www.suse.com/documentation/sles10/stor_admin/data/scandev.html

Thomas

jmozdzen
30-Jun-2015, 11:15
Hi agarud,

Hello All,

We have added new hard disk to extend an existing partition on Production server. Is there a command or any other way where we can detect the newly added hard disks without rebooting the server.

could you please share what version of SLES this is and how you added what type of disk (hot-plug physical SCSI disk; extending a hardware RAID resulting in bigger RAID volume; SAN disk (as mentioned by Thomas); something else) and how it's attached to the server? If it's a physical disk or new LUN (as opposed to increasing the effective disk size of a RAID or alike), are there any messages in dmesg or syslog after the disk activation?

Regards,
Jens

agarud
01-Jul-2015, 08:02
Hi agarud,


could you please share what version of SLES this is and how you added what type of disk (hot-plug physical SCSI disk; extending a hardware RAID resulting in bigger RAID volume; SAN disk (as mentioned by Thomas); something else) and how it's attached to the server? If it's a physical disk or new LUN (as opposed to increasing the effective disk size of a RAID or alike), are there any messages in dmesg or syslog after the disk activation?

Regards,
Jens

HI Jens,

We are using
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

It is not an actual physical disk but new disk space assigned from an esx server datastore.

Could we use the below command or use the command from above link on PROD server.

echo "- - -" >/sys/class/scsi host/host0/scan

just confirming as we do not want any downtime.

Thanks and Regards,
agarud

thsundel
01-Jul-2015, 08:51
HI Jens,

We are using
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

It is not an actual physical disk but new disk space assigned from an esx server datastore.

Could we use the below command or use the command from above link on PROD server.

echo "- - -" >/sys/class/scsi host/host0/scan

just confirming as we do not want any downtime.

Thanks and Regards,
agarud

If you go into yast -> partitioner doesn't the disk show up there?

Thomas

agarud
01-Jul-2015, 09:27
Nope....It does not show up there in partitioner.

Thanks and Regards,
agarud

jmozdzen
01-Jul-2015, 09:50
Hi agarud,

HI Jens,
[...]It is not an actual physical disk but new disk space assigned from an esx server datastore.

Could we use the below command or use the command from above link on PROD server.

echo "- - -" >/sys/class/scsi host/host0/scan

just confirming as we do not want any downtime.

assuming that "host0" is the actual SCSI host used for the datastore connection, it's definitely worth a try.

Does SLES11SP1 have the "rescan-scsi-bus.sh" command? It's part of the sg3_utils RPM.

Best regards,
Jens

agarud
01-Jul-2015, 11:35
Hi agarud,


assuming that "host0" is the actual SCSI host used for the datastore connection, it's definitely worth a try.

Does SLES11SP1 have the "rescan-scsi-bus.sh" command? It's part of the sg3_utils RPM.

Best regards,
Jens

Yes, it does have that command but the problem is still we do not know the host or devices. It does have a force rescan option with the command.

echo "- - -" >/sys/class/scsi host/host0/scan
host 0 is just an example. We have more than couple of hosts. Is it okay to scan all the hosts.?


Thanks and Regards,
agarud

jmozdzen
01-Jul-2015, 11:52
Hi agarud,


Yes, it does have that command but the problem is still we do not know the host or devices. It does have a force rescan option with the command.

rescan-scsi-bus.sh, at least in current SLES versions, will scan all SCSI busses for new devices.

Are you using FiberChannel connections? Then a LIP reset might be required to detect LUN changes - see "-i" option of rescan-scsi-bus.sh


echo "- - -" >/sys/class/scsi host/host0/scan
host 0 is just an example. We have more than couple of hosts. Is it okay to scan all the hosts.?

I did so, on production machines, without noticing negative impact. But of course, YMMV ;) And on more than one occasion, the "echo - - -" didn't help me, but a LIP reset resolved the issue.

Regards,
Jens

agarud
01-Jul-2015, 12:20
Hi agarud,



rescan-scsi-bus.sh, at least in current SLES versions, will scan all SCSI busses for new devices.

Are you using FiberChannel connections? Then a LIP reset might be required to detect LUN changes - see "-i" option of rescan-scsi-bus.sh



I did so, on production machines, without noticing negative impact. But of course, YMMV ;) And on more than one occasion, the "echo - - -" didn't help me, but a LIP reset resolved the issue.

Regards,
Jens


Oh ok, so just the rescan-scsi-bus.sh command without any option will scan all the devices and could detect the new disk.


echo "- - -" >/sys/class/scsi host/host0/scan.

Could you just elaborate what could be the negative impact..


Thanks and Regards,
agarud

jmozdzen
01-Jul-2015, 12:32
Hi agarud,


echo "- - -" >/sys/class/scsi host/host0/scan.

Could you just elaborate what could be the negative impact..

The quick version? "Hey, computers are involved, anything can go wrong!".

I've seen too many things go wrong, I'll no longer trust even small changes to be risk-less. Maybe the "device driver" gets confused by that echo statement, or by what's reported back by the adapter. Unlikely, but maybe the driver decides to drop all existing LUNs... if you're using multipath, the chances for trouble are higher, as is the complexity. Or, even if the disk is detected without a problem, some secondary subsystem on your server might get confused by the sudden appearance of the new LUN and bark. The new LUN could carry some signature data tht will trigger some unwanted action, etc etc.

Most of this is rather unlikely or without practical impact. But from my experience, you never know what can go wrong, until after you have tried. There's a reason for inventing the term "maintenance window"...

Regards,
Jens

Magic31
01-Jul-2015, 13:45
Oh ok, so just the rescan-scsi-bus.sh command without any option will scan all the devices and could detect the new disk.

I always run that command with the --forcerescan option. Especially needed if you have enlarged the existing disk.... Reading your posts it's not clear to me if you have expanded an existing VMDK/RAW device or have added a new "fresh" disk.

Haven't seen any systems have issues running that command, assuming the disk sub system is healthy.


Cheers,
Willem