Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administration Tasks: HP 9000 > Chapter 4 Working with HP-UX File Systems

Creating a File System: Necessary Tasks

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

When creating either an HFS or VxFS file system, you can use SAM or a sequence of HP-UX commands. Using SAM is quicker and simpler.

The following provides a checklist of sub-tasks for creating a file system which is useful primarily if you are not using SAM.

If you use SAM, you do not have to explicitly perform each distinct task below; rather, proceed from SAM's "Disks and File Systems" area menu. SAM will perform all the necessary steps for you.

If you use HP-UX commands rather than SAM, many of the commands mentioned provide options not shown. Be sure to review the descriptions of the commands in the HP-UX Reference to see the options available.

NOTE: Make sure the disk(s) containing the file system is connected to your computer and configured into HP-UX; refer to Configuring HP-UX for Peripherals if you need further information.

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 will have already been configured into the kernel as part of the default configuration. See "Steps to Reconfigure the Kernel" in Chapter 1 if reconfiguration becomes necessary.)

You can create a file system either within a logical volume or on a non-LVM disk. However, using a logical volume is strongly encouraged.

If you decide not to use a logical volume when creating a file system, skip tasks 1 through 4 below, which deal with logical volumes only.

Task 1. Estimate the Size Required for the Logical Volume

To estimate the size needed for a logical volume that will contain a file system, see "What Size Logical Volume Does a File System Require?" in Chapter 3.

Task 2. Determine If Sufficient Disk Space Is Available for the Logical Volume within Its Volume Group

Use the vgdisplay command to calculate this information. vgdisplay will output data on one or more volume groups, including the physical extent size (under PE Size (Mbytes)) and the number of available physical extents (under Free PE). By multiplying these two figures together, you will get the number of megabytes available within the volume group. See vgdisplay(1M) for more information.

Task 3. Add a Disk to a Volume Group If Necessary

If there is not enough space within a volume group, you will need to add a disk to a volume group.

NOTE: For information on configuring the disk to your system and determining the physical address of the disk, see Configuring HP-UX for Peripherals.

To add a disk to an existing volume group, use pvcreate(1M) and vgextend(1M). You can also add a disk by creating a new volume group with pvcreate(1M) and vgcreate(1M).

Task 4. Create the Logical Volume

Use lvcreate to create a logical volume of a certain size in the above volume group. See lvcreate(1M) for details.

Task 5. Create the New File System

Create a file system using the newfs command. Note the use of the character device file. For example:

newfs -F hfs /dev/vg02/rlvol1

If you do not use the -F FStype option, by default, 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).

For HFS, you can explicitly specify that newfs create a file system that allows short file names or long file names by using either the -S or -L option. By default, these names will as short or long as those allowed by the root file system. Short file names are 14 characters maximum. Long file names allow up to 255 characters. Generally, you use long file names to gain flexibility in naming files. Also, files created on other systems that use long file names can be moved to your system without being renamed.

When creating a VxFS file system, file names will automatically be long.

NOTE: Floppy disk drives are installed on some HP-UX systems, including the Model 712 and Model E (Series 806). Unlike virtually all HP hard disks, which are initialized before shipping, you need to initialize floppy-disk media using mediainit(1) on the character device file.

If you decide to put your file system on a floppy disk, invoke the diskinfo command with the character device file to identify the model number of the floppy disk drive; for more information, see diskinfo(1M). Then use the model number as input to the newfs command. (Floppy disk drives do not support the use of LVM.)

Once you have created a file system, you will need to mount it in order for users to access it.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.