Les nouvelles fonctions des VIOs ou des HMC nécessitent maintenant de travailler avec des images ISO.

Or, la plupart des serveurs possèdent des sauvegardes MKSYSB.

Heureusement, la commande 'mkcd' permet de transformer une image MKSYSB(Un fichier défini par son nom absolu) en un fichier ISO utilisable comme un DVD virtuel.

Ainsi, en lançant la commande suivante :

# mkcd -m /nim/images/mksysb_serveur1_backupios -S -I /nim/image/ -R -L

(A noter que le système créé un système de fichiers '/mkcd/cd_fs' dans 'rootvg' et celui-ci doit disposer de suffisament de place pour générer un fichier ISO.

Le serveur va créer en quelques minutes un ou plusieurs fichiers ISO d'une taille maximum de 4,2Go, portant le nom '/nim/image/cd_image_18284590.vol1'

Ces images vont pouvoir ensuite être utilisées à partir d'un serveur, dans les lecteurs VOPT, ou depuis la HMC.

Il faut que  ces fichiers soient placés dans le répertoire donné par 'lsrep', en général '/var/vio/VMLibrary' pour être monté à l'aide de la commande 'loadopt -disk nom_imageiso -vtd vtopt0'.

 

Il est également possible de travailler avec la commande 'mkdvd' dont la syntaxe serait :

mkdvd  -S -m /var/vio/VMLibrary/mksysb.OK.server517 -I /core/

Initializing mkdvd log: /var/adm/ras/mkcd.log...

 

 

 

Ci-dessous la documentation officielle en V6.1

 


Purpose

       Creates multi-volume CDs from a mksysb, savevg, or savewpar backup image.

Syntax

       mkcd -r directory | -d cd_device | -S [ -m mksysb_image | -M mksysb_target | -s savevg_image | -v
       savevg_volume_group | -w savewpar_image | -W wparname ] [ -C cd_fs_dir ] [ -I cd_image_dir ] [ -V cdfs_volume_group
       ] [ -B ] [ -p pkg_source_dir ] [ -R | -S ] [ -i image.data ] [ -u bosinst.data ] [ -f wparspecificationfile ] [ -e ]
       [ -P ] [ -l package_list ] [ -L ][ -b bundle_file ] [ -z custom_file ] [ -D ] [ -U ] [ -Y ] [ -n ] [ -a ] [ -A ] [
       -c ] [-Z] [ -N ]

Description

       The mkcd command creates a system backup image (mksysb) to CD-Recordable (CD-R) or DVD-Recordable (DVD-R, DVD-RAM) from the system rootvg or from a previously created mksysb image. It creates a volume group backup image (savevg) to  CD-R from a user-specified volume group or from a previously created savevg image. It also creates the backup image  of a workload partition (savewpar) to CD or DVD from a user-specified workload partition or from a previously created savewpar image.

       Note: If the system has a multibos environment where both instances are mounted, the only way to restore the backup is by using the alt_disk_mksysb command.

       For DVD media, system backups made with the mkcd command have a limitation in that they expect the media to be 4.7 GB or larger per side. The mkcd command does not process the next volume until it writes over 4 GB on the current  volume, thus the use of smaller media would result in corruption when going beyond the capacity of the media.

       When a bootable backup of a root volume group is created, the boot image reflects the currently running kernel. If the current kernel is the 64-bit kernel, the backup boot image is also 64 bit, and it only boots 64-bit systems. If the current kernel is a 32-bit kernel, the backup boot image is 32 bit, and it can boot both 32-bit and 64-bit systems.

       With the mkcd command, you can create bootable and non-bootable CDs in Rock Ridge (ISO9660) or UDF (Universal Disk  Format) format.

       See the -L flag for details about creating DVD-sized images. What applies to CDs also applies to DVDs, except where noted.

       Note: The functionality required to create Rock Ridge format CD images and to write the CD image to the CD-R, DVD-R  or DVD-RAM device is not part of the mkcd command. You must supply additional code to mkcd command to do these tasks. The code is called using shell scripts and then linked to /usr/sbin/mkrr_fs (for creating the Rock Ridge format image) and /usr/sbin/burn_cd (for writing to the CD-R device). Both links are called from the mkcd command.

       Some sample shell scripts are included for different vendor-specific routines. You can find these scripts in
       /usr/samples/oem_cdwriters.

       If you do not supply any file systems or directories as command parameters, the mkcd command creates the necessary file systems and removes them when the command finishes executing. File systems you supply are checked for adequate space and write access.

       Note:
       1    While the mkcd command is running, ensure that system activity is minimal.
       2    If the mkcd command creates file systems in the backup volume group, they are excluded from the backup.

       If you need to create multi-volume CDs because the volume group image does not fit on one CD, the mkcd command gives instructions for CD replacement and removal until all the volumes have been created.

Flags

       Item
            Description
       -a
            Does not back up extended attributes or NFS4 ACLs.
       -A
            Backs up DMAPI file system files.
       -b bundle_file
            Gives the full path name of the file containing a list of filesets to be installed after the mksysb is
            restored. This file is copied to ./usr/sys/inst.data/user_bundles/bundle_file in the CD file system and also
            copied to RAM in case the CD is unmounted. The file would be listed as
            BUNDLES=/../usr/sys/inst.data/user_bundles/bundle_file in the bosinst.data file.
       -B
            Prevents the mkcd command from adding boot images (non-bootable CD) to the CD. Use this flag if creating a
            mksysb CD that you will not boot. Before installing the non-bootable mksysb CD, you must boot a same level
            (V.R.M.) product CD. The mkcd command defaults to creating a bootable CD for the machine type of the source
            system. See Notes for details.
       -c
            Does not compress or pack files as they are backed up.
       -C cd_fs_dir
            Specifies the file system used to create the CD file system structure, which must have at least 645 MB of available disk space (up to 4.38 GB for DVD sized images). The CD image only consumes as much room as necessary  to contain all the data on the CD.

            If you do not specify the -C flag and the /mkcd/cd_fs directory exists, the mkcd command uses that directory.
            If you do not specify the -C flag and the /mkcd/cd_fs directory does not exist, the mkcd command creates the
            file system /mkcd/cd_fs and removes it when the command finishes executing. The command creates the file system in the volume group indicated with the -V flag, or rootvg if that flag is not used. Each time you invoke the  mkcd command, a unique subdirectory (using the process id) is created under the /mkcd/cd_fs directory, or in the directory specified with the -C flag.

            Note: If performing DVD sized backups, the file systems need to be large file enabled. This also requires
            setting the file ulimit size to unlimited.


       -d cd_device
            Indicates the CD-R, DVD-R, or DVD-RAM device (/dev/cd1, for instance). This flag is required unless you use the
            -S flag.
       -D
            Turns on the debug output information feature. The default is no debug output.
       -e
            Excludes the files and directories from the backup image listed in the /etc/exclude.volume_group file. You
            cannot use this flag with the -m or -s flags.
       -f wparspecificationfile
            Specifies the user-supplied WPAR specification file. This specification file of workload partition takes
            precedence over the wpar.spec file in the savewpar image. If you do not use the -f flag, the mkcd command restores the wpar.spec file from the given savewpar image, or generates a new wpar.spec file during the
            creation of savewpar.
       -i image.data
            Specifies the user-supplied image.data file. This data file takes precedence over the image.data file in the
            mksysb image. If you do not give the -i flag, then mkcd restores the image.data from the given mksysb image, or
            generates a new image.data file during the creation of mksysb.

            Note: The -i flag cannot be used to specify a user-supplied vgname.data file for use with a savevg image.
       -I cd_image_dir
            Specifies the directory or file system where the final CD images are stored before writing to the CD-R, DVD-R,
            or DVD-RAM device. If this flag is not used, mkcd uses the /mkcd/cd_images directory if it already exists. If
            not, the command creates the /mkcd/cd_images file system in the volume group given with the -V flag, or in
            rootvg if that flag is not used.

            If the mkcd command creates the file system, it is removed upon command completion, unless either the -R or -S
            flag is used. If the -R or -S flag is used, consideration must be made for adequate file system, directory, or
            disk space, especially when creating multi-volume CDs. The CD image only consumes as much room as necessary to
            contain all the data on the CD.

            Note: If performing DVD sized backups, the file systems need to be large file enabled. This also requires
            setting the file ulimit size to unlimited.
       -l package_list
            Specifies the file containing a list of additional packages you want copied to the ./usr/lpp/inst.images
            directory of the CD file system. The images are copied from the location named with the -p flag. If you use the
            -l flag you must also use the -p flag.
       -L
            Creates final CD images that are DVD sized (up to 4.38 GB).
       -m mksysb_image
            Specifies a previously created mksysb image. If you do not specify the -m flag, the mkcd command calls mksysb.
            (See the -M flag for more information about where the mksysb image is placed.)
       -M mksysb_target
            States the directory or file system where the mksysb or savevg image is stored if a previously created backup
            is not given with the -m or -s flags. If the -M flag is not used and a mksysb or savevg image is not provided,
            the mkcd command verifies that /mkcd/mksysb_image exists. If the directory does not exist, then the mkcd
            command creates a separate file system, /mkcd/mksysb_image, where the mksysb or savevg images are temporarily
            stored. The command creates the file system in the volume group given with the -V flag, or in rootvg if that
            flag is not used.

            Note: If performing DVD sized backups, the file systems need to be large file enabled. This also requires
            setting the file ulimit size to unlimited.
       -n
            Backs up user volume group information and administration data files. This backs up files such as
            /tmp/vgdata/vgname/vgname.data and map files, if any exist. This does not back up user data files. This backup
            can be used to create a user volume group without restoring user data files. This cannot be done to rootvg.
       -N
            Includes file systems that belong to a workload partition (WPAR) in the defined state in the system backup.

            Note: To be included in the backup, all file systems that belong to a WPAR in the defined state need to be in
            the rootvg volume group.
       -p pkg_source_dir
            Names the directory or device that contains device and kernel package images. The device can only be a CD
            device (for example, /dev/cd0). If you use the same CD-R, DVD-R, or DVD-RAM device that you gave with the -d
            flag, the product CD media must be inserted into the CD-R drive first. The mkcd command then prompts you to
            insert the writeable CD before the actual CD creation.
       -P
            Creates physical partition mapping during the mksysb or savevg creation. You cannot use this flag with the -m
            or -s flags.
       -r directory
            Indicates existing directory structure to burn onto a CD or DVD. This makes a CD image that is a copy of the
            given directory structure.
       -R
            Prevents the mkcd command from removing the final CD images. mkcd defaults by removing everything that it
            creates when it finishes executing. The -R flag allows multiple CD image sets to be stored, or for CD creation
            (burn) to occur on another system. If multiple volumes are needed, the final images are uniquely named using
            the process ID and volume suffixes.
       -s savevg_image
            Indicates a previously created savevg image. All savevg backup images are nonbootable. See Notes for details.
       -S
            Stops the mkcd command before writing to the CD-R, DVD-R, or DVD-RAM without removing the final CD images. The
            -S flag allows multiple CD sets to be created, or for CDs to be created on another system. The images remain in
            the directory marked by the -I flag, or in the /mkcd/cd_images directory if the -I flag is not used. If
            multiple volumes are required, the final images are uniquely named using the process ID and volume suffixes.

       -u bosinst.data
            Specifies the user-supplied bosinst.data file. This data file takes precedence over the bosinst.data file in
            the mksysb image. If you do not give the -u flag, then the mkcd command restores bosinst.data from the given
            mksysb image, or generates a new bosinst.data file during the creation of mksysb.
       -U
            Creates a UDF (Universal Disk Format) file system on DVD-RAM media. It does not require the amount of free
            space needed to create Rock Ridge format backups. It does not need the /mkcd/cd_fs and /mkcd/cd_images file
            systems. Therefore, the only temporary disk space it needs is to create the backup image that will be copied to
            the media. This means that the -I and -C flags do not apply to the -U flag. Because the backup is copied to the
            media, images cannot be created and burned later or on another system. So, the -R flag and -S flag do not apply
            when using the -U flag. You need to specify a device to write to with the -d flag. The -U flag does not use the
            /usr/sbin/mkrr_fs or /usr/sbin/burn_cd file systems.
       -v savevg_volume_group
            Denotes the volume group to be backed up using the savevg command. All savevg backup images are nonbootable.
            See Notes for details. (See the -M flag for more information about where the savevg image is placed.)
       -V cdfs_volume_group
            Indicates the volume group used when creating the file systems needed for the mkcd command. If the -V flag is
            not given and a file system is needed but not there (because it was not supplied with other flags), then rootvg
            is the default volume group for creating the file systems. If the mkcd command creates the file systems in the
            backup volume group, those file systems are not included as part of the backup image. mkcd-created file systems
            are removed upon completion of the command.
       -w savewpar_image
            Indicates a previously created savewpar image.
       -W wparname
            Denotes the workload partition to be backed up using the savewpar command.
       -Y
            Accepts licenses.
       -z custom_file
            States the full path name of the file to be copied to the root directory of the CD file system. This file could
            be a customization script specified in the bosinst.data file, such as CUSTOMIZATION_FILE=filename.

            For example: If the file my_script is in /tmp on the machine where the mkcd command is running, then enter
            -z/tmp/my_script and specify CUSTOMIZATION_FILE=my_script. The code copies the script to the root directory of
            the RAM file system before it executes.

       -Z
            Specifies that the Encrypted File System (EFS) information for all the files, directories, and file systems is
            not backed up.

            Note:
       1    If you are creating a non-bootable CD (using the -B flag), you cannot use the -p or -l flags.
       2    If you are creating a non-bootable CD with a savevg image (using the -s or -v flags), you cannot use the -p,
            -l, -u, -i, -z, or -b flags.

Examples
       1    To generate a bootable system backup to the CD-R device named /dev/cd1, enter:

            mkcd -d /dev/cd1
       2    To generate a system backup to the DVD-R or DVD-RAM device named /dev/cd1, enter:

            mkcd -d /dev/cd1 -L
       3    To generate a non-bootable volume group backup of the volume group myvg to /dev/cd1, enter:

            mkcd -d /dev/cd1 -v myv

            Note: All savevg backup images are non-bootable.
       4    To generate a non-bootable backup of the workload partition mywpar to /dev/cd1, enter:

            mkcd -d /dev/cd1 -W mywpar

            Note: All savewpar backup images are not bootable.
       5    To generate a non-bootable backup of the workload partition mywpar to /dev/cd1 from the previously generated
            savewpar image /wparbackups/mywpar.bff, enter:

            mkcd -d /dev/cd1 -w /wparbackups/mywpar.bff
       6    To create a CD or DVD that duplicates an existing directory structure such as:

            /mycd/a
            /mycd/b/d
            /mycd/c/f/g

            enter:

            mkcd -r /mycd -d /dev/cd1

            After mounting with mount -o ro /dev/cd1 /mnt, cd to /mnt; a find . -print command displays:

            ./a
            ./b
            ./b/d
            ./c
            ./c/f
            ./c/f/g

Files

       Item
            Description
       /usr/bin/mkcd
            Contains the mkcd command.

 

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone