HP-UX System Administrator's Guide: Routine Management Tasks HP-UX 11i v3 (B3921-90023, September 2010)
Backing Up a VxFS Snapshot File System
NOTE: Creating and backing up a VxFS snapshot file system requires that you have
the optional Veritas File System (HP OnLineJFS) product installed on your system.
The Journaled File System (JFS) enables you to perform backups without putting the
file system off-line. You do this by making a snapshot of the file system, a read-only
image of the file system at a moment in time. The primary file system remains online
and continues to change. Once you create the snapshot, you back it up with any backup
utility except dump.
How to Create and Back Up a VxFS Snapshot File System
1. Determine how large the snapshot file system needs to be, and create a logical
volume to contain it.
a. Use bdf to assess the primary file system size and consider the following:
• Block size of the file system (1024 bytes per block by default)
• How much the data in this file system is likely to change (15 to 20% of total
file system size is recommended)
For example, to determine how large to make a snapshot of lvol4, mounted
on /home, examine its bdf output:
# bdf /home
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol4 40960 38121 2400 94% /home
Allowing for 20% change to this 40 MB file system, you would want to create
a logical volume of 8 blocks (8 MB).
b. Use lvcreate to create a logical volume to contain the snapshot file system.
For example,
lvcreate -L 8 -n lvol1 /dev/vg02
creates an 8 MB logical volume called /dev/vg02/lvol1, which should be
sufficient to contain a snapshot file system of lvol4.
See lvcreate(1M) for syntax.
2. Make a directory for the mount point of the snapshot file system.
For example,
mkdir /tmp/house
3. Make and mount the snapshot file system.
In the following example, a snapshot is taken of logical volume /dev/vg00/
lvol4, contained in logical volume /dev/vg02/lvol1, and mounted on /tmp/
house:
136 Managing Systems