HP Visualize c3600 IRIX to HP-UX Migration Guide - Page 35
vgdisplay, PE Size, Free PE, pvcreate, vgextend, vgcreate, lvcreate, newfs, etc/fstab, etc/default/
View all HP Visualize c3600 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 35 highlights
Disks and File Systems You can create a file system within either 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 (which deal with logical volumes only) below. 1. Estimate the size required for the logical volume. 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. 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. To add a disk to an existing volume group, use pvcreate and vgextend. You can also add a disk by creating a new volume group with pvcreate and vgcreate. 4. Create the logical volume. Use lvcreate to create a logical volume of a certain size in the above volume group. Create the new 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 (for file system type) 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 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 the -L option. When creating a VxFS file system, file names will automatically be long. 5. Once you have created a file system, you will need to mount it in order for users to access it. Mounting file systems You can use either SAM or HP-UX commands to mount file systems. If you use SAM, proceed from SAM's Disks and File Systems area menu. You can perform the necessary tasks as part of creating your file system, as already described. For help in mounting files using SAM, see SAM's online help. This section concentrates on using HP-UX commands to mount file systems. To mount a local file system: 1. Choose an empty directory to serve as the mount point for the file system. Use the mkdir command to create the directory if it does not currently exist. For example, enter: # mkdir /joe 2. Mount the file system using the mount command. Use the block device file name that contains the file system. You will need to enter this name as an argument to the mount command. For example, enter: # mount /dev/vg01/lvol1 /joe NOTE: If you are not using logical volumes, you may need to enter ioscan -fn to determine which block device file name to use. If the block device file does not exist, you will need to create it using insf or mksf. 30