FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Development

 
 
LinkBack Thread Tools
 
Old 03-02-2009, 04:21 PM
Joel Granados
 
Default storage rewrite lvm pvcreate -ff

Hello list.

Have not seen this one in the patches sent. If it is there, I am sorry
for resending.

Regads
--
Joel Andres Granados
Brno, Czech Republic, Red Hat.
>From 2d50128592c590adf8cb0488621eb5e1ed27a338 Mon Sep 17 00:00:00 2001
From: Joel Granados Moreno <jgranado@redhat.com>
Date: Mon, 2 Mar 2009 18:16:21 +0100
Subject: [PATCH] pvcreate needs to have -ff

To create ensure the creation of a physical device one needs to pass -ff
to the lvm command.
---
storage/devicelibs/lvm.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
index afb7256..ed1118c 100644
--- a/storage/devicelibs/lvm.py
+++ b/storage/devicelibs/lvm.py
@@ -110,7 +110,7 @@ def clampSize(size, pesize, roundup=None):

def pvcreate(device):
rc = iutil.execWithRedirect("lvm",
- ["pvcreate", device],
+ ["pvcreate", "-ff", device],
stdout = "/dev/tty5",
stderr = "/dev/tty5",
searchPath=1)
--
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-03-2009, 04:20 AM
David Cantrell
 
Default storage rewrite lvm pvcreate -ff

Joel Granados wrote:

Hello list.

Have not seen this one in the patches sent. If it is there, I am sorry
for resending.

Regads


From a Python syntax standpoint, this looks fine to me. I am not an
expert on lvm commands.


--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-03-2009, 05:40 AM
David Lehman
 
Default storage rewrite lvm pvcreate -ff

I hit this one today. Ack.

On Mon, 2009-03-02 at 18:21 +0100, Joel Granados wrote:
> Hello list.
>
> Have not seen this one in the patches sent. If it is there, I am sorry
> for resending.
>
> Regads
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-03-2009, 02:53 PM
Joel Granados
 
Default storage rewrite lvm pvcreate -ff

I've used this patch for some time and it does not seem to fully work.
It avoids lvm returning an error. but it still requires interaction
from the user. so I have to go to tty1 and input "y" and press return.
Have not been able to fix this behavior unfortunately
On Tue, Mar 03, 2009 at 12:40:04AM -0600, David Lehman wrote:
>
> I hit this one today. Ack.
>
> On Mon, 2009-03-02 at 18:21 +0100, Joel Granados wrote:
> > Hello list.
> >
> > Have not seen this one in the patches sent. If it is there, I am sorry
> > for resending.
> >
> > Regads
> > _______________________________________________
> > Anaconda-devel-list mailing list
> > Anaconda-devel-list@redhat.com
> > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-03-2009, 03:19 PM
David Lehman
 
Default storage rewrite lvm pvcreate -ff

Grr, lvm is such a pain in the ass sometimes. Try this patch:

diff --git a/storage/formats/lvmpv.py b/storage/formats/lvmpv.py
index a1c2e53..b87029e 100644
--- a/storage/formats/lvmpv.py
+++ b/storage/formats/lvmpv.py
@@ -87,6 +87,10 @@ class LVMPhysicalVolume(DeviceFormat):
""" Consider use of -Z|--zero
-f|--force or -y|--yes may be required
"""
+ # lvm has issues with persistence of metadata, so here comes
the
+ # hammer...
+ DeviceFormat.destroy(self, *args, kwargs)
+
lvm.pvcreate(self.device)
self.exists = True
self.notifyKernel()


On Tue, 2009-03-03 at 16:53 +0100, Joel Granados wrote:
> I've used this patch for some time and it does not seem to fully work.
> It avoids lvm returning an error. but it still requires interaction
> from the user. so I have to go to tty1 and input "y" and press return.
> Have not been able to fix this behavior unfortunately
> On Tue, Mar 03, 2009 at 12:40:04AM -0600, David Lehman wrote:
> >
> > I hit this one today. Ack.
> >
> > On Mon, 2009-03-02 at 18:21 +0100, Joel Granados wrote:
> > > Hello list.
> > >
> > > Have not seen this one in the patches sent. If it is there, I am sorry
> > > for resending.
> > >
> > > Regads
> > > _______________________________________________
> > > Anaconda-devel-list mailing list
> > > Anaconda-devel-list@redhat.com
> > > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> >
> > _______________________________________________
> > Anaconda-devel-list mailing list
> > Anaconda-devel-list@redhat.com
> > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
>

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-09-2009, 01:48 PM
Joel Granados
 
Default storage rewrite lvm pvcreate -ff

The new code has this but the lvm code still needs the "-ff", "-y"
arguments. I'm trying out some modifications. will post once I test.
thx for the hint.

On Tue, Mar 03, 2009 at 10:19:03AM -0600, David Lehman wrote:
> Grr, lvm is such a pain in the ass sometimes. Try this patch:
>
> diff --git a/storage/formats/lvmpv.py b/storage/formats/lvmpv.py
> index a1c2e53..b87029e 100644
> --- a/storage/formats/lvmpv.py
> +++ b/storage/formats/lvmpv.py
> @@ -87,6 +87,10 @@ class LVMPhysicalVolume(DeviceFormat):
> """ Consider use of -Z|--zero
> -f|--force or -y|--yes may be required
> """
> + # lvm has issues with persistence of metadata, so here comes
> the
> + # hammer...
> + DeviceFormat.destroy(self, *args, kwargs)
> +
> lvm.pvcreate(self.device)
> self.exists = True
> self.notifyKernel()
>
>
> On Tue, 2009-03-03 at 16:53 +0100, Joel Granados wrote:
> > I've used this patch for some time and it does not seem to fully work.
> > It avoids lvm returning an error. but it still requires interaction
> > from the user. so I have to go to tty1 and input "y" and press return.
> > Have not been able to fix this behavior unfortunately
> > On Tue, Mar 03, 2009 at 12:40:04AM -0600, David Lehman wrote:
> > >
> > > I hit this one today. Ack.
> > >
> > > On Mon, 2009-03-02 at 18:21 +0100, Joel Granados wrote:
> > > > Hello list.
> > > >
> > > > Have not seen this one in the patches sent. If it is there, I am sorry
> > > > for resending.
> > > >
> > > > Regads
> > > > _______________________________________________
> > > > Anaconda-devel-list mailing list
> > > > Anaconda-devel-list@redhat.com
> > > > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> > >
> > > _______________________________________________
> > > Anaconda-devel-list mailing list
> > > Anaconda-devel-list@redhat.com
> > > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> >
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org