Identify Newly Added LUN. 2. Create Physical Volume (PV) 3. Create Volume Group (VG) 4. Create Logical Volume (LV) 5. Create File System 6. Mount File System 7. Entries in /etc/fstab File
Identify Newly Added LUN. 2. Create Physical Volume (PV) 3. Create Volume Group (VG) 4. Create Logical Volume (LV) 5. Create File System 6. Mount File System 7. Entries in /etc/fstab File
Here:
f:- Generate a full listing, displaying the module's class, instance number, hardware
path, driver, software state, hardware type, and a brief description.
n:- Generate a full listing, displaying the module's class, instance number, hardware
path, driver, software state, hardware type, and a brief description.
C:- strict the output listing to those devices belonging to the specified class.
N:- Display the agile view of the system hardware.
Below command shows the difference between persistent DFS and Legacy DSF. In
next steps we are going to use persistent DSF.
#ioscan –m dsf
/dev/disk/disk41:LVM_Disk=no
/dev/disk/disk42:LVM_Disk=yes
/dev/disk/disk43:LVM_Disk=yes
/dev/disk/disk44:LVM_Disk=yes
/dev/disk/disk45:LVM_Disk=yes
From the above output we are able to find disk41 is not used in LVM. So we proceed
with disk41. And cross check with the size of disk.
#diskinfo /dev/rdisk/disk41
Output suggests that it is the same size of disk for which we are looking for. So proceed
to next step.
Create Physical volume(PV)
A disk has to be initialized before LVM can use it.
#pvcreate /dev/rdisk/disk41
If disk41 already initialized before then you will get below error message
If you are sure the disk is free you can force the initialization using the -f option:
#pvcreate –f /dev/rdisk/disk41
# ll /dev/*/group
# mkdir /dev/vg03
Create the VG
#vgcreate -s 256 /dev/vg03 /dev/disk/disk41
If you have 2 or more PV to add in a VG, you can add them in one go, just adding next
to disk41 with a space.
#vgcreate –s 256 /dev/vg03 /dev/disk/disk41 /dev/disk/disk40
To display VG information
#vgdisplay -v /dev/vg03
Logical volume "/dev/vg03/lvol1" has been successfully created with character device
"/dev/vg03/lvol1"
Logical volume "/dev/vg03/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg03 has been saved in /etc/lvmconf/vg03.conf
To display LV information
# lvdisplay -v /dev/vg03/lvol1
F: - File system type either hfs or vxfs. Nowadays it is always recommended to use a
VxFS (=JFS) filesystem.
#mkdir /data
#bdf
#vi /etc/fstab