Working with NFS and iSCSI Filesystem Images
Filesystem Images
You must
create one or more filesystem images to run on your QRM nodes.
Filesystem Images live on your NFS or iSCSI server.
We must define this server in openQRM by creating a Storage
Server using the GUI or via the command line. Please see the Storage Server creation instructions for further details on how to do this.
Note that after you create the definition of the image within openQRM,
that changes to this will not affect the image in storage. For
example, if you clone the image definition, you still need to clone the
storage data on the server. These definitions are like pointers
that openQRM and the managed resources will use to connect to the
central storage during the provisioning life cycle.
Creating a NFS Filesystem Image
openQRM can
capture filesystem images from running linux machines in your network.
The easiest way to create your first filesystem image is to capture the
filesystem on the openQRM server itself and put it in NFS storage. The
time it takes to create a filesystem image creation depends on
multiple factors. For a relatively simple filesystem image
less than
three Gigabytes in size, allow about one hour.
To create a NFS filesystem image from your openQRM
server, follow these steps:
- Be sure you
have created a openQRM Storage Server using the GUI or CLI.
- Create the
filesystem image using the CLI
- Run '
qrm-filesystem-image create' for help using CLI
options.
- For example, you might run '
qrm-filesystem-image create
--filesystem-image redhatAS3U6 -l localhost:/ -t mynfsserver:/fs-images/redhatAS3U6'
Some qrm-filesystem-image CLI options explained:
Note that qrm-filesystem-image is only used to create NFS filesystem images.
Network interfaces
- If
the system from which you are creating the new application image has
network interfaces configured, you may wish to configure new interfaces
for the new image, or you may prefer to keep these configurations.
- To continue
using the interfaces configured on the source system, run the
qrm-filesystem-image
create command with the optional --keep-network
option.
Services
You
may wish to configure new services for the new image, or you may prefer
to keep the services that are configured for the source file system.
For example, if httpd is running on the server from which you are
creating the application image, but you do not need httpd in the new
application image, you might want to create the new image without
services.
Create the image from a file system on a
remote machine
You can
create a new filesystem image from filesystems running on another
server on the network. To do so, change the -l flag from qrm-cli
to give the ip address and path from the remote server. We then
use the CLI similar to before to create the filesystem image.
- On the QRM
server, run this command:
qrm-filesystem-image create
--filesystem-image redhatAS3U6 -l 10.1.1.2:/ -t mynfsserver:/fs-images/redhatAS3U6
Creating an iSCSI Filesystem Image
openQRM has support for two different types of iSCSI
implementations. The first is software iSCSI initiated, and the
second is hardware initiated iSCSI. More information about the
software initiated iSCSI implementation can be found here.
More information on the hardware initiated iSCSI can be found
below in the installation section. iSCSI images can either be
created through the automatic filesystem
creation process upon a reboot of the source system, or in the case of
a hardware HBA by doing a
direct installation to the iSCSI LUN via the HBA.
The following steps talk about the client configuration needed for
iSCSI, but doesn't mention the server implementation details since
openQRM does not ship with an iSCSI target. You should be able to
use any target that conforms to the iSCSI specifications whether it is
hardware, software, opensource or commercial. Some of these
implementations will require some extra steps to manage the server
configuration.
Automatic filesystem creation
Some
additional options for automatically creating a filesystem exist
for NFS and iSCSI (software initiated). Please see the instructions for NFS and iSCSI automatic image creation for more details.
iSCSI HBA (hardware initiated) installation
If you have a iSCSI HBA card, you can install to the iSCSI LUN
directly as if it's a local drive. When you use the HBA card, the
operating system sees the iSCSI drive as a local so it is no different
than installing an operating system like normal (e.g. depending on the
OS the drive will look like /dev/sda or C:). After the OS
installation, you'll need to install the openQRM agent into the image.
The following outlines these steps.
- Create a Storage server definition with the iScsi_hw type.
- Configure the HBA to connect to the iSCSI target you have
configured to serve these nodes. This may involve changing the
BIOS of the HBA to point to the IP and LUN you wish to connect to.
- Download the drivers for your OS if they are not included in the
distribution, and put them on some type of installation media (like a
floppy disk).
- Reboot the system and start the installation
- Both Windows and Linux should prompt you for the option to
install extra drivers. You should load the drivers downloaded in
step 2, and then complete the OS installation.
- Reboot the system into the OS and login and install the agent software for your OS (detailed instructions below)
- Shutdown the installation node.
Instructions for installing the openQRM agent for Windows
- For windows, you'll need to install the
openqrm-win-plugin*rpm on the openQRM server, and this will give you the agent installation in a file $QRM_BASEDIR/qrm/plugins/win/install/qrminfod-win32.exe.
- Copy this to the windows installation system, and run the executable.
- Define the "Destination Folder" and click next.
- Enter the "QRM server IP Address" only. This should be the
IP address of the openQRM server that is installed on your network.
Click Next.
- Define "QRM username & password" and press Install.
Instructions for installing the openQRM agent for Linux
- Install the agent rpm
openqrm-core-resource*.rpm directly onto the installation system
- Edit the file
/opt/qrm/resource/etc/qrm-bootstrap.conf and change the QRMIP to point to the openQRM server that is installed on your network.
Filesystem Management
Viewing Available filesystem Images
You
can view the filesystems images that exist on the openQRM server in the
GUI management console.
- GUI
Management console: From the Management Tools menu item in the QRM management console, click Filesystem images to view application
images.
- CLI: Run the following command '
qrm-cli filesystem list'.
Cloning a Filesystem Image
After
you create an application image, you can create a duplicate copy of it
for other Virtual Environments to use. You can then modify
this filesystem image for your specific needs by mounting it directly
and chrooting into it, or by assigning it to a new Virtual Environment.
To copy a
filesystem image, follow these steps:
- Clone the
filesystem image definition within openQRM with the qrm-cli command.
The following is an example:
qrm-cli
filesystem clone --name <existing filesystem image name>
--new_name clone1 --identifier /openqrm-filesystem-images/webserver1
- On your
NFS server, manually copy the directory of the original filesystem
image to a directory with the new filesystem image name. The
following
is an example:
cp
-a /openqrm-filesystem-images/redhatAS3U6
/openqrm-filesystem-images/webserver1
Renaming a Filesystem Image
After you
create a filesystem image, you can use the management console or the
command line interface to rename it.
To rename a
filesystem image, follow these steps:
- Stop any
Virtual Environments that are running the filesystem image that is to
be renamed.
- From the
command line on the openQRM server use qrm-cli filesystem rename.
For example:
./qrm-cli
filesystem rename --name test-webserver --new_name production-webserver
- On the NFS
server, rename the directory containing the filesystem image to its new
name using the `mv` command.
-
On each
Virtual Environment, reassign the application image by its new name.
-
Restart each
Virtual Environment.
Deleting a Filesystem Image
You can
remove a filesystem image from your QRM server using the management
console or the command line interface.
To delete
an filesystem
image using the CLI, follow these steps:
- Stop all
Virtual Environments in which the filesystem
image is running.
- From the
command line on the openQRM server use qrm-cli filesystem rename.
For example:
./qrm-cli
filesystem delete --name webserver3
- On your NFS
server, manually delete the directory containing your filesystem image.
Testing Application Image Changes
The
user can test a modification to an existing environment without
disrupting a running production VE and have the ability to
easily
roll back the changes. To do so:
- Clone the
existing environment using techniques described above.
- Optionally,
you may want to create and use a new kernel image with your new
filesystem image. See the user manual for how to work with
kernel
images.
- Create a new
Virtual Environment for testing based on the newly-created
filesystem image (and optionally the new kernel image), and deploy it
to a new node.
- Log into
that Node - the IP address is shown in the node
status menu - and modify it to your needs.
- When the new
environment works properly stop your production VE and modify
it to use the new filesystem
image (and optionally the kernel image). Restart the VE.
- If it is
desirable to roll back the changes, you can modify the VE to its
original settings.