GeneralThis “how-to” provides information on how to create bootable iSCSI images and on fedora Core 5 in addition to "imaging" Fedora Core 5 as an Iscsi-filesystem image. The result of this is an openQRM management. Requirements: Two (or more) systems - one for the openQRM-server and one (or more) to be used as a node(s). Build Requirements:The iSCSI implementation used for the openQRM iSCSI-plugin requires the db libraries and headers for compilation. Please make sure that those additional development packages (normally named db4 and db4-devel, on some distributions db and db-devel) are installed on your build system. Step 1 -- Installing Fedora Core 5For a package setup, choose gnome, kde and development tools (general, gnome, kde and X). Do not select the java package or install any servers at this time. On first boot, disable the firewall and selinux and set the default run-level to 3 by adjusting id:5:initdefault: to id:3:initdefault: in /etc/inittab. You may also want to update the Fedora Core 5 by running: yum update. Step 2 -- Installing openQRMPlease obtain the following openQRM rpms from the openQRM-project website at sourceforge: - qrm-core-base
- qrm-plugin-dhcpd
- qrm-plugin-iscsi
- qrm-plugin-tftpd
- qrm-extra-mysql
Install these by: - rpm -iHv qrm-core-base-x-x.rpm qrm-plugin-dhcpd-x-x.rpm qrm-plugin-iscsi-x-x.rpm qrm-plugin-tftpd-x-x.rpm qrm-extra-mysql-x-x.rpm
These rpm-packages install the openQRM files to /opt/qrm. When the rpm-installation is complete you can configure and install openQRM. Open a console as user root and follow the command-sequence below: cd /opt/qrm ./qrm-installer -i -c --> Components -> select "dhcpd", "iscsi", "tftpd" and "mysql" In most cases the suggested defaults will fit. If the dhcpd-plugin should be re-configured please select :
--> Config --> dhcpd Follow the wizard. Give the ip-address for the interface being used as the openQRM server as the QRM-server- and TFTPD-server ip. Configure the dhcpd ip-range and set the domain-name to e.g. openqrm. -> quit Below is a possible dhcpd-plugin configuration: - Network : 192.168.1.0
- Subnetmask : 255.255.255.0
- Broadcast address : 192.168.1.255
- Default gateway : 192.168.1.1
- DNS-server ip-address : 192.168.1.10
- Tftp-server ip-address : 192.168.1.3
- Domain-name : openqrm
- First ip-address in range : 192.168.1.100
- Last ip-address in range : 192.168.1.200
When the configuration is finished the qrm-installer installs and starts the openQRM-server. After the openQRM installation is complete, you can access the openQRM management GUI via a web-browser at http://localhost. Login with the username "qrm" using the password "qrm”. Step 3 -- Installing the Enterprise Iscsi-targetDownload and install the Enterprise Iscsi-target from http://iscsitarget.sourceforge.net/ (the most current version available is 0.4.13). yum install kernel-devel tar -xzcvf iscsitarget-0.4.13.tar.gz cd iscsitarget-0.4.13 make KERNELSRC=/usr/src/kernels/`uname -r`/ make KERNELSRC=/usr/src/kernels/`uname -r`/ install chkconfig --add iscsi-target chkconfig iscsi-target on cp etc/ietd.conf /etc/ service iscsi-target start
Create an empty 5GB Iscsi-Lun disk by using the following commands: mkdir -p /diskimages dd if=/dev/zero of=/diskimages/fc5_iscsi.img bs=1M count=5000
When finished, create the Iscsi-target setup for this Iscsi-image. echo "Target openQRM" > /etc/ietd.conf echo " Lun 0 Path=/diskimages/fc5_iscsi.img,Type=fileio" >> /etc/ietd.conf service iscsi-target restart
The Iscsi-target server is now ready for use. Step 4 -- Creating an Iscsi-filesystem imageBoot a PXE-enabled system in a network configured for the dhcpd-plugin. The network then starts it up. It will appear as "idle" in the openQRM resource view. Add "/" to the /etc/exports config file. This nfs export is used by the automatic filesystem image creation as a source to obtain content for the rootfilesytem. (You may want to remove this export entry after the image creation.) Run: echo "/ *(rw,insecure,no_root_squash,async)" >> /etc/exports service nfs restart service nfslock restart chkconfig nfs on chkconfig nfslock on
Register the Iscsi-target server as an openQRM storage-server by running: cd /opt/qrm/bin ./qrm-cli -u qrm -p qrm storage add -n openQRM -t iScsi -i [IP-ADDRESS-OF-YOUR-OPENQRM-SERVER] -c "Iscsi-target server"
(You need to replace [IP-ADDRESS-OF-YOUR-OPENQRM-SERVER] with the ip-address of the interface selected during the openQRM-setup.) This qrm-cli command adds the Iscsi-target server to the openQRM-server with the name "openQRM”. Add a new filesystem-image by executing: ./qrm-cli -u qrm -p qrm filesystem add -n fc5_iscsi -s openQRM -i iqn.1987-05.com.cisco:01.3b78d46ff1fd -c "Fedora Core 5 server (Iscsi)" -a i686 -e "ISCSI_TARGET_NAME=openQRM ISCSI_ROOT_PARTITION=1 ISCSI_LUN=0 ISCSI_ROOT_FS_TYPE=ext3 ISCSI_PORT=3260 ISCSI_HBA=0 ISCSI_INITIATOR=iqn.1987-05.com.cisco:01.3b78d46ff1fd INSTALL_IMAGE=true INSTALL_FROM_TARGET_IP_ADDRESS=[IP-ADDRESS-OF-YOUR-OPENQRM-SERVER] INSTALL_FROM_TARGET_PATH=/ QRM_FILESYSTEM_IMAGE_EXCLUDES='/diskimages'"
(Again, you need to replace [IP-ADDRESS-OF-YOUR-OPENQRM-SERVER] with the ip-address of the interface selected during the openQRM-setup.) The qrm-cli command creates a filesystem with Iscsi-definitions in the openQRM-server. It also configures the filesystem-image for automatic-installation by the INSTALL_IMAGE=true parameter. This causes the filesystem-image to be installed “on-the-fly” during startup. Create the FedoraCore5 Virtual-environment on the openQRM-server: ./qrm-cli -u qrm -p qrm virtual-environment add -v FedoraCore5 -k iscsi_2_6 -f fc5_iscsi
This qrm-cli command sets up the Virtual-environment using components created previously. You can also add the Iscsi- storage-server, filesystem image and Virtual environment configurations via a web browser in the openQRM GUI. Step 5 -- Starting the FedoraCore5 Virtual-environment (Iscsi)Now you can start the virtual-environment FedoraCore5 by the Action-menu in openQRM's Virtual-environments view. Starting the virtual-environment causes the "idle" system to reboot. It then restarts and mounts the nfs-export, connects the Iscsi-target and copies the content of the root-filesytem from the source-system (the openQRM-server) to the Iscsi-Lun (the disk-file created in Step 3). You can monitor the automatic filesystem image creation via the openQRM event view in the GUI. (You may want to get a coffee at this point, as transfering the data takes quite a bit of time.) When the copying is finished, the node will immediately start up. Congratulations! You made it to the end of this “how-to” and now have an openQRM environment up and running based on the latest Fedora Core 5. Please be sure to remove the install-parameters from the filesystem image configuration. If not, it will reinstall again on the next start up. (setting INSTALL_IMAGE=false is enough) I hope this document was useful and helps you to understand the advantages of openQRM — especially for server imaging and virtualization via Iscsi-SAN storages. Key URL: Iscsi Enterprise target - http://iscsitarget.sourceforge.net
|