|
|
|
openQRM 3.1 manual filesystem image creation using external NFS |
PDF
|
| Print |
|
DescriptionThe manual-image-creation is used to created nfs-filesystem-images. It is initiated on the openQRM server by the qrm-filesystem-image script and creates filesystem-images on a remote nfs-storage server from either the local system (the openQRM server itself), from a remote system (any "reachable" system) or any other location containing a root-filesystem of a linux system.
UsageUsage ./qrm-filesystem-image <create/clone/remove/validate/list>
./qrm-filesystem-image create -s/--filesystem-image <image-name> -t/--target <storage-server-name:/full-path/image-name> -l/--location <hostname:/rootfs-location> [-u/--username <username>] mandatory unless -o flag used [-p/--password <password>] mandatory unless -o flag used [--private-exclude <private-excludes>] [--private-add <private-adds>] [-e/--exclude <exclude-directory>] [-a/--arch <Opteron|Any|Xeon|i686>] [--keep-services] [--remove-services] [--keep-network] [--remove-network] [--hostname <hostname>] [-o/--only-physical] [--shared] [--operation-system <operation-system>] [-h/--help]
CreateThe "create" option is used to create a new filesystem image on a nfs-storage server.
requried parameters:
- -s/--filesystem-image <image-name>
<image-name> is the name for the image to create. Can be any name containing alpha-numeric signs only (+ '_')
- -t/-target <storage-server-name:/full-path/image-name>
This is the nfs-storage server ip-address and path to the image-locatation where the image should be created/located. The syntax of this parameter is "ip-address:path" e.g. 192.168.100.200:/diskimages/my_image Please notice that the storage server has to be created/defined in the QRM-server before! (the storage-server name is needed for the next paramter).
- -l/--location <hostname:/rootfs-location>
<hostname:/rootfs-location> is the name/ip + rootfs-location of the source server from which the new image should be created. The system to create the image from (the one with the ip given as <hostname:/rootfs-location>) must have the sshd-daemon running. optional parameters:
- -e/--exclude <exclude-directory>
Directories on the source system to exclude from the transfer/copying phase e.g. -e /home/myhome will exclude the /home/myhome dir during image-copying.
- --private-add <private-adds>
Directories on the later filesystem image which should be "private" to the node the image is running on. e.g. an image is planned to be used as "shared" (multiple nodes will run it simultaniously) but on every node the image runs on a directory <private-adds> should be uniq and separated by node-id and vs-id. Each node will have its own (separated) <private-adds> directory.
- --private-exclude <private-exclucdes>
Directories inside the <private-adds> directory which should be excluded from the "private" mechansim. e.g. having /home as <private-adds> and exclude /home/myhome means that every node has a private /home directory but the /home/myhome directy is global on all nodes.
- -a/--arch <architecture> Tags the filesystem image architecture flag in the QRM-server. Can be e.g. i686
- --keep-services/--remove-services/--remove-network/--keep-network removing or keeping the configuration of the filesystem-image
- --hostname <hostname> sets the hostname of the filesystem-image to <hostname>
- -o/--only-physical creates the filesystem-image only physical
- --shared creates the filesystem-image with setting the shared flag
- -operation-system <operation-system> set the operation-system type in the openQRM-server
Validate
The "validate" option is used to check an existing filesystem image and eventuelly to re-run the preparation-phase of the image-creation with the -f/--fix cmdline parameter. With the -f/--fix parameter the script just applies the (very minor but needed) changes to the existing image to work as an nfsroot filesystem.
qrm-filesystem-image validate
-t/--target <storage-server-ip:/full-path/image-name> [-l/--location <hostname:/rootfs-location>] [-f/--fix] [-h/--help]
requried parameters :
- -t/--target <storage-server-ip:/full-path/image-name> (Same as explained above)
optional parameters :
- -l/--location <hostname:/rootfs-location> (Same as explained above)
Re-runs the preparation phase of the image-creation on an existing image.
Technical Details
The image creation script "qrm-filesystem-image" manages nfsroot-filesystem images. According to the given parameters it mounts the remote nfs-storage server image location (where the image should be created) and transfers the root-filesystem content of the given "source" parameter to the nfs-mount. This copying procedure is done by "rsync".
The remote system must have the sshd-daemon running and its root-password is needed to initiate the image creation.
After the image is copied to the nfs-storage server the script applies only very minor changes to the new created image which are :
- creating the following (empty) dirs because they are not copied:
proc, /mnt/floppy, /mnt/cdrom, /tmp
- removing logfiles from /var/log/*
(and eventual existing /etc/qrm/easymigration.conf file)
- linking /proc/mounts to /etc/mtab (for "df" to work)
- disable the kudzu service (hardware detection)
- add qrm runlevel to /etc/inittab
- care about private-, shared- and exclude-directories according cmdline parameters
When the image copying + preparation phase is finished the script sends an event to the QRM-server to create the new filesystem-image in the database.
Knowledge Base / Known Issues
- The manual image-creation can only be used for nfsroot-filesystem images.
- ISCSI-filesystem images can only be created with the "automatic image-creation".
|
|