HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)
3.7 Administering File System Logical Volumes
This section describes special actions you must take when working with file systems inside logical
volumes. It addresses the following topics:
• “Creating a File System” (page 100)
• “Extending a File System” (page 101)
• “Reducing the Size of a File System” (page 102)
• “Backing Up a VxFS Snapshot File System” (page 104)
TIP: When dealing with file systems, you can use HP SMH or a sequence of HP-UX commands.
For most tasks, using HP SMH is quicker and simpler. You do not have to explicitly perform each
of the following distinct tasks; rather, proceed from the HP SMH Disk and File Systems area. HP
SMH performs all the necessary steps for you.
3.7.1 Creating a File System
When creating either an HFS or VxFS file system in a logical volume, you can use HP SMH or a
sequence of HP-UX commands. If you choose to use HP-UX commands directly, the following list
describes the subtasks for creating a file system.
1. If you create a new file system of a type other than HFS, you might need to reconfigure the
new type into the kernel. Normally, VxFS has been configured into the kernel as part of the
default configuration. See HP-UX System Administrator's Guide: Configuration Management
for information on how to add a file system type.
2. Estimate the size required for the logical volume. To estimate the size requirements for a logical
volume containing a file system, see “Setting Up Logical Volumes for File Systems” (page 24).
3. Determine if there is sufficient disk space available in the volume group. Use the vgdisplay
command to calculate this information, as described in “Creating a Logical Volume” (page 55).
If there is not enough space within the volume group, you can add a disk to the volume group,
as described in “Adding a Disk to a Volume Group” (page 54).
4. Create the logical volume. Use lvcreate, as described in “Creating a Logical Volume”
(page 55).
5. Create the file system using the character device file. For example:
# newfs -F fstype /dev/vg02/rlvol1
If you do not use the -F fstype option, then newfs creates a file system based on the
content of your /etc/fstab file. If there is no entry for the file system in /etc/fstab, then
the file system type is determined from the file /etc/default/fs. For information on
additional options, see newfs(1M).
When creating a VxFS file system, file names will be long automatically.
For HFS, use the -s or -l option to specify a file system with short or long file names,
respectively. By default, the length of file system names are consistent with those of the root
file system. Short file names are 14 characters maximum. Long file names allow up to 255
characters. HP recommends using long file names for flexibility; files created on other systems
that use long file names can be moved to your system without being renamed.
6. After you have created a file system, mount it for users to access it, and add it to /etc/fstab
so that it is automatically mounted at boot time.
100 Administering LVM