Red Hat Bugzilla – Bug 100534
swap on LVM is reported as deleted by cat /proc/swaps
Last modified: 2015-01-04 17:02:44 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703
Description of problem:
This is no big deal, but since it's a recent change (it wasn't present in the
June 16's tree, for example), I thought I'd report it.
If root and a swap logical volume listed in /etc/fstab are in the same volume
group, and there are raid devices in the system (e.g., as physical volumes of
the volume group), cat /proc/swaps will report the swap partition as (deleted).
The problem is that rc.sysinit runs vgscan after starting raid devices, and it
is vgscan that changes the status of the swap partition to deleted, even though
not even the inode of the logical volume device changes.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.create a logical volume (say /dev/VG/swap) and mkswap on it
2.swpaon -a /dev/VG/swap
Actual Results: /dev/VG/swap's status changed to (deleted) in step 5's output.
Expected Results: Well, it's still there, for sure!
> The problem is that rc.sysinit runs vgscan after starting raid devices, and it
> is vgscan that changes the status of the swap partition to deleted, even though
> not even the inode of the logical volume device changes.
Actually, it does change --- vgscan deletes and recreates the LVM inodes. The
old inode, having been deleted, then shows up as [deleted] in /proc. This is
Arguably the LVM user-tools could be slightly improved by detecting when the
block device inodes haven't changed and leaving them alone, but this is
definitely not a kernel bug.