My Favorites

Close

Please to see your favorites.

  • Bookmark
  • Email Document
  • Printer Friendly
  • Favorite
  • Rating:

/etc/fstab entry does not mount iSCSI device on boot up.

This document (7004427) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 11

Situation

Set up the iSCSI initiator following the "Storage Administration Guide"
SLES 11
   https://www.novell.com/documentation/sles11/stor_admin/data/sec_inst_system_iscsi_initiator.html

Resolution

Modify /etc/fstab to use 'hotplug' (for SLES10) or 'nofail' (for SLES11) option.

Example for SLES 11:
  /dev/sdb1   /mnt/mountpoint   ext3   acl,user,nofail   0 0

If you are using LVM and iscsi and having problems where the device is not available on bootup please do either of the following.

Option A (Recommended).
In the /lib/udev/rules.d/64-lvm2.rules file
Add the line
  ACTION=="add", KERNEL=="sd*", GOTO="lvm_work"
Change the /etc/fstab file to use
  /dev/mapper/vgname-lvname
instead of
  /dev/vgname/lvname

Option B.
Create /etc/init.d/after.local with the following information.  This will reload the the lvm configuration and mount entries from the /etc/fstab file.
  # ll /etc/init.d/after.local
  -rwxr--r-- 1 root root 135 2010-08-02 09:33 /etc/init.d/after.local

# cat /etc/init.d/after.local
  #!/bin/bash
  /etc/init.d/boot.lvm reload
  mount -a


Option C.
Mount by the /dev/disk/by-uuid instead of the /dev/vgname/lvname in the /etc/fstab.

Additional Information

Multipathed iSCSI devices

Multipathed iSCSI devices can be addressed using the reboot persistent device names in /dev/disk/by-id/. However, to have the device auto mount after a system reboot, the following conditions must met (tested on SLES11SP1, patch level as of July 2012):
  1. Use the nofail option in /etc/fstab
  2. Make sure the dump field is set to 0 (zero) else the system will stop booting and prompt for the maintenance mode as the device is not available at this time in the boot process.
    The dump option is the fifth entry option in /etc/fstab, see man 5 fstab for more information.
  3. Make sure /etc/init.d/multipathd and /etc/init.d/open-iscsi are started automatically in the desired system runlevel
  4. When using an alias name instead of the LUN wwid, please use the corresponding entry in /dev/disk/by-id/ and not /dev/mapper/

The iSCSI LUN used in this example is defined as follows:

iscsiclient:~ # multipath -ll
yellow (1494554000000000036363500000000000000000000000000) dm-0 IET,VIRTUAL-DISK
size=500M features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=active
| `- 5:0:0:0 sdc 8:32 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
 `- 6:0:0:0 sdb 8:16 active ready running
iscsiclient:~ #

As the device contains a partition table, its addressed using scsi-yellow-part1:

iscsiclient:~ # ls -l /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 260 2012-07-31 10:56 ./
drwxr-xr-x 5 root root 100 2012-07-31 10:56 ../
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 dm-name-yellow -> ../../dm-0
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 dm-name-yellow_part1 -> ../../dm-1
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 dm-uuid-mpath-1494554000000000036363500000000000000000000000000 -> ../../dm-0
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 dm-uuid-part1-mpath-1494554000000000036363500000000000000000000000000 -> ../../dm-1
lrwxrwxrwx 1 root root   9 2012-07-31 10:56 edd-int13_dev80 -> ../../sda
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 edd-int13_dev80-part1 -> ../../sda1
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 edd-int13_dev80-part2 -> ../../sda2
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 scsi-1494554000000000036363500000000000000000000000000 -> ../../dm-0
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 scsi-1494554000000000036363500000000000000000000000000-part1 -> ../../dm-1
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 scsi-yellow -> ../../dm-0
lrwxrwxrwx 1 root root  10 2012-07-31 10:56 scsi-yellow-part1 -> ../../dm-1
iscsiclient:~ #

Example of an /etc/fstab entry for a multipathed iSCSI device:

/dev/disk/by-id/scsi-yellow-part1 /iscsi ext3 acl,user_xattr,nofail 0 2



Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7004427
  • Creation Date:10-SEP-09
  • Modified Date:31-JUL-12
    • SUSESUSE Linux Enterprise Server
< Back to Support Search

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center