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 Desktop

 
 
LinkBack Thread Tools
 
Old 05-20-2010, 09:33 AM
Hans de Goede
 
Default Keep track of pvcount for non existing vgs (#593871)

---
storage/devices.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 93b90ec..8985d9e 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1769,6 +1769,9 @@ class LVMVolumeGroupDevice(DMDevice):
if not self.peSize:
self.peSize = 32.0 # MB

+ if not self.exists:
+ self.pvCount = len(self.parents)
+
#self.probe()

def __str__(self):
@@ -2032,6 +2035,9 @@ class LVMVolumeGroupDevice(DMDevice):

self.parents.append(pv)
pv.addChild()
+
+ # and update our pv count
+ self.pvCount = len(self.parents)

def _removePV(self, pv):
""" Remove an PV from this VG. """
--
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-20-2010, 09:40 AM
Martin Gracik
 
Default Keep track of pvcount for non existing vgs (#593871)

ack

--

Martin Gracik

----- "Hans de Goede" <hdegoede@redhat.com> wrote:

> ---
> storage/devices.py | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/storage/devices.py b/storage/devices.py
> index 93b90ec..8985d9e 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -1769,6 +1769,9 @@ class LVMVolumeGroupDevice(DMDevice):
> if not self.peSize:
> self.peSize = 32.0 # MB
>
> + if not self.exists:
> + self.pvCount = len(self.parents)
> +
> #self.probe()
>
> def __str__(self):
> @@ -2032,6 +2035,9 @@ class LVMVolumeGroupDevice(DMDevice):
>
> self.parents.append(pv)
> pv.addChild()
> +
> + # and update our pv count
> + self.pvCount = len(self.parents)
>
> def _removePV(self, pv):
> """ Remove an PV from this VG. """
> --
> 1.7.0.1
>
> _______________________________________________
> 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 05-20-2010, 09:43 AM
Hans de Goede
 
Default Keep track of pvcount for non existing vgs (#593871)

---
storage/devices.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 5d26b26..be5a9b1 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1773,6 +1773,9 @@ class LVMVolumeGroupDevice(DMDevice):
if not self.peSize:
self.peSize = 32.0 # MB

+ if not self.exists:
+ self.pvCount = len(self.parents)
+
#self.probe()

def __str__(self):
@@ -2037,6 +2040,9 @@ class LVMVolumeGroupDevice(DMDevice):
self.parents.append(pv)
pv.addChild()

+ # and update our pv count
+ self.pvCount = len(self.parents)
+
def _removePV(self, pv):
""" Remove an PV from this VG. """
if not pv in self.pvs:
@@ -2049,6 +2055,9 @@ class LVMVolumeGroupDevice(DMDevice):
self.parents.remove(pv)
pv.removeChild()

+ # and update our pv count
+ self.pvCount = len(self.parents)
+
# We can't rely on lvm to tell us about our size, free space, &c
# since we could have modifications queued, unless the VG and all of
# its PVs already exist.
--
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-20-2010, 09:45 AM
Martin Gracik
 
Default Keep track of pvcount for non existing vgs (#593871)

ack

--

Martin Gracik

----- "Hans de Goede" <hdegoede@redhat.com> wrote:

> ---
> storage/devices.py | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/storage/devices.py b/storage/devices.py
> index 5d26b26..be5a9b1 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -1773,6 +1773,9 @@ class LVMVolumeGroupDevice(DMDevice):
> if not self.peSize:
> self.peSize = 32.0 # MB
>
> + if not self.exists:
> + self.pvCount = len(self.parents)
> +
> #self.probe()
>
> def __str__(self):
> @@ -2037,6 +2040,9 @@ class LVMVolumeGroupDevice(DMDevice):
> self.parents.append(pv)
> pv.addChild()
>
> + # and update our pv count
> + self.pvCount = len(self.parents)
> +
> def _removePV(self, pv):
> """ Remove an PV from this VG. """
> if not pv in self.pvs:
> @@ -2049,6 +2055,9 @@ class LVMVolumeGroupDevice(DMDevice):
> self.parents.remove(pv)
> pv.removeChild()
>
> + # and update our pv count
> + self.pvCount = len(self.parents)
> +
> # We can't rely on lvm to tell us about our size, free space, &c
> # since we could have modifications queued, unless the VG and all
> of
> # its PVs already exist.
> --
> 1.7.0.1
>
> _______________________________________________
> 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
 

Thread Tools




All times are GMT. The time now is 04:44 PM.

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