C.4 Making Devices Available to EVMS

On your Linux system, if you’ve already installed Linux with a non-EVMS volume manager for one or more of the devices, use one of the following ways to make the devices available to EVMS:

C.4.1 Mounting Your System Device with EVMS

If you did not configure EVMS as the root partition manager during installation, the following post-install work-around configures the device to be managed by EVMS. This enables you to create NSS data volumes on single disk systems.

The following procedures assume that you installed OES Linux with three partitions on a single SCSI device named sda:

/dev/sda1  reiserfs /boot
/dev/sda2  swap     swap
/dev/sda3  reiserfs /

IMPORTANT:Make sure to modify the following procedures as necessary for your specific setup.

Disabling boot.lvm and boot.md

Disable boot.lvm (handles devices for Linux Volume Manager) and boot.md (handles multiple devices in software RAIDs) so they do not run at boot time. In the future, you want boot.evms to run at boot time instead.

  1. In YaST, click System > System Services (Runlevel) > Expert Mode.

  2. Select boot.lvm.

  3. Click Set/Reset > Disable the Service.

  4. Select boot.md.

  5. Click Set/Reset > Disable the Service.

  6. Click Finish, then click Yes.

    The changes do not take affect until the server is restarted. Do not reboot at this time.

  7. Continue with Enabling the boot.evms Service.

Enabling the boot.evms Service

Enable the boot.evms service so that it boots devices when you restart the server.

  1. In YaST, click System > System Services (Runlevel) > Expert Mode.

  2. Select boot.evms.

  3. Click Set/Reset > Enable the Service.

    The B runlevel option is automatically selected.

  4. Click Finish, then click Yes.

    The changes do not take affect until the server is restarted. Do not reboot at this time.

  5. Continue with Editing the /etc/init.d/boot.evms Script.

Editing the /etc/init.d/boot.evms Script

  1. Open the /etc/init.d/boot.evms script in a text editor.

  2. Add the following lines to the Stop section:

    mount -n -o remount,rw /
    echo -en "\nDeleting devices nodes"
    rm -rf /dev/evms
    mount -n -o remount,ro /
    

    For example, the Stop section looks like this after the edit:

    stop)
        echo -n "Stopping EVMS"
        mount -n -o remount,rw /
        echo -en "\nDeleting devices nodes"
        rm -rf /dev/evms
        mount -n -o remount,ro /
        rc_status -v
      ;;
    
  3. Save the file.

    The changes do not take affect until the server is restarted. Do not reboot at this time.

  4. Continue with Editing the /etc/fstab File.

Editing the /etc/fstab File

When you boot the system, the kernel reads the /etc/fstab file to identify which file systems should be mounted and then mounts them. This file contains a table of file system information about the /boot, swap, and root ( /) partitions plus other partitions and file systems you want to mount.

You must edit the /etc/fstab file to modify the mount location of these three partitions so they are mounted under the /dev/evms directory. For example, change /dev/ sda1 to /dev/evms/sda1.

Although the /boot partition is not managed by EVMS, the boot.evms script forces EVMS to scan all the partitions at boot time, including the /boot partition, and it activates /boot under the /dev/evms directory. Therefore, this makes /boot a partition that is discovered by EVMS at startup, and requires that the device’s path be listed under /dev/evms in the fstab file so it can be found when booting with boot.evms.

Make sure to replace sda1, sda2, and sda3 with the device names you used for your partitions.

IMPORTANT:When working in the /etc/fstab file, do not leave any stray characters or spaces in the file. This is a configuration file, and it is highly sensitive to such mistakes.

  1. Open the /etc/fstab file in a text editor.

  2. Locate the line that contains the /boot partition.

    For example, if your /boot partition uses device sda1 and the Reiser file system, look for a line similar to this:

    /dev/sda1 /boot reiser defaults 1 1
    
  3. In the Device Name column, modify the mount location of the /boot partition from /dev to /dev/evms so it can be managed by EVMS. Modify only the device name by adding /evms to the path:

    /dev/evms/sda1 /boot reiser defaults 1 1  
    
  4. Repeat Step 2 and Step 3 to edit the Device Name entry in the lines for the swap and root (/) partitions.

    For example, change /dev/sda2 to /dev/evms/sda2 , and change /dev/sda3 to /dev/evms/sda3.

  5. Save the file.

    The changes do not take affect until the server is restarted. Do not reboot at this time.

  6. Continue with Editing the Boot Loader File.

