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 > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-22-2010, 08:24 AM
Hans de Goede
 
Default Fixup MDRaidArrayDevice.biosraid

1) Containers don't have formats, so this checks always fails, making
mdraid BIOS RAID sets not show up in storage.partitioned.

2) MDRaidArrayDevice.biosraid is used to not show biosraid related
mdraid sets as editable raid sets in the partition UI, so we should return
true for containers too, as we don't want to show those there either

3) Containers however are not partitionable, so we cannot use the
biosraid property in the partitionable property.
---
storage/devices.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index f21e730..3bae2d8 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2824,13 +2824,13 @@ class MDRaidArrayDevice(StorageDevice):

@property
def biosraid(self):
- return (len(self.devices) != 0 and
- self.devices[0].type == "mdcontainer" and
- getattr(self.devices[0].format, "biosraid", False))
+ """ Is this a BIOS RAID related set? """
+ return self.type == "mdcontainer" or
+ (self.devices and self.devices[0].type == "mdcontainer")

@property
def partitionable(self):
- return self.biosraid
+ return self.devices and self.devices[0].type == "mdcontainer"

def dracutSetupString(self):
return "rd_MD_UUID=%s" % self.uuid
--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-22-2010, 02:43 PM
David Lehman
 
Default Fixup MDRaidArrayDevice.biosraid

On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:
> 1) Containers don't have formats, so this checks always fails, making
> mdraid BIOS RAID sets not show up in storage.partitioned.
>
> 2) MDRaidArrayDevice.biosraid is used to not show biosraid related
> mdraid sets as editable raid sets in the partition UI, so we should return
> true for containers too, as we don't want to show those there either
>
> 3) Containers however are not partitionable, so we cannot use the
> biosraid property in the partitionable property.
> ---
> storage/devices.py | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/storage/devices.py b/storage/devices.py
> index f21e730..3bae2d8 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -2824,13 +2824,13 @@ class MDRaidArrayDevice(StorageDevice):
>
> @property
> def biosraid(self):
> - return (len(self.devices) != 0 and
> - self.devices[0].type == "mdcontainer" and
> - getattr(self.devices[0].format, "biosraid", False))
> + """ Is this a BIOS RAID related set? """
> + return self.type == "mdcontainer" or
> + (self.devices and self.devices[0].type == "mdcontainer")

Can't users create md arrays using containers? If so, this isn't good
enough. You might want to put back the format check, something like
this:

return (len(self.devices) != 0 and
(self.type == "mdcontainer" and
self.devices[0].format.biosraid) or
(self.devices[0].type == "mdcontainer" and
self.devices[0].biosraid))

Dave

>
> @property
> def partitionable(self):
> - return self.biosraid
> + return self.devices and self.devices[0].type == "mdcontainer"
>
> def dracutSetupString(self):
> return "rd_MD_UUID=%s" % self.uuid


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-22-2010, 02:50 PM
Hans de Goede
 
Default Fixup MDRaidArrayDevice.biosraid

Hi,

On 01/22/2010 04:43 PM, David Lehman wrote:

On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:

1) Containers don't have formats, so this checks always fails, making
mdraid BIOS RAID sets not show up in storage.partitioned.

2) MDRaidArrayDevice.biosraid is used to not show biosraid related
mdraid sets as editable raid sets in the partition UI, so we should return
true for containers too, as we don't want to show those there either

3) Containers however are not partitionable, so we cannot use the
biosraid property in the partitionable property.
---
storage/devices.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index f21e730..3bae2d8 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2824,13 +2824,13 @@ class MDRaidArrayDevice(StorageDevice):

@property
def biosraid(self):
- return (len(self.devices) != 0 and
- self.devices[0].type == "mdcontainer" and
- getattr(self.devices[0].format, "biosraid", False))
+ """ Is this a BIOS RAID related set? """
+ return self.type == "mdcontainer" or
+ (self.devices and self.devices[0].type == "mdcontainer")


Can't users create md arrays using containers?


No when using external metadata the sets are always inside a container,
even if there is only one set. And when using native metadata there
are no containers.

The containers are purely an intermediate device, which we need in the tree
for parent child relations, etc. But they should never be used in any way.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-22-2010, 03:27 PM
David Lehman
 
Default Fixup MDRaidArrayDevice.biosraid

