I. Establishment of LVM
1. Generate PV Information
#pvcreate-F/dev/rdsk/c0t3d0
#pvcreate-F/dev/rdsk/c0t4d0
2. #mkdir/dev/vg02
3. #vgcreate/dev/vg02/dev/dsk/c0t3d0/dev/dsk/c0t4d0
Description: The meaning of this command is to create VG02, and c0t3d0 and c0t4d0 these two hard drives, of course, you can also include a hard disk, the next time you need to expand the second hard disk, the operation is as follows:
#vgcreate/dev/vg02/dev/dsk/c0t3d0
#vgextend/dev/vg02/dev/dsk/c0t4d0 (This command is to extend the second hard drive to VG02)
4.lvcreate-l N my_lvol1 vg02
The name of the logical volume is defined with the n parameter. If we don't use the-l parameter to specify the size of the logical volume, the default size is 0M, which sometimes brings convenience to our work, such as when doing mirror, first specify the size of the logical volume of 0, so that the speed of synchronization will be very fast, synchronized later to expand the logical volume.
5.newfs-f Vxfs-o Largefiles/dev/vg02/rlvol1
Note: the-f parameter specifies the file system type, where the VxFS file system is what we often say the Jfs file system, O used to specify the file system to support large format files, that is, supporting a single file greater than 2G file system, otherwise, in the future with the file-especially the database file-the increase There is a good chance of problems. Also, if the database files are in bare files, do not do this step.
6.mkdir/vg02_lvol1
7. Mount/dev/vg02/lvol1/vg02_lvol1
Second, extended file system
1. #lvextend-L 200/dev/vg02/lvol1
2. #umount/dev/vg02/lvol1
3. #extendfs-F Vxfs/dev/vg01/lvol2