This is what I needed,
1. Add new disk
2. Create New pv, vg and lv as per below plan
Plan
/dev/mapper/PJR_sapvg1-USR_SAP_PJR /usr/sap/PJR/sapmnt/GJR 20Gb
/dev/mapper/PJR_sapvg1-SAPMNT_PJR /sapmnt/PJR/db2/db2gjr 20Gb
This is what I have done:
pvcreate /dev/sdc
vgcreate vg_GJR /dev/sdc
lvcreate -L 1G -n lv_usr_ORACLE_GJR vg_GJR
lvcreate -L 1G -n lv_ORACLEmnt_GJR vg_GJR
mkfs -t ext4 /dev/vg_GJR/lv_usr_sap_GJR
mkfs -t ext4 /dev/vg_GJR/lv_sapmnt_GJR
mkdir /usr/sap/GJR /sapmnt/GJR
mount /dev/vg_GJR/lv_sapmnt_GJR /usr/sap/GJR
mount /dev/vg_GJR/lv_sapmnt_GJR /sapmnt/GJR
At this point, I can see partitions in df -h output. I can create files in both /usr/sap/GJR and /sapmnt/GJR. I added entries in fstab.
Now, just for checking, I did this :
fdisk /dev/sdc
and created a new partiton like below:
Disk /dev/sdc: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdbc7821a
Device Boot Start End Blocks Id System
/dev/sdd1 1 14 112423+ 83 Linux
I rebooted the server, but now when I do mount -a , I am getting below error:
[root@localhost ~]# mount -a
mount: special device /dev/vg_GJR/lv_usr_ORACLE_GJR does not exist
mount: special device /dev/vg_GJR/lv_ORACLEmnt_GJR does not exist
I want to know why this happens and how to recover. This is just testing environment with no data. And what should I have done to recover this.