Detect new hard disk in system without reboot.

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

[QUOTE=agarud;28576]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[/QUOTE]

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

Hi agarud,

[QUOTE=agarud;28576]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.[/QUOTE]

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

[QUOTE=jmozdzen;28581]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[/QUOTE]

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

[QUOTE=agarud;28593]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[/QUOTE]

If you go into yast → partitioner doesn’t the disk show up there?

Thomas

Nope…It does not show up there in partitioner.

Thanks and Regards,
agarud

Hi agarud,

[QUOTE=agarud;28593]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.[/QUOTE]

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

[QUOTE=jmozdzen;28596]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[/QUOTE]

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

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

[QUOTE=agarud;28597] 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.?[/QUOTE]

I did so, on production machines, without noticing negative impact. But of course, YMMV :wink: And on more than one occasion, the “echo - - -” didn’t help me, but a LIP reset resolved the issue.

Regards,
Jens

[QUOTE=jmozdzen;28599]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 :wink: And on more than one occasion, the “echo - - -” didn’t help me, but a LIP reset resolved the issue.

Regards,
Jens[/QUOTE]

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

Hi agarud,

[QUOTE=agarud;28600]
echo “- - -” >/sys/class/scsi host/host0/scan.

Could you just elaborate what could be the negative impact… [/QUOTE]

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

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