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")
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
01-22-2010, 02:43 PM
David Lehman
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))
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
01-22-2010, 02:50 PM
Hans de Goede
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
01-22-2010, 03:27 PM
David Lehman
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
01-22-2010, 03:34 PM
Hans de Goede
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
01-22-2010, 04:42 PM
Dan Williams
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