On Fri, 2010-01-22 at 16:50 +0100, Hans de Goede wrote:
> Hi,
>
> On 01/22/2010 04:43 PM, David Lehman wrote:
> > On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:
> >> 1) Containers don't have formats, so this checks always fails, making
> >> mdraid BIOS RAID sets not show up in storage.partitioned.
> >>
> >> 2) MDRaidArrayDevice.biosraid is used to not show biosraid related
> >> mdraid sets as editable raid sets in the partition UI, so we should return
> >> true for containers too, as we don't want to show those there either
> >>
> >> 3) Containers however are not partitionable, so we cannot use the
> >> biosraid property in the partitionable property.
> >> ---
> >> storage/devices.py | 8 ++++----
> >> 1 files changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/storage/devices.py b/storage/devices.py
> >> index f21e730..3bae2d8 100644
> >> --- a/storage/devices.py
> >> +++ b/storage/devices.py
> >> @@ -2824,13 +2824,13 @@ class MDRaidArrayDevice(StorageDevice):
> >>
> >> @property
> >> def biosraid(self):
> >> - return (len(self.devices) != 0 and
> >> - self.devices[0].type == "mdcontainer" and
> >> - getattr(self.devices[0].format, "biosraid", False))
> >> + """ Is this a BIOS RAID related set? """
> >> + return self.type == "mdcontainer" or
> >> + (self.devices and self.devices[0].type == "mdcontainer")
> >
> > Can't users create md arrays using containers?
>
> No when using external metadata the sets are always inside a container,
> even if there is only one set. And when using native metadata there
> are no containers.
>
> The containers are purely an intermediate device, which we need in the tree
> for parent child relations, etc. But they should never be used in any way.

I'm aware of all of this. My question was "_Can_ users create containers
and then create native-metadata arrays inside those containers
manually?" I guess there will only be one or two users who will feel
compelled to try this even if it is possible, so it's not worth too much
trouble.

Dave

>
> Regards,
>
> Hans
>
> _______________________________________________
> 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 01-22-2010, 03:34 PM
Hans de Goede
 
Default Fixup MDRaidArrayDevice.biosraid

Hi,

On 01/22/2010 05:27 PM, David Lehman wrote:

On Fri, 2010-01-22 at 16:50 +0100, Hans de Goede wrote:

Hi,

On 01/22/2010 04:43 PM, David Lehman wrote:

On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:

1) Containers don't have formats, so this checks always fails, making
mdraid BIOS RAID sets not show up in storage.partitioned.

2) MDRaidArrayDevice.biosraid is used to not show biosraid related
mdraid sets as editable raid sets in the partition UI, so we should return
true for containers too, as we don't want to show those there either

3) Containers however are not partitionable, so we cannot use the
biosraid property in the partitionable property.
---
storage/devices.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index f21e730..3bae2d8 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2824,13 +2824,13 @@ class MDRaidArrayDevice(StorageDevice):

@property
def biosraid(self):
- return (len(self.devices) != 0 and
- self.devices[0].type == "mdcontainer" and
- getattr(self.devices[0].format, "biosraid", False))
+ """ Is this a BIOS RAID related set? """
+ return self.type == "mdcontainer" or
+ (self.devices and self.devices[0].type == "mdcontainer")


Can't users create md arrays using containers?


No when using external metadata the sets are always inside a container,
even if there is only one set. And when using native metadata there
are no containers.

The containers are purely an intermediate device, which we need in the tree
for parent child relations, etc. But they should never be used in any way.


I'm aware of all of this. My question was "_Can_ users create containers
and then create native-metadata arrays inside those containers
manually?"


AFAIK that is not possible. Arrays inside containers don't have metadata,
only the container has. IOW arrays inside containers always have the
metadata type of the container (as they use the metadata from there), and
that metadata type always is external.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-22-2010, 04:42 PM
Dan Williams
 
Default Fixup MDRaidArrayDevice.biosraid

Hans de Goede wrote:

The containers are purely an intermediate device, which we need in the tree
for parent child relations, etc. But they should never be used in any way.

I'm aware of all of this. My question was "_Can_ users create containers
and then create native-metadata arrays inside those containers
manually?"


AFAIK that is not possible. Arrays inside containers don't have metadata,
only the container has. IOW arrays inside containers always have the
metadata type of the container (as they use the metadata from there), and
that metadata type always is external.



Correct. The container is only there for userspace to track which
arrays belong to the same metadata set (N:1 arrays per metadata set).
MD metadata in comparison is always 1:1 (arrays per metadata) set so
there really isn't room for the container concept. And MD metadata is
managed by the kernel so we don't need this intermediate step in the
assembly process for userspace to evaluate the "candidate" disks
(container members) before starting the arrays inside the container.


--
Dan

_______________________________________________
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 01:33 AM.

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