| United States-English |
|
|
|
![]() |
HP-UX System Administration Tasks: HP 9000 > Chapter 4 Working with HP-UX File
Systems Creating a File System: Necessary Tasks |
|
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.
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. 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. 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. If there is not enough space within a volume group, you will need to add a disk to a volume group.
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). Use lvcreate to create a logical volume of a certain size in the above volume group. See lvcreate(1M) for details. Create a file system using the newfs command. Note the use of the character device file. For example:
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. Once you have created a file system, you will need to mount it in order for users to access it. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||