Bug 503094 - Exception when partition was LVM earlier
Exception when partition was LVM earlier
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: util-linux-ng (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-28 15:53 EDT by Nerijus Baliūnas
Modified: 2011-03-18 05:45 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-18 05:45:54 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)
When booting Fedora-11-i386-netinst.iso (52.17 KB, text/plain)
2009-06-09 18:03 EDT, Nerijus Baliūnas
no flags Details
traceback with Fedora-14-Beta-i386-netinst.iso (153.25 KB, text/plain)
2010-10-10 19:02 EDT, Nerijus Baliūnas
no flags Details

  None (edit)
Description Nerijus Baliūnas 2009-05-28 15:53:57 EDT
Install Fedora 10 with default partitioning, i.e.
/dev/sda1     Linux
/dev/sda2     Linux LVM

Run fdisk, delete 2nd partition and create a smaller swap one, so that it is now:
/dev/sda1     Linux
/dev/sda2     Linux swap

It does not matter if I run mkswap /dev/sda2 or not.
Boot F-11 netinstall CD, and exception occurs at "Finding storage devices":

anaconda 11.5.0.47 exception report
Traceback:
 File "/usr/lib/anaconda/storage/devicelibs/lvm.py", line 397, in lvactivate raise LVMError("lvactivate failed for %s" %lv_name)
 File "/usr/lib/anaconda/storage/devices.py", line 1996, in setup lvm.lvactivate(self.vg.name, self._name)
 File "/usr/lib/anaconda/storage/devicetree.py", line 1271, in handleUdevLVMPVFormat lv_device.setup()
 File "/usr/lib/anaconda/storage/devicetree.py", line 1497, in handleUdevDeviceFormat self.handleUdevLVMPVFormat(info, device)
 File "/usr/lib/anaconda/storage/devicetree.py", line 1167, in addUdevDevice self.handleUdevDeviceFormat(info, device)
 File "/usr/lib/anaconda/storage/devicetree.py", line 1627, in populate self.addUdevDevice(dev)
 File "/usr/lib/anaconda/storage/__init__.py", line 288, in reset self.devicetree.populate()
 File "/usr/lib/anaconda/storage/__init__.py", line 101, in storageInitialize storage.reset()
...
LVMError: lvactivate failed for LogVol00

Local variables in innermost frame:
args: ['lvchange', '-a', 'y', 'VolGroup00/LogVol00']
lv_name: LogVol00
vg_name: VolGroup00
rc: 5
Comment 1 Chris Lumens 2009-05-28 16:27:44 EDT
This build of anaconda was done quite a while ago.  Can you please test again with F11 RC when it is made available and let us know if this is still a problem for you?  If so, please attach the complete /tmp/anacdump.txt file to this bug report.  Thanks.
Comment 2 Bug Zapper 2009-06-09 12:44:22 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Nerijus Baliūnas 2009-06-09 18:03:15 EDT
Created attachment 347097 [details]
When booting Fedora-11-i386-netinst.iso
Comment 4 Chris Lumens 2009-06-10 13:35:46 EDT

*** This bug has been marked as a duplicate of bug 493699 ***
Comment 5 Nerijus Baliūnas 2010-10-10 18:58:57 EDT
Still happens with Fedora-14-Beta-i386-netinst.iso.
Comment 6 Nerijus Baliūnas 2010-10-10 19:02:52 EDT
Created attachment 452623 [details]
traceback with Fedora-14-Beta-i386-netinst.iso
Comment 7 Chris Lumens 2011-01-07 15:48:43 EST
That's a completely different traceback, though, so it's not the same bug.  This latest one seems to be caused by this:

01:53:46,775 WARNING kernel:device-mapper: table: 253:0: sda2 too small for target: start=384, len=13631488, dev_size=2120580
Comment 8 David Lehman 2011-01-07 16:19:02 EST
blkid is reporting that sda2 is an lvm pv. If this is not the case the bug is blkid's.


Reporter: for future reference, use wipefs before destroying old partitions to ensure their metadata does not cause issues like this.
Comment 9 Karel Zak 2011-01-07 18:24:14 EST
I guess that the old mkswap from F10 does not zap the first block on the device. Please, re-create the swap area be less old mkswap version or use wipefs(8) to delete the obsolete signature.

if the problem persist than I'd like to see debug output from blkid:

 BLKID_DEBUG=0xffff blkid

thanks.
Comment 10 Nerijus Baliūnas 2011-01-09 11:32:13 EST
Of course I can use wipefs and I will not have this problem. But I reported this problem because I think anaconda should not crash in such cases. If partition is swap, why does it try to detect lvm pv in it? Shouldn't it try to detect only in LVM partitions?
Comment 11 Milan Broz 2011-01-09 15:58:48 EST
(In reply to comment #10)
> If partition is swap, why does it try to detect lvm pv in it? Shouldn't it try to detect only in LVM partitions?

Partition ID is not important here, important is what blkid detects on that partition.

The bug in mkswap was that it did not properly wiped previous signature and blkid later reports wrong old signature / device type here.

Well, anaconda should probably not crash anyway:-)
Comment 12 Nerijus Baliūnas 2011-01-18 18:57:05 EST
(In reply to comment #11)
> Partition ID is not important here, important is what blkid detects on that
> partition.

Is it a design decision? I thought if I set the partition as swap, it should be swap, and not what it was before.
Comment 13 Karel Zak 2011-01-18 19:05:20 EST
(In reply to comment #12)
> (In reply to comment #11)
> > Partition ID is not important here, important is what blkid detects on that
> > partition.
> 
> Is it a design decision? I thought if I set the partition as swap, it should be
> swap, and not what it was before.

Linux kernel does not care about partition type, you can use regular files, unpartitioned devices or whatever for swap, lvm pv, etc.

The swap is enabled by swapon(2) syscall on arbitrary block device (or regular file) where is swap area header. The special swap partition type is unnecessary.
Comment 14 Nerijus Baliūnas 2011-01-18 19:32:36 EST
OK then, don't look at swap. The bug I reported is because I wanted to go from LVM to non LVM setup, but I didn't want to fill large partition with zeros because it will take a lot of time. So if I delete /dev/sda2 and create it in anaconda I will not get a crash? Just tested - yes, if I delete 2nd partition, anaconda does not crash. As for me, I'm happy as I know a workaround, but the bug (crash) probably should be solved anyway?
Comment 15 Karel Zak 2011-03-18 05:45:54 EDT
The best way how remove unwanted signatures(s) from block device is the wipefs(8) command. It's really better than fill large partition with zeros :-)

Closing... if you are able to (re)produce any anaconda crash, then open a new bug against anaconda. Thanks.

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