This discussion is archived
10 Replies Latest reply: Dec 14, 2012 7:04 AM by 898553 RSS

How to make system aware of the newly created LUNs without rebooting

user10122998 Newbie
Currently Being Moderated
Hi all,

We've been working a lot with Oracle RAC on Red hat Linux machines (both version 5.5 and 6.3) and SAN devices. Up until now, every time when we create new luns we have reboot the server in order for the luns to be visible to the operating system.

I'm just wondering if there are other ways to make operating system aware of the newly created LUNs without rebooting the system?
  • 1. Re: How to make system aware of the newly created LUNs without rebooting
    Nik Expert
    Currently Being Moderated
    Hi.
    It's can depend from type of used FC-hba. Because some vendors create additional tool for drivers
    You can google it for key words "linux scan lun"

    General way:
    echo "- - -" > /sys/class/scsi_host/<host listings here>/scan

    where <host listings here> - correspond host* - HBA where you need rescan bus.

    Regards.
  • 2. Re: How to make system aware of the newly created LUNs without rebooting
    898553 Newbie
    Currently Being Moderated
    Install sg3_utils and run rescan-scsi-bus.sh
  • 3. Re: How to make system aware of the newly created LUNs without rebooting
    tbrinkmann Explorer
    Currently Being Moderated
    Hey,
    so I think I do have the same question in mind..

    If I´m right you are using multipath at dom0 and the LUN was find and attached without a reboot.
    Now you attached the LUN to your domX in vm.cfg and need a reboot that your domX find the LUN.

    So same question here can I attach a new hard disk to my domX without a reboot ?

    *T                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  • 4. Re: How to make system aware of the newly created LUNs without rebooting
    Dude! Guru
    Currently Being Moderated
    SCSI is not like USB or Firewire and host bus adpaters (HBA) were typically not designed to dynamically find new devices without a SCSI adapter reset or system restart. In fact, attaching a SCSI device while the SCSI host adapter is powered on may cause hardware damage or freeze the system. Fiber channel (SCSI over Fiber) and iSCSI provide additional features. However, a rescan of storage interconnects can be disruptive and can cause unexpected problems. There are a couple of related sections in the Storage Administration Guide: https://linux.oracle.com/documentation/OL6/Red_Hat_Enterprise_Linux-6-Storage_Administration_Guide-en-US.pdf

    24.9. Scanning Storage Interconnects
    24.12. Scanning iSCSI Interconnects
  • 5. Re: How to make system aware of the newly created LUNs without rebooting
    898553 Newbie
    Currently Being Moderated
    tbrinkmann wrote:
    Hey,
    so I think I do have the same question in mind..

    If I´m right you are using multipath at dom0 and the LUN was find and attached without a reboot.
    Now you attached the LUN to your domX in vm.cfg and need a reboot that your domX find the LUN.

    So same question here can I attach a new hard disk to my domX without a reboot ?

    *T
    Are you talking about OVM? If so, I believe the manager should be able handle presenting new disks to the various hosts and you shouldn't have to do it manually. Keep in mind though, dom0 runs very much like any typical OEL install so you can absolutely rescan the scsi bus for new devices.
  • 6. Re: How to make system aware of the newly created LUNs without rebooting
    Avi Miller Guru
    Currently Being Moderated
    tbrinkmann wrote:
    So same question here can I attach a new hard disk to my domX without a reboot ?
    Not sure what a "domX" is: Xen refers to Dom0 (the management domain) and DomUs (the guests). If you're referring to the DomUs:

    1. On OVM3, you can just edit the VM in the Manager and add a new disk. It'll automatically attach the disk to the VM for you, while it's running. This relies on the hotplug scripts inside the guest to be running as well to detect the new hardware (or Windows PV drivers).
    2. If you're running some other flavour of Xen, you'd need to manually use the xm block-attach (<= Xen 4.1) or xl block-attach (>= Xen 4.2) to attach the disk.
  • 7. Re: How to make system aware of the newly created LUNs without rebooting
    Avi Miller Guru
    Currently Being Moderated
    theanswriz42 wrote:
    Keep in mind though, dom0 runs very much like any typical OEL install so you can absolutely rescan the scsi bus for new devices.
    You would not do this manually on OVM: just rescan the Storage Array in the Manager and it will automatically do it across the pool.

    Also note that there is no such thing as OEL. We haven't had the word "Enterprise" in the product name for more than 2 years now. It's just Oracle Linux or OL. :)
  • 8. Re: How to make system aware of the newly created LUNs without rebooting
    tbrinkmann Explorer
    Currently Being Moderated
    So if the manager can do this it also can be done manually...

    I will check the manual..
  • 9. Re: How to make system aware of the newly created LUNs without rebooting
    Avi Miller Guru
    Currently Being Moderated
    tbrinkmann wrote:
    So if the manager can do this it also can be done manually...
    (Almost) nothing on OVM3 should be done manually. You should be using the Manager for this, otherwise you run the risk of the Manager being out of sync with what's happening on the Servers.

    Edited by: Avi Miller on Dec 14, 2012 8:59 AM
  • 10. Re: How to make system aware of the newly created LUNs without rebooting
    898553 Newbie
    Currently Being Moderated
    Avi Miller wrote:
    theanswriz42 wrote:
    Keep in mind though, dom0 runs very much like any typical OEL install so you can absolutely rescan the scsi bus for new devices.
    You would not do this manually on OVM: just rescan the Storage Array in the Manager and it will automatically do it across the pool.

    Also note that there is no such thing as OEL. We haven't had the word "Enterprise" in the product name for more than 2 years now. It's just Oracle Linux or OL. :)
    Yeah, I'm a creature of habit. In this case, running rescan-scsi-bus.sh on the OVS nodes won't hurt anything, though you're right, it's not best practices and you'll likely have to pull it in the manager for it to show up anyway. There's also a fair bit you can do on the OVS nodes via the CLI that you can't in the manager, for example, I/O tuning in DM-Multipath.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points