Red Hat Bugzilla – Bug 165986
system-config-lvm fails on uninitialized volumes
Last modified: 2007-11-30 17:11:11 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4
Description of problem:
system-config-lvm mis-identifies unitialized volumes. Here is my
> fdisk -l /dev/hda
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 25 200781 83 Linux
/dev/hda2 26 2636 20972857+ 83 Linux
/dev/hda3 2637 2897 2096482+ 82 Linux swap / Solaris
/dev/hda4 2898 9729 54878040 8e Linux LVM
hda4 is in fact uninitialized, but marked as Linux LVM. hda2 is my root
When I run system-config-lvm it shows hda2 as uninitialized but fails
to detect hda4 as such.
There are a couple of things I see.
1) At lvm_model.py:186 there is a test:
if text_words[cols - 2] == "83":
It seems like 83 is the one Id you would *not* want to consider for
initializing -- especially if (as in hda2) it is a mounted fs.
2) Just to check, I changed the above test constant to "8e" but
hda4 still did *not* show up as uninitialized. This is because
the calculation on line 184:
if cols == 7: #A boot partition or swap partition
is not reliable -- hda4 gets skipped like a boot partition.
I wrote a little module to run fdisk and parse the results w/
reg-exps, included below. Also below is a diff patch against
lvm_model.py that uses it.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.See above -- requires disk with an uninitialized Linux LVM partition
Created attachment 117750 [details]
Utility routine -- part of patch
Use as you see fit.
Created attachment 117751 [details]
diff against lvm_model.py
This problem has already been fixed as of version 0.9.50-1.0
I like the code, so it might get integrated in later releases. Thanks for the