Scanning for New Partitioned Devices without Rebooting

Use the example in this section to detect a newly added multipathed LUN without rebooting.

  1. Open a terminal console, then log in as the root user.

  2. Detect the newly added multipathed LUN by entering:

    echo '- - -' >>/sys/class/fc_host/host1/device/scsi_host\:host1/scan
    
    echo '- - -' >>/sys/class/fc_host/host2/device/scsi_host\:host2/scan
    
  3. Verify that the device is seen (link has a fresh timestamp) by entering

    ls -lrt /dev/dm-*
    
  4. Verify the new WWN of the device appears in the log by entering

    tail -33 /var/log/messages
    
  5. Use a text editor to add a new alias definition for the device in the /etc/multipath.conf file, such as oradata3.

  6. Create a partition table for the device by entering

    fdisk /dev/dm-8
    
  7. Add a /dev/dm-* link for the new partition by entering

    /sbin/kpartx -a -p -part /dev/dm-8
    
  8. Verify that the link was created by entering

    ls -lrt /dev/dm-*
    
  9. Create a filesystem and label for the new partition by entering

    mke2fs -j /dev/dm-9
    
    tune2fs -L oradata3 /dev/dm-9
    
  10. Restart DM-Multipath to let it read the aliases by entering

    /etc/init.d/multipathd restart
    
  11. Verify that the device is recognized by multipathd by entering

    multipath -ll
    
  12. Use a text editor to add a mount entry in the /etc/fstab file.

    At this point, the alias you created in Step 5 is not yet in the /dev/disk/by-label directory. Add the mount entry the /dev/dm-9 path, then change the entry before the next time you reboot to

    LABEL=oradata3
    
  13. Create a directory to use as the mount point, then mount the device by entering

    md /oradata3
    
    mount /oradata3
    

SUSEŽ Linux Enterprise Server Storage Administration Guide 10