Bug 503094 - Exception when partition was LVM earlier
Summary: Exception when partition was LVM earlier
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-28 19:53 UTC by Nerijus Baliūnas
Modified: 2011-03-18 09:45 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-18 09:45:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
When booting Fedora-11-i386-netinst.iso (52.17 KB, text/plain)
2009-06-09 22:03 UTC, Nerijus Baliūnas
no flags Details
traceback with Fedora-14-Beta-i386-netinst.iso (153.25 KB, text/plain)
2010-10-10 23:02 UTC, Nerijus Baliūnas
no flags Details

Description Nerijus Baliūnas 2009-05-28 19:53:57 UTC
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 20:27:44 UTC
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 16:44:22 UTC
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 22:03:15 UTC
Created attachment 347097 [details]
When booting Fedora-11-i386-netinst.iso

Comment 4 Chris Lumens 2009-06-10 17:35:46 UTC

*** This bug has been marked as a duplicate of bug 493699 ***

Comment 5 Nerijus Baliūnas 2010-10-10 22:58:57 UTC
Still happens with Fedora-14-Beta-i386-netinst.iso.

Comment 6 Nerijus Baliūnas 2010-10-10 23:02:52 UTC
Created attachment 452623 [details]
traceback with Fedora-14-Beta-i386-netinst.iso

Comment 7 Chris Lumens 2011-01-07 20:48:43 UTC
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 21:19:02 UTC
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 23:24:14 UTC
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 16:32:13 UTC
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 20:58:48 UTC
(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 23:57:05 UTC
(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-19 00:05:20 UTC
(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-19 00:32:36 UTC
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 09:45:54 UTC
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.