HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)

Backing Up a VxFS Snapshot File System
NOTE: Creating and backing up a VxFS snapshot file system requires that you have the optional
HP OnlineJFS product installed on your system. For more information, see HP-UX System
Administrator's Guide: Configuration Management.
VxFS enables you to perform backups without taking the file system offline 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. After you create the snapshot, you can back it up with
any backup utility except the dump command.
To create and back up a VxFS snapshot file system, follow these steps:
1. Determine how large the snapshot file system must be, and create a logical volume to contain
it. Use bdf to assess the primary file system size and consider the following:
Block size of the file system (1,024 bytes per block by default)
How much the data in this file system is likely to change (HP recommends 15 to 20% of
total file system size)
For example, to determine how large to make a snapshot of lvol4, mounted on the /home
directory, 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, create a logical volume of eight blocks
(8 MB).
2. Use lvcreate to create a logical volume to contain the snapshot file system. For example:
# lvcreate -L 8 -n snap /dev/vg02
This creates an 8 MB logical volume called /dev/vg02/snap, which can contain a snapshot
file system of lvol4.
3. Create a directory for the mount point of the snapshot file system. For example:
# mkdir /tmp/house
4. Create and mount the snapshot file system. For example:
# mount -f vxfs -o snapof=/dev/vg00/lvol4 /dev/vg02/snap /tmp/house
In this example, a snapshot is taken of logical volume /dev/vg00/lvol4, contained in
logical volume /dev/vg02/snap, and mounted on /tmp/house.
5. Back up the snapshot file system with any backup utility except dump.
For example, use tar to archive the snapshot file system /tmp/house, ensuring that the files
on the tape have relative path names, as follows:
# cd tmp; tar cf /dev/rtape/tape0BEST house
Alternatively, the following vxdump command backs up a snapshot file system /tmp/house,
which has extent attributes:
# vxdump -0 -f /dev/rtape/tape0BEST /tmp/house
Administering Swap Logical Volumes
This section can be divided into two parts as follows:
Administering primary Swap Logical Volumes
Administering secondary Swap Logical Volumes
100 Administering LVM