Академический Документы
Профессиональный Документы
Культура Документы
===========================================
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 0x6b35ab67.
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 rhel lvm2 a-- <25.37g 4.00m
/dev/sdb1 lvm2 --- 100.00g 100.00g
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# vgextend rhel /dev/sdb1
Volume group "rhel" successfully extended
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rhel 2 2 0 wz--n- 125.36g 100.00g
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# lvextend -l 100%FREE /dev/rhel/root
Size of logical volume rhel/root changed from 23.36 GiB (5981 extents) to 100.
00 GiB (25600 extents).
Logical volume rhel/root successfully resized.
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# resize2fs /dev/rhel/root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/rhel/root
Couldn't find valid filesystem superblock.
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# df -Th /
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 24G 24G 152K 100% /
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# resize2fs /dev/rhel/root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/rhel/root
Couldn't find valid filesystem superblock.
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync
Convert
root rhel -wi-ao---- 100.00g
swap rhel -wi-ao---- 2.00g
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# df -Th /
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 24G 24G 152K 100% /
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# xfs_growfs
Usage: xfs_growfs [options] mountpoint
Options:
-d grow data/metadata section
-l grow log section
-r grow realtime section
-n don't change anything, just show geometry
-i convert log from external to internal format
-t alternate location for mount table (/etc/mtab)
-x convert log from internal to external format
-D size grow data/metadata section to size blks
-L size grow/shrink log section to size blks
-R size grow realtime section to size blks
-e size set realtime extent size to size blks
-m imaxpct set inode max percent to imaxpct
-V print version information
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# xfs_growfs /dev/rhel/root
meta-data=/dev/mapper/rhel-root isize=512 agcount=4, agsize=1531136 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=6124544, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2990, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 6124544 to 26214400
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 100G 24G 77G 24% /
devtmpfs devtmpfs 862M 0 862M 0% /dev
tmpfs tmpfs 878M 0 878M 0% /dev/shm
tmpfs tmpfs 878M 9.2M 869M 2% /run
tmpfs tmpfs 878M 0 878M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 212M 803M 21% /boot
tmpfs tmpfs 176M 12K 176M 1% /run/user/42
tmpfs tmpfs 176M 0 176M 0% /run/user/0
[root@mamun ~]#
[root@mamun ~]#
[root@mamun ~]# df -Th /
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 100G 24G 77G 24% /
[root@mamun ~]#