Bug 100534

Summary: swap on LVM is reported as deleted by cat /proc/swaps
Product: [Retired] Red Hat Linux Beta Reporter: Alexandre Oliva <aoliva>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: beta1CC: pfrields, riel, sct
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-09-01 11:55:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2003-07-23 07:03:48 UTC
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):
kernel-2.4.21-20.1.2024.2.1.nptl

How reproducible:
Always

Steps to Reproduce:
1.create a logical volume (say /dev/VG/swap) and mkswap on it
2.swpaon -a /dev/VG/swap
3.cat /proc/swaps
4.vgscan
5.cat /proc/swaps

Actual Results:  /dev/VG/swap's status changed to (deleted) in step 5's output.

Expected Results:  Well, it's still there, for sure!

Additional info:

Comment 1 Stephen Tweedie 2003-09-01 11:55:23 UTC
> 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
expected behaviour.

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.