[root@ncbsdb admin]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 252G 0 252G 0% /dev
tmpfs 252G 0 252G 0% /dev/shm
tmpfs 252G 13M 252G 1% /run
tmpfs 252G 0 252G 0% /sys/fs/cgroup
/dev/mapper/ol-root 200G 5.0G 195G 3% /
/dev/sda2 1014M 222M 793M 22% /boot
/dev/mapper/ol-tmp 50G 42M 50G 1% /tmp
/dev/mapper/ol-var 50G 2.6G 48G 6% /var
/dev/mapper/ol-d01 688G 5.3G 683G 1% /d01
tmpfs 51G 12K 51G 1% /run/user/42
tmpfs 51G 0 51G 0% /run/user/54321
tmpfs 51G 0 51G 0% /run/user/0
/dev/mapper/u01-u01 500G 5.3G 495G 2% /u01
/dev/mapper/u07-u07 99G 33M 99G 1% /u07
/dev/mapper/u02-u02 1.3T 34M 1.3T 1% /u02
/dev/mapper/u04-u04 500G 33M 500G 1% /u04
/dev/mapper/u05-u05 600G 34M 600G 1% /u05
/dev/mapper/u06-u06 400G 33M 400G 1% /u06
/dev/mapper/u09-u09 200G 33M 200G 1% /u09
/dev/mapper/u03-u03 484G 33M 484G 1% /u03
Here we want to resize the mount point /u03 from 484 GB to 499 GB
[root@ncbsdb admin]# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha1 u02 lvm2 a-- <1 .30t="" g="" nbsp="" p=""> /dev/mapper/mpathe1 u01 lvm2 a-- 499.98g 0
/dev/mapper/mpathf1 u03 lvm2 a-- 499.98g 15.98g
/dev/mapper/mpathh1 u07 lvm2 a-- 99.98g 1008.00m
/dev/sda3 ol lvm2 a-- 1.09t 4.00m
Here we can see that the physical volume showing still 15.98 GB available
Now we will resize
[root@ncbsdb admin]#lvresize -L+15G /dev/u03/u03
Now check the size of mount point /u03 but still showing 484 GB
Filesystem Size Used Avail Use% Mounted on
devtmpfs 252G 0 252G 0% /dev
tmpfs 252G 0 252G 0% /dev/shm
tmpfs 252G 13M 252G 1% /run
tmpfs 252G 0 252G 0% /sys/fs/cgroup
/dev/mapper/ol-root 200G 5.0G 195G 3% /
/dev/sda2 1014M 222M 793M 22% /boot
/dev/mapper/ol-tmp 50G 42M 50G 1% /tmp
/dev/mapper/ol-var 50G 2.6G 48G 6% /var
/dev/mapper/ol-d01 688G 5.3G 683G 1% /d01
tmpfs 51G 12K 51G 1% /run/user/42
tmpfs 51G 0 51G 0% /run/user/54321
tmpfs 51G 0 51G 0% /run/user/0
/dev/mapper/u01-u01 500G 5.3G 495G 2% /u01
/dev/mapper/u07-u07 99G 33M 99G 1% /u07
/dev/mapper/u02-u02 1.3T 34M 1.3T 1% /u02
/dev/mapper/u04-u04 500G 33M 500G 1% /u04
/dev/mapper/u05-u05 600G 34M 600G 1% /u05
/dev/mapper/u06-u06 400G 33M 400G 1% /u06
/dev/mapper/u09-u09 200G 33M 200G 1% /u09
/dev/mapper/u03-u03 484G 33M 484G 1% /u03
[root@ncbsdb admin]# fsadm resize /dev/mapper/u03-u03
meta-data=/dev/mapper/u03-u03 isize=256 agcount=16, agsize=7929856 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=126877696, imaxpct=25
= sunit=128 swidth=128 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=61952, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 126877696 to 130809856
[root@ncbsdb admin]#
Mount the /u03 mount point
[root@ncbsdb admin]# mount /dev/mapper/u03-u03 /u03
[root@ncbsdb admin]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 252G 0 252G 0% /dev
tmpfs 252G 0 252G 0% /dev/shm
tmpfs 252G 13M 252G 1% /run
tmpfs 252G 0 252G 0% /sys/fs/cgroup
/dev/mapper/ol-root 200G 5.0G 195G 3% /
/dev/sda2 1014M 222M 793M 22% /boot
/dev/mapper/ol-tmp 50G 42M 50G 1% /tmp
/dev/mapper/ol-var 50G 2.6G 48G 6% /var
/dev/mapper/ol-d01 688G 5.3G 683G 1% /d01
tmpfs 51G 12K 51G 1% /run/user/42
tmpfs 51G 0 51G 0% /run/user/54321
tmpfs 51G 0 51G 0% /run/user/0
/dev/mapper/u01-u01 500G 5.3G 495G 2% /u01
/dev/mapper/u07-u07 99G 33M 99G 1% /u07
/dev/mapper/u02-u02 1.3T 34M 1.3T 1% /u02
/dev/mapper/u04-u04 500G 33M 500G 1% /u04
/dev/mapper/u05-u05 600G 34M 600G 1% /u05
/dev/mapper/u06-u06 400G 33M 400G 1% /u06
/dev/mapper/u09-u09 200G 33M 200G 1% /u09
/dev/mapper/u03-u03 499G 33M 499G 1% /u03
[root@ncbsdb admin]#
No comments:
Post a Comment