[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: parted offers existing encrypted PVs when making new VG



On Mon, Nov 17, 2008 at 03:47:16PM -0600, Dave Lehman wrote:
> 
> On Mon, 2008-11-17 at 16:34 -0500, Chuck Anderson wrote:
> > anaconda-11.4.1.58
> > 
> > I have sda5 encrypted PV with an existing VG on it.  I want to create 
> > a new VG to install to, so I select a free partition and click LVM.  
> > In the list of Physical Volumes to Use, sda5 is checked off by 
> > default, along with the new blank partition I want to use.  This is 
> > dangerous, because the user might unknowingly overwrite an existing 
> > encrypted partition.
> > 
> > This happens only when I enter the passphrase to unlock sda5.  If I 
> > don't enter the passphrase for sda5, I'm not offered that partition as 
> > a choice for creating the new VG.
> 
> Does the preexisting VG appear in the main partitioning UI? It should.
> If it doesn't, that means we didn't detect it, which in turn means the
> PV is unused and therefore available for use in a new VG.

Yes, the preexisting VG does appear if I give the passphrase to unlock 
sda5.  After some more investigation, I noticed that the encrypted PV 
on sda5 actually has 1 free extent:

 --- Physical volume ---
  PV Name               /dev/dm-0
  VG Name               l.sys
  PV Size               27.68 GB / not usable 24.67 MB
  Allocatable           yes 
  PE Size (KByte)       32768
  Total PE              885
  Free PE               1
  Allocated PE          884
  PV UUID               UwcvVJ-LeYA-xYg5-KFq9-W6F5-cEtQ-PPX5zi

So I guess technically this isn't a bug then, as long as it only uses 
the free extents and doesn't overwrite the allocated extents.  You 
could create a new VG and use the 1 free extent on that PV along with 
more extents on another PV.

I'm going allocate that last extent manually and try Anaconda again to 
see what happens.  If the behavior changes, then I think it is 
behaving correctly.  If it still offers to use sda5, then there is a 
bug.

On the other hand, I believe Anaconda originally created this PV/VG 
and the LVs on it--it was the one to leave that last extent free in 
the first place.  That's a different bug though.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]