How do you xfs_growfs swap space?

Please ignore. Found my answer.

On 01/25/2016 01:54 PM, mikenash wrote:[color=blue]

I have extended the xfs swap space from 2G to 4G with lvextend -L+2G
/dev/system/swap but I do not know how to resize it! I tried xfs_growfs[/color]

Um… swap is a filesystem of its own, as is XFS, and the two are
mutually exclusive. Attempting to use an XFS filesystem tool on a swap
filesyste is not going to work. Growing a volume to make it bigger is a
fine start, but your next step is to use a swap-FS tool to make it larger,
something like mkswap perhaps.
[color=blue]

-d swap but it fails stating it is not a mounted XFS filesystem.
Code:

lvscan

ACTIVE ‘/dev/system/root’ [10.00 GiB] inherit
ACTIVE ‘/dev/system/swap’ [4.00 GiB] inherit

Code:

free

total used free shared buffers cached
Mem: 2049248 130352 1918896 844 4444 60720
-/+ buffers/cache: 65188 1984060
Swap: 2097148 0 2097148
--------------------[/color]

I’m guessing the steps you should take are something like this as ‘root’,
but you may need to stop some application to free up some swap before
doing so if you are running out of space in virtual memory.

swapoff -a
mkswap /dev/system/swap
swapon

See if your swap numbers change accordingly after swapoff and swapon commands.

Also, why are you adding swap? While it is a nice thing to have
sometimes, it’s no substitute for RAM as it performs terribly. Just a
thought…


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…