In this we will create mount point with name /ora00
a) Use lsblk command to find out which disk was added to Server
[root@TESTING ~]$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 30G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 29.5G 0 part ├─rhel-root 253:0 0 27.5G 0 lvm / └─rhel-swap 253:1 0 2G 0 lvm [SWAP] sdb 8:16 0 10G 0 disk sr0 11:0 1 1024M 0 rom
As you can see in above output disk sdb was added of size 10G.
b) Now you have to make directory ora00 for which we will use ora00 command.
[root@TESTING ~]# mkdir /ora00
c) Once directory is created we will create physical volume by command pvcreate.
[root@TESTING ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created
d) Now we will create volume group:
Volume groups are nothing but a pool of storage that consists of one or more physical volumes.
Once physical volume is created we can create volume group from that physical volume
[root@TESTING ~]# vgcreate vg_ora00 /dev/sdb Volume group "vg_ora00" successfully created
e) Now we will create Logical volume of size 9.7 GB from that Volume group:
[root@TESTING ~]# lvcreate -L 9.7G -n lv_ora00 vg_ora00 Rounding up size to full physical extent 9.70 GiB Logical volume "lv_ora00" created.
f) Now we will create ext4 filesystem on that logical volume:
[root@TESTING ~]# mkfs.ext4 /dev/vg_ora00/lv_ora00 mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 636480 inodes, 2543616 blocks 127180 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=2151677952 78 block groups 32768 blocks per group, 32768 fragments per group 8160 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
g) Once that is done we can have to mount /ora00 directory.
[root@TESTING ~]# mount /dev/vg_ora00/lv_ora00 /ora00 Now you can confirm above directory with below mentioned command:-- [root@TESTING ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 28G 3.3G 25G 13% / devtmpfs 1.9G 0 1.9G 0% /dev tmpfs 1.9G 84K 1.9G 1% /dev/shm tmpfs 1.9G 8.9M 1.9G 1% /run tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/mapper/vg_ora00-lv_ora00 9.5G 37M 8.9G 1% /ora00
h) For making those change permanent you have to add this entry in fstab file :-
[root@TESTING ~]$ cat /etc/fstab # # /etc/fstab # /dev/mapper/rhel-root / xfs defaults 0 0 UUID=92aebe3b-0927-4ad6-9992-752de4cf2f5f /boot xfs defaults 0 0 /dev/mapper/rhel-swap swap swap defaults 0 0 /dev/mapper/vg_ora00-lv_ora00 /ora00 ext4 defaults 1 2