Bug 119264

Summary: device file left over from previous boot can be used to access different device
Product: [Fedora] Fedora Reporter: Alexandre Oliva <oliva>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: sct
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-08 21:13:10 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:
Bug Depends On:    
Bug Blocks: 114961    

Description Alexandre Oliva 2004-03-28 00:51:31 UTC
lvm vgscan --mknodes in one session created say /dev/mapper/foo-bar
(253,0).  If you remove the hard disk containing the physical volume
and reboot, lvm vgscan is quite likely to assign (253,0) to a
different logical volume in another volume group.  If you then
reference /dev/mapper/foo-bar, you get whatever random logical volume
that happens to have got the same minor device number.  device mapper
devices should probably be wiped out and re-created during the boot up.

Version-Release number of selected component (if applicable):
device-mapper-1.00.07-3.1

Comment 1 Alasdair Kergon 2004-03-30 12:57:09 UTC
vgmknodes was intended to clear /dev/mapper, but only 'dmsetup
mknodes' actually does this;  I'm fixing it.

Comment 2 Alexandre Oliva 2004-03-30 17:32:59 UTC
Err...  but what if I were to use device-mapper for purposes other
than LVM?  If vgmknodes clears /dev/mapper, wouldn't it kill device
nodes that I might be using?

Comment 3 Alasdair Kergon 2004-03-30 17:37:54 UTC
'dmsetup mknodes' ensures that /dev/mapper is in sync with the kernel,
adding/deleting entries as required.

vgmknodes now calls that too.

Non-LVM2 entries will be added/deleted from /dev/mapper depending
whether or not they're active in the kernel.


Comment 4 Alexandre Oliva 2004-03-30 19:07:47 UTC
Got it.  Awesome!

Comment 5 Alasdair Kergon 2004-04-08 21:12:47 UTC
Fixed in release 2.00.09.