Editing the Boot Loader File

When you boot the system, the kernel reads the boot loader file for information about your system. For Grub, this is the /boot/grub/menu.1st file. For LILO, this is the /etc/lilo.conf file.

You must edit the boot loader file to modify the mount location of partitions so they are mounted under the /dev/evms directory. For example, change /dev/sda1 to /dev/evms/sda1. Make sure to replace the path for all lines that contain device paths in the files. You can modify the boot loader file by editing fields in YaST, or use a text editor to modify the file directly.

IMPORTANT:When working in the boot loader file, do not leave any stray characters or spaces in the file. This is a configuration file, and it is highly sensitive to such mistakes.

To modify the boot loader file in the YaST Control Center:

  1. Log in as the root user.

  2. In Yast, select System > Boot Loader.

  3. Modify the boot loader image so that the root file system is mounted as /dev/evms/ instead of /dev/.

    1. Select the boot loader image file, then click Edit.

    2. Edit the device path in the Root Device field.

      For example, change the Root Device value from

      /dev/sda2

      to

      /dev/evms/sda2

      Replace sda2 with the actual device on your machine.

    3. Edit any device paths in the Optional Kernel Command Line Parameter field.

    4. Click OK to save the changes and return to the Boot Loader page.

  4. Modify the failsafe image so that the failsafe root file system is mounted as /dev/evms/ instead of /dev/.

    1. Select the failsafe image file, then click Edit.

    2. Edit the device path in the Root Device field.

    3. Check the Other Kernel Parameters field and make changes if needed.

    4. Click OK to save the change and return to the Boot Loader page.

  5. Click Finish.

  6. Continue with Forcing the RAM Disk to Recognize the Root Partition.

To edit the boot loader file in a text editor:

  1. Log in as the root user.

  2. Open the boot loader file in a text editor.

    For Grub, this is the /boot/grub/menu.1st file. For LILO, this is the /etc/lilo.conf file.

  3. Locate the line that contains the root= parameter.

    For example, if your root file system uses device sda1, look for a line similar to this:

    kernel (hd0,0)/vmlinuz root=/dev/sda1 vga=0x31a  splash=silent showopts
    
  4. Modify the mount location from /dev to /dev/evms so it can be managed by EVMS.

    For example, after the change, the line looks like this:

    kernel (hd0,0)/vmlinuz root=/dev/evms/sda1 vga=0x31a  splash=silent showopts
    
  5. Repeat Step 3 and Step 4 to locate other lines in the file that need to be similarly modified.

  6. Save the file.

    The changes do not take affect until the server is restarted. Do not reboot at this time.

  7. Continue with Forcing the RAM Disk to Recognize the Root Partition.

Forcing the RAM Disk to Recognize the Root Partition

Although you modified the /etc/fstab file so that everything now mounts from the /dev/evms path, the RAM disk still tries to load the root (/) partition from the /dev path because the /initrd file was configured during the install without using EVMS. You must force the RAM disk to update its information.

  1. At a terminal prompt, enter the EVMS NCurses command:

    evmsn
    
  2. Review the output to verify that EVMS shows only the /boot and swap partitions as active in EVMS.

    You should see the following devices mounted (with your own partition names, of course) for these two partitions:

    /dev/evms/sda1
    
    /dev/evms/sda2
    
  3. Edit /sbin/mkinitrd to change the root_evms parameter from

    root_evms= 
    

    to

    root_evms=1
    

    then save the file.

  4. At a terminal prompt, enter

    /sbin/mkinitrd
    

    This forces initrd to get the updated /dev/evms path information for the root (/) partition.

  5. Edit /sbin/mkinitrd to change the root_evms parameter from

    root_evms=1 
    

    to

    root_evms=
    

    then save the file.

    The changes do not take affect until the server is restarted. You reboot in the next task.

  6. Continue with Rebooting the Server.

Rebooting the Server

  1. Reboot the server to apply the post-install configuration settings.

  2. Continue with Verifying that EVMS Manages the Boot, Swap, and Root Partitions.

Verifying that EVMS Manages the Boot, Swap, and Root Partitions

  1. At a terminal prompt, enter the EVMS NCurses command:

    evmsn
    
  2. Review the output to verify that EVMS shows the /boot, swap, and root (/) partitions as active in EVMS.

    You should see the following devices mounted (with your own partition names, of course) for these three partitions:

    /dev/evms/sda1
    /dev/evms/sda2
    /dev/evms/sda3
    

Everything should now mount from the /dev/evms structure. You can now use the Storage plug-in to iManager to create and manage NSS pools and volumes, or use NSSMU and other NSS commands and utilities as desired.

C.4.2 Converting LVM2 Volumes to EVMS Volumes

The following instructions were modified from Converting to EVMS at the EVMS Project Web site.

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

  2. Enter the following command to run the EVMS GUI:

    evmsgui
    
  3. In the Volume panel, review the names that EVMS reports for your existing volumes to find the volume that represents your /boot, swap, and root (/) volumes, then write down the names for future reference.

    All storage objects that EVMS manages or activates (such as the /boot partition when using the boot.evms script) are mounted under /dev/evms. For example:

    Storage Object

    Mount Location

    A disk segment of disk sda called /dev/sda5

    /dev/evms/sda5
    

    A software RAID device called /dev/md1

    /dev/evms/md/md1
    

    An LVM2 volume called /dev/lvm_group/lvm_volume

    /dev/evms/lvm/lvm_group/lvm_volume
    
  4. In a text editor, edit the /etc/fstab file to use the EVMS volume names.

    For example, change the following entry for an LVM2 volume from this

    /dev/system / reiserfs defaults 1 2 
    

    to this

    /dev/evms/lvm/system / reiserfs defaults 1 2
    

    IMPORTANT:Make sure not to leave any stray characters or spaces in the line.

    With these changes, each time your system boots, your file systems are mounted using the EVMS volume manager.

  5. Update the boot scripts by doing the following:

    • The command evms_activate must be run from your boot scripts in order to automatically activate your volumes so their file systems can be mounted.

      The evms_activate command discovers all EVMS volumes and activates kernel devices for all volumes that are not yet active. If EVMS volumes are listed in the /etc/fstab, evms_activate should be run before /etc/fstab is processed.

    • If you run software-RAID (md) or LVM2 tools during your boot scripts, remove or disable those commands.

  6. Update the boot loader.

    To mount your root file system using EVMS, you must install the EVMS init-ramdisk image and update your boot-loader configuration. For information about updating the boot loader, see Editing the Boot Loader File.

  7. Reboot your system.

    When your system boots, the kernel loads the init-ramdisk, which runs the EVMS tools to activate your volumes and mount your root fleshiest. Then your boot scripts run the EVMS tools once more to make sure your /dev/evms/ directory correctly reflects the current state of your volumes. Finally, the remaining EVMS volumes are mounted as specified in your /etc/fstab file. Everything else on your system should start up as you would normally expect.

C.4.3 Patching the 2.6 Kernel (Unsupported)

Apply the BD-Claim Patch, which is a reversal of the patch that prevents Device-Mapper and the kernel's built-in partitions from using the same disk at the same time. This patch is not supported by the kernel community, and in fact removes functionality that they specifically added. However, it allows you to share your disks between EVMS and the kernel's built-in partitioning code, if that's the choice you want to make for your system.

WARNING:Adding this patch makes your server an unsupported configuration with respect to Novell Support.

See BD-Claim Patch for more information.