xfs_growfs: is not a mounted XFS filesystem
I am trying to increase the logic volume of my partition disk.Partition table got updated and all went well. To resize the file system, I ran the below command as I am on RedHat.
xfs_growfs /dev/vg_osdisk/lv_swap
It returns the error as below.
[root@HA---------S ~]# xfs_growfs /dev/vg_osdisk/lv_swap
xfs_growfs: /dev/vg_osdisk/lv_swap is not a mounted XFS file system
I have tried to run the below command to check the type of file system. Here it shows XFS only.
[root@HA---------S ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_osdisk-lv_root xfs 72G 5.9G 66G 9% /
But I can see my 200G space as below.
[root@------------S ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 300G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 99G 0 part
│ ├─vg_osdisk-lv_root 253:0 0 71.2G 0 lvm /
│ ├─vg_osdisk-lv_swap 253:1 0 207.9G 0 lvm [SWAP]
│ └─vg_osdisk-lv_home 253:2 0 20G 0 lvm /home
└─sda3 8:3 0 200G 0 part
└─vg_osdisk-lv_swap 253:1 0 207.9G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
So how can I increase the space of the new logic system to the existing partition disk.
The /dev/vg_osdisk/lv_swap
is a part of swap area (as used already logical volume) and cannot be expand xfs_growfs command.
The sda3 (207.9G) partition is already assigned as a part of swap area.
If you want to increase OS filesystem area, you must decrease swap area(reduce swap logical volume) with swapoff
command, and extend lv_root or lv_home logical volume and then extend xfs filesystem xfs_growfs /dev/v_osdisk/lv_root
or xfs_growfs /dev/v_osdisk/lv_home
.