time flarcreate -n "Solaris 10 08/11 build" -S -c /export/home/S10-0811.ufs.archive.sun4u-`date '+%m-%d-%y'`
time flarcreate -n "Solaris 10 08/11 build" -S -c /export/home/S10-0811.zfs.archive.sun4u-`date +'%Y%m%d%H%M'
The "-n Solaris 10 08/1 build" implants a name into the FLAR image. The name should be something unique and meaningful to better identify it as the FLAR image for the system.
The "-x /export/home" option causes the /var/tmp/ directory and its contents to be excluded from the FLAR image since it will not be needed in the FLAR image.
-S option causes to skip the disk space check and do not write archive size data to the archive. Without -S, flarcreate builds a compressed archive in memory before writing the archive to disk, to determine the size of the archive. The result of the use of -S is a significant decrease in the time it takes to create an archive.
-c Tells flar to compress the archive as it's writing it.
flar info /export/home/S10-0811.ufs.archive.sun4u-`date '+%m-%d-%y'`
bash-3.2# flar info S10-0811.ufs.archive.sun4u-11-30-11
archive_id=61595792f86c6cd0dbc9fe68024a1312
files_archived_method=cpio
creation_date=20111130072225
creation_master=sukhoi.in.foo.com
content_name=Solaris 10 08/11 build
creation_node=sukhoi.in.foo.com
creation_hardware_class=sun4u
creation_platform=SUNW,Sun-Blade-2500
creation_processor=sparc
creation_release=5.10
creation_os_name=SunOS
creation_os_version=Generic_147440-01
files_compressed_method=compress
content_architectures=sun4u
type=FULL
Script to create a image
#!/bin/sh
echo
echo Enter image name, i.e. Solaris build e.g. S10-1811.ufs.archive.sun4v
read ANS
echo "Image Name: ${ANS}" > /etc/image_catalog
echo "Image Created on: `date`" >> /etc/image_catalog
echo "Image Created by: `/usr/ucb/whoami` on `hostname`" >> /etc/image_catalog
#
# Clean up wtmpx so that new machine won't have last logins
#
cat /dev/null > /var/adm/wtmpx
#
# Now create flar, excluding -x /var/tmp/
#
flarcreate -n ${ANS} -c -a `/usr/ucb/whoami` -x /var/tmp/ /var/tmp/${ANS}_`date +'%Y%m%d%H%M'`
Source net.
No comments:
Post a Comment