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:
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.
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.
In YaST, click
> > .Select
.Click
> .Select
.Click
> .Click
, then click .The changes do not take affect until the server is restarted. Do not reboot at this time.
Continue with Enabling the boot.evms Service.
Enable the boot.evms service so that it boots devices when you restart the server.
In YaST, click
> > .Select
.Click
> .The
option is automatically selected.Click
, then click .The changes do not take affect until the server is restarted. Do not reboot at this time.
Continue with Editing the /etc/init.d/boot.evms Script.
Open the /etc/init.d/boot.evms script in a text editor.
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 ;;
Save the file.
The changes do not take affect until the server is restarted. Do not reboot at this time.
Continue with 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.
Open the /etc/fstab file in a text editor.
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
In 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:
column, modify the mount location of the/dev/evms/sda1 /boot reiser defaults 1 1
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.
Save the file.
The changes do not take affect until the server is restarted. Do not reboot at this time.
Continue with 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:
Log in as the root user.
In Yast, select
.Modify the boot loader image so that the root file system is mounted as /dev/evms/ instead of /dev/.
Select the boot loader image file, then click
.Edit the device path in the
field.For example, change the
value from/dev/sda2
to
/dev/evms/sda2
Replace sda2 with the actual device on your machine.
Edit any device paths in the
field.Click
to save the changes and return to the Boot Loader page.Modify the failsafe image so that the failsafe root file system is mounted as /dev/evms/ instead of /dev/.
Select the failsafe image file, then click
.Edit the device path in the
field.Check the
field and make changes if needed.Click
to save the change and return to the Boot Loader page.Click
.Continue with Forcing the RAM Disk to Recognize the Root Partition.
To edit the boot loader file in a text editor:
Log in as the root user.
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.
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
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
Repeat Step 3 and Step 4 to locate other lines in the file that need to be similarly modified.
Save the file.
The changes do not take affect until the server is restarted. Do not reboot at this time.
Continue with 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.
At a terminal prompt, enter the EVMS NCurses command:
evmsn
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
Edit /sbin/mkinitrd to change the root_evms parameter from
root_evms=
to
root_evms=1
then save the file.
At a terminal prompt, enter
/sbin/mkinitrd
This forces initrd to get the updated /dev/evms path information for the root (/) partition.
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.
Continue with Rebooting the Server.
Reboot the server to apply the post-install configuration settings.
Continue with Verifying that EVMS Manages the Boot, Swap, and Root Partitions.
At a terminal prompt, enter the EVMS NCurses command:
evmsn
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.
The following instructions were modified from Converting to EVMS at the EVMS Project Web site.
Open a terminal console, then log in as the root user.
Enter the following command to run the EVMS GUI:
evmsgui
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 |
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.
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.
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.
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.
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.