Bug 119264 - device file left over from previous boot can be used to access different device
Summary: device file left over from previous boot can be used to access different device
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC2Blocker
TreeView+ depends on / blocked
 
Reported: 2004-03-28 00:51 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-08 21:13:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.