Bug 165986 - system-config-lvm fails on uninitialized volumes
Summary: system-config-lvm fails on uninitialized volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-lvm
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jim Parsons
QA Contact: Jim Parsons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-15 14:40 UTC by Mike Cannon
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 0.9.50-1.0
Clone Of:
Environment:
Last Closed: 2005-08-24 15:54:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Utility routine -- part of patch (2.04 KB, patch)
2005-08-15 14:55 UTC, Mike Cannon
no flags Details | Diff
diff against lvm_model.py (3.18 KB, patch)
2005-08-15 14:57 UTC, Mike Cannon
no flags Details | Diff

Description Mike Cannon 2005-08-15 14:40:51 UTC
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 
disk layout:

> 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
partition.

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):
system-config-lvm-0.9.32-1.0

How reproducible:
Always

Steps to Reproduce:
1.See above -- requires disk with an uninitialized Linux LVM partition
2.
3.
  

Additional info:

Comment 1 Mike Cannon 2005-08-15 14:55:40 UTC
Created attachment 117750 [details]
Utility routine -- part of patch

Use as you see fit.

Comment 2 Mike Cannon 2005-08-15 14:57:06 UTC
Created attachment 117751 [details]
diff against lvm_model.py

Comment 3 Stanko Kupcevic 2005-08-24 15:54:32 UTC
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
patch. 



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