Objective:
Create /pgBIN, /pgDATA, /pgWAL, /pgBACKUP mountpoints in preperation for postgres installation.
>>> Report the disks assigned:
We assigned 1 disk of size 20G to this vm.
[root@10 ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b7b30
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 20971519 9436160 8e Linux LVM
Disk /dev/sdb: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x626472a8
Device Boot Start End Blocks Id System
/dev/sdb1 2048 8388607 4193280 8e Linux LVM
Disk /dev/sdc: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-root: 8585 MB, 8585740288 bytes, 16769024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-swap: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ostmpswpvg-ostmpswpvg--tmp00: 2097 MB, 2097152000 bytes, 4096000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ostmpswpvg-ostmpswpvg--swp00: 2097 MB, 2097152000 bytes, 4096000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Format the disk
[root@10 ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x273cc6b3.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039
Partition 1 of type Linux and of size 20 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@10 ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b7b30
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 20971519 9436160 8e Linux LVM
Disk /dev/sdb: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x626472a8
Device Boot Start End Blocks Id System
/dev/sdb1 2048 8388607 4193280 8e Linux LVM
Disk /dev/sdc: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x273cc6b3
Device Boot Start End Blocks Id System
/dev/sdc1 2048 41943039 20970496 8e Linux LVM
Disk /dev/mapper/centos-root: 8585 MB, 8585740288 bytes, 16769024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-swap: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ostmpswpvg-ostmpswpvg--tmp00: 2097 MB, 2097152000 bytes, 4096000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ostmpswpvg-ostmpswpvg--swp00: 2097 MB, 2097152000 bytes, 4096000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x273cc6b3.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039
Partition 1 of type Linux and of size 20 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@10 ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b7b30
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 20971519 9436160 8e Linux LVM
Disk /dev/sdb: 4294 MB, 4294967296 bytes, 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x626472a8
Device Boot Start End Blocks Id System
/dev/sdb1 2048 8388607 4193280 8e Linux LVM
Disk /dev/sdc: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x273cc6b3
Device Boot Start End Blocks Id System
/dev/sdc1 2048 41943039 20970496 8e Linux LVM
Disk /dev/mapper/centos-root: 8585 MB, 8585740288 bytes, 16769024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-swap: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ostmpswpvg-ostmpswpvg--tmp00: 2097 MB, 2097152000 bytes, 4096000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ostmpswpvg-ostmpswpvg--swp00: 2097 MB, 2097152000 bytes, 4096000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Report the physical volumes
[root@10 ~]# pvdisplay
--- Physical volume ---PV Name /dev/sda2
VG Name centos
PV Size <9.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2303
Free PE 0
Allocated PE 2303
PV UUID g4bogw-Jcoc-2zu7-RIqV-r1nQ-3jZ2-gL6sod
--- Physical volume ---
PV Name /dev/sdb1
VG Name ostmpswpvg
PV Size <4.00 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1023
Free PE 23
Allocated PE 1000
PV UUID mkrsFQ-FmN6-wWEb-vavK-7y1A-GwNv-rIph7K
>>> Create the physical volume
[root@10 ~]# pvcreate /dev/sdc1Physical volume "/dev/sdc1" successfully created.
>>> Display the pvs created
[root@10 ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size <9.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2303
Free PE 0
Allocated PE 2303
PV UUID g4bogw-Jcoc-2zu7-RIqV-r1nQ-3jZ2-gL6sod
--- Physical volume ---
PV Name /dev/sdb1
VG Name ostmpswpvg
PV Size <4.00 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1023
Free PE 23
Allocated PE 1000
PV UUID mkrsFQ-FmN6-wWEb-vavK-7y1A-GwNv-rIph7K
"/dev/sdc1" is a new physical volume of "<20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdc1
VG Name
PV Size <20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID YwGcDe-ITKp-toeF-2MRr-wjNJ-DZ8F-iNYyux
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size <9.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2303
Free PE 0
Allocated PE 2303
PV UUID g4bogw-Jcoc-2zu7-RIqV-r1nQ-3jZ2-gL6sod
--- Physical volume ---
PV Name /dev/sdb1
VG Name ostmpswpvg
PV Size <4.00 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1023
Free PE 23
Allocated PE 1000
PV UUID mkrsFQ-FmN6-wWEb-vavK-7y1A-GwNv-rIph7K
"/dev/sdc1" is a new physical volume of "<20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdc1
VG Name
PV Size <20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID YwGcDe-ITKp-toeF-2MRr-wjNJ-DZ8F-iNYyux
>>> Create the necessary vg
[root@10 ~]# vgcreate appvg /dev/sdc1
Volume group "appvg" successfully created
--- Volume group ---
VG Name appvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <20.00 GiB
PE Size 4.00 MiB
Total PE 5119
Alloc PE / Size 0 / 0
Free PE / Size 5119 / <20.00 GiB
VG UUID z7yXoU-EZxo-tffH-8vaK-1BNk-YfjN-jJ1VY9
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <9.00 GiB
PE Size 4.00 MiB
Total PE 2303
Alloc PE / Size 2303 / <9.00 GiB
Free PE / Size 0 / 0
VG UUID mjXQXu-MLRw-QpAj-sOcH-Xn8X-w4WX-xLl7a0
--- Volume group ---
VG Name ostmpswpvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <4.00 GiB
PE Size 4.00 MiB
Total PE 1023
Alloc PE / Size 1000 / <3.91 GiB
Free PE / Size 23 / 92.00 MiB
VG UUID KfLEOe-luOc-XQw3-iJFC-zDWs-V8ST-nnZfew
Volume group "appvg" successfully created
>>> Display the vg
[root@10 ~]# vgdisplay--- Volume group ---
VG Name appvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size <20.00 GiB
PE Size 4.00 MiB
Total PE 5119
Alloc PE / Size 0 / 0
Free PE / Size 5119 / <20.00 GiB
VG UUID z7yXoU-EZxo-tffH-8vaK-1BNk-YfjN-jJ1VY9
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <9.00 GiB
PE Size 4.00 MiB
Total PE 2303
Alloc PE / Size 2303 / <9.00 GiB
Free PE / Size 0 / 0
VG UUID mjXQXu-MLRw-QpAj-sOcH-Xn8X-w4WX-xLl7a0
--- Volume group ---
VG Name ostmpswpvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <4.00 GiB
PE Size 4.00 MiB
Total PE 1023
Alloc PE / Size 1000 / <3.91 GiB
Free PE / Size 23 / 92.00 MiB
VG UUID KfLEOe-luOc-XQw3-iJFC-zDWs-V8ST-nnZfew
>>> Activate the vg
[root@10 ~]# vgchange -a y appvg
0 logical volume(s) in volume group "appvg" now active
>>> Create necessary logical volumes (lvs):
[root@10 ~]# lvcreate -L 4000 appvg -n appvg-pgbin00
Logical volume "appvg-pgbin00" created.
[root@10 ~]# lvcreate -L 4000 appvg -n appvg-pgdata00
Logical volume "appvg-pgdata00" created.
[root@10 ~]# lvcreate -L 2000 appvg -n appvg-pgwal00
Logical volume "appvg-pgwal00" created.
[root@10 ~]# lvcreate -L 6000 appvg -n appvg-pgbackup00
Logical volume "appvg-pgbackup00" created.
0 logical volume(s) in volume group "appvg" now active
>>> Create necessary logical volumes (lvs):
[root@10 ~]# lvcreate -L 4000 appvg -n appvg-pgbin00
Logical volume "appvg-pgbin00" created.
[root@10 ~]# lvcreate -L 4000 appvg -n appvg-pgdata00
Logical volume "appvg-pgdata00" created.
[root@10 ~]# lvcreate -L 2000 appvg -n appvg-pgwal00
Logical volume "appvg-pgwal00" created.
[root@10 ~]# lvcreate -L 6000 appvg -n appvg-pgbackup00
Logical volume "appvg-pgbackup00" created.
>>> Report the lvs:
[root@10 ~]# lvdisplay--- Logical volume ---
LV Path /dev/appvg/appvg-pgbin00
LV Name appvg-pgbin00
VG Name appvg
LV UUID bSqUE3-x1Gc-df4k-rv2t-emmp-VE2L-V2feou
LV Write Access read/write
LV Creation host, time 10.0.2.4, 2022-10-16 21:22:27 +0530
LV Status available
# open 0
LV Size <3.91 GiB
Current LE 1000
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:4
--- Logical volume ---
LV Path /dev/appvg/appvg-pgdata00
LV Name appvg-pgdata00
VG Name appvg
LV UUID Mt6ZCm-2N42-pXMQ-Eb7e-wHmT-igYW-oXF5K8
LV Write Access read/write
LV Creation host, time 10.0.2.4, 2022-10-16 21:22:37 +0530
LV Status available
# open 0
LV Size <3.91 GiB
Current LE 1000
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:5
--- Logical volume ---
LV Path /dev/appvg/appvg-pgwal00
LV Name appvg-pgwal00
VG Name appvg
LV UUID Myenhr-8dC1-D0sj-85GK-HibR-P8P0-oZdc3R
LV Write Access read/write
LV Creation host, time 10.0.2.4, 2022-10-16 21:22:53 +0530
LV Status available
# open 0
LV Size 1.95 GiB
Current LE 500
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:6
--- Logical volume ---
LV Path /dev/appvg/appvg-pgbackup00
LV Name appvg-pgbackup00
VG Name appvg
LV UUID 01SNiI-wEZh-R7ne-Ji22-GQrA-qnEQ-CWvlIJ
LV Write Access read/write
LV Creation host, time 10.0.2.4, 2022-10-16 21:23:07 +0530
LV Status available
# open 0
LV Size <5.86 GiB
Current LE 1500
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:7
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID R7ItvU-RZST-gGIh-PwJW-jukf-27Nl-c62eDf
LV Write Access read/write
LV Creation host, time localhost, 2022-10-14 11:18:28 +0530
LV Status available
# open 0
LV Size 1.00 GiB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID F7ESm7-w49Z-PhZS-ydAy-otg4-3PzY-hvAurG
LV Write Access read/write
LV Creation host, time localhost, 2022-10-14 11:18:30 +0530
LV Status available
# open 1
LV Size <8.00 GiB
Current LE 2047
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
--- Logical volume ---
LV Path /dev/ostmpswpvg/ostmpswpvg-tmp00
LV Name ostmpswpvg-tmp00
VG Name ostmpswpvg
LV UUID sqdk8r-dxfH-BR4l-5UvA-Nq4m-jv9q-kjKf22
LV Write Access read/write
LV Creation host, time 10.0.2.4, 2022-10-16 18:37:26 +0530
LV Status available
# open 1
LV Size 1.95 GiB
Current LE 500
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:2
--- Logical volume ---
LV Path /dev/ostmpswpvg/ostmpswpvg-swp00
LV Name ostmpswpvg-swp00
VG Name ostmpswpvg
LV UUID a2eAP1-Ie07-5EmQ-Rfkg-qDl1-SmSc-n6Lq9m
LV Write Access read/write
LV Creation host, time 10.0.2.4, 2022-10-16 18:38:06 +0530
LV Status available
# open 2
LV Size 1.95 GiB
Current LE 500
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:3
>>> Format the lvs created with the filesystem format of interest
[root@10 ~]# mkfs.xfs /dev/appvg/appvg-pgbin00
meta-data=/dev/appvg/appvg-pgbin00 isize=512 agcount=4, agsize=256000 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=1024000, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@10 ~]# lvdisplay|grep "LV Path"
LV Path /dev/appvg/appvg-pgbin00
LV Path /dev/appvg/appvg-pgdata00
LV Path /dev/appvg/appvg-pgwal00
LV Path /dev/appvg/appvg-pgbackup00
LV Path /dev/centos/swap
LV Path /dev/centos/root
LV Path /dev/ostmpswpvg/ostmpswpvg-tmp00
LV Path /dev/ostmpswpvg/ostmpswpvg-swp00
[root@10 ~]# mkfs.xfs /dev/appvg/appvg-pgdata00
meta-data=/dev/appvg/appvg-pgdata00 isize=512 agcount=4, agsize=256000 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=1024000, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@10 ~]# mkfs.xfs /dev/appvg/appvg-pgwal00
meta-data=/dev/appvg/appvg-pgwal00 isize=512 agcount=4, agsize=128000 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=512000, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@10 ~]# mkfs.xfs /dev/appvg/appvg-pgbackup00
meta-data=/dev/appvg/appvg-pgbackup00 isize=512 agcount=4, agsize=384000 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=1536000, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
>>> Backup & make /etc/fstab entry
[root@10 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Oct 14 11:18:35 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=101a1074-920c-4d4f-9fcb-8164fa5728f6 /boot xfs defaults 0 0
#/dev/mapper/centos-swap swap swap defaults 0 0
/dev/ostmpswpvg/ostmpswpvg-swp00 swap swap defaults 0 0
/dev/ostmpswpvg/ostmpswpvg-tmp00 /tmp ext3 defaults,nodev,nosuid,noexec 1 2
#
# /etc/fstab
# Created by anaconda on Fri Oct 14 11:18:35 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=101a1074-920c-4d4f-9fcb-8164fa5728f6 /boot xfs defaults 0 0
#/dev/mapper/centos-swap swap swap defaults 0 0
/dev/ostmpswpvg/ostmpswpvg-swp00 swap swap defaults 0 0
/dev/ostmpswpvg/ostmpswpvg-tmp00 /tmp ext3 defaults,nodev,nosuid,noexec 1 2
[root@10 ~]# cp /etc/fstab /etc/fstab_bkp_16oct2022_prepgentry
[root@10 ~]# vi /etc/fstab
[root@10 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Oct 14 11:18:35 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=101a1074-920c-4d4f-9fcb-8164fa5728f6 /boot xfs defaults 0 0
#/dev/mapper/centos-swap swap swap defaults 0 0
/dev/ostmpswpvg/ostmpswpvg-swp00 swap swap defaults 0 0
/dev/ostmpswpvg/ostmpswpvg-tmp00 /tmp ext3 defaults,nodev,nosuid,noexec 1 2
/dev/appvg/appvg-pgbin00 /pgBIN xfs defaults 0 0
/dev/appvg/appvg-pgdata00 /pgDATA xfs defaults 0 0
/dev/appvg/appvg-pgwal00 /pgWAL xfs defaults 0 0
/dev/appvg/appvg-pgbackup00 /pgBACKUP xfs defaults 0 0
>>> Report the mountpoint info:
[root@10 ~]# df -hFilesystem Size Used Avail Use% Mounted on
devtmpfs 484M 0 484M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 6.8M 489M 2% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/mapper/centos-root 8.0G 1.8G 6.3G 22% /
/dev/sda1 1014M 170M 845M 17% /boot
tmpfs 100M 0 100M 0% /run/user/0
/dev/mapper/ostmpswpvg-ostmpswpvg--tmp00 1.9G 3.0M 1.8G 1% /tmp
>>> Create the necessary directories:
[root@10 ~]# mkdir /pgBIN /pgDATA /pgWAL /pgBACKUP[root@10 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 484M 0 484M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 6.8M 489M 2% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/mapper/centos-root 8.0G 1.8G 6.3G 22% /
/dev/sda1 1014M 170M 845M 17% /boot
tmpfs 100M 0 100M 0% /run/user/0
/dev/mapper/ostmpswpvg-ostmpswpvg--tmp00 1.9G 3.0M 1.8G 1% /tmp
>>> Try mount the mountpoints we targetted:
[root@10 ~]# mount /pgBIN[root@10 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 484M 0 484M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 6.8M 489M 2% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/mapper/centos-root 8.0G 1.8G 6.3G 22% /
/dev/sda1 1014M 170M 845M 17% /boot
tmpfs 100M 0 100M 0% /run/user/0
/dev/mapper/ostmpswpvg-ostmpswpvg--tmp00 1.9G 3.0M 1.8G 1% /tmp
/dev/mapper/appvg-appvg--pgbin00 3.9G 33M 3.9G 1% /pgBIN
[root@10 ~]# mount /pgDATA
[root@10 ~]# mount /pgWAL
[root@10 ~]# mount /pgBACKUP
>>> Report the mountpoints:
[root@10 ~]# df -hFilesystem Size Used Avail Use% Mounted on
devtmpfs 484M 0 484M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 6.8M 489M 2% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/mapper/centos-root 8.0G 1.8G 6.3G 22% /
/dev/sda1 1014M 170M 845M 17% /boot
tmpfs 100M 0 100M 0% /run/user/0
/dev/mapper/ostmpswpvg-ostmpswpvg--tmp00 1.9G 3.0M 1.8G 1% /tmp
/dev/mapper/appvg-appvg--pgbin00 3.9G 33M 3.9G 1% /pgBIN
/dev/mapper/appvg-appvg--pgdata00 3.9G 33M 3.9G 1% /pgDATA
/dev/mapper/appvg-appvg--pgwal00 2.0G 33M 2.0G 2% /pgWAL
/dev/mapper/appvg-appvg--pgbackup00 5.9G 33M 5.9G 1% /pgBACKUP
>>> Done, we have necessary mountpoints available now.
Thanks
No comments:
Post a Comment