Bug 165986 - system-config-lvm fails on uninitialized volumes
system-config-lvm fails on uninitialized volumes
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: system-config-lvm (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jim Parsons
Jim Parsons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-15 10:40 EDT by Mike Cannon
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.9.50-1.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-24 11:54:32 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)
Utility routine -- part of patch (2.04 KB, patch)
2005-08-15 10:55 EDT, Mike Cannon
no flags Details | Diff
diff against lvm_model.py (3.18 KB, patch)
2005-08-15 10:57 EDT, Mike Cannon
no flags Details | Diff

  None (edit)
Description Mike Cannon 2005-08-15 10:40:51 EDT
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 10:55:40 EDT
Created attachment 117750 [details]
Utility routine -- part of patch

Use as you see fit.
Comment 2 Mike Cannon 2005-08-15 10:57:06 EDT
Created attachment 117751 [details]
diff against lvm_model.py
Comment 3 Stanko Kupcevic 2005-08-24 11:54:32 EDT
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.