SUSE Support

Here When You Need Us

How to use iSCSI volumes with LVM on boot

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

Environment

SUSE Linux Enterprise Server 10 Service Pack 1
SUSE Linux Enterprise Server 10 Service Pack 2
SUSE Linux Enterprise Server 10 Service Pack 3


Situation

HOW-TO information for using iSCSI volumes on Boot

Resolution

SLES 10 SP1 - See the following article in Cool Solutions:

SLES 10 SP2 and Later
Configuring LVM Auto-assembly on iSCSI Devices

Using LVM over iSCSI on SLES 10 SP1 has the initial problem that iSCSI is started only after the network and with that far too late for the boot.lvm script to activate any LVM volume groups devices. However, with SLES10 SP2 we've integrated the necessary tools to integrate lvm startup into udev, so that any LVM volume groups will be activated automatically via udev once all required physical volumes have been detected.

1.1 How to configure

   1. Use the script /usr/share/doc/packages/lvm2/lvm-vg-to-udev-rules.sh. It takes as an argument the logical volume name, from which it discovers the volume group name that will be started automatically. This script will generate the required udev rules.
   2. Restart iSCSI; the volume groups will be activated automatically.

That's all. If you want to have the array started automatically on boot you have to switch the iSCSI component devices to 'automatic', so that the initiator will log into the target automatically on boot.


1.2 Grubby details

LVM auto-assembly in udev makes use of the udev helper program 'collect'. This program takes as the first argument an abstract 'ID' to be checked, followed by a list of component IDs. Once this program has been called with each of the component IDs as the first argument it'll return 0.

So for auto-assembly we register the physical volume UUIDs for the given volume group as argument list for 'collect'. udev (or rather vol_id) is capable of detecting the physical volume UUID on a device and hence it can be passed as the first argument to 'collect'.

Once 'collect' has been called with all physical volume UUIDs (IE udev has received events for all component devices) the next rule triggers which just calls 'vgchange -a y <vgname>' and the volume group will be activated.

Additional Information

Additional iSCSI documentation can be found here.



Disclaimer

This Support Knowledgebase provides a valuable tool for 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:7003988
  • Creation Date: 27-Jul-2009
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

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

tick icon

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.

tick icon

Open an Incident

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