Bug 119264 - device file left over from previous boot can be used to access different device
device file left over from previous boot can be used to access different device
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
 
Reported: 2004-03-27 19:51 EST by Alexandre Oliva
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-08 17:13:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2004-03-27 19:51:31 EST
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 07:57:09 EST
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 12:32:59 EST
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 12:37:54 EST
'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 14:07:47 EST
Got it.  Awesome!
Comment 5 Alasdair Kergon 2004-04-08 17:12:47 EDT
Fixed in release 2.00.09.

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