All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Any pros or cons of using full disk versus partitons?
       [not found] <07a801cbfa12$64b8a950$2e29fbf0$@gmail.com>
@ 2011-04-13 20:21 ` David Miller
  2011-04-13 20:55   ` David Brown
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2011-04-13 20:21 UTC (permalink / raw)
  To: mjtice; +Cc: linux-raid

From: "Matthew Tice" <mjtice@gmail.com>
Date: Wed, 13 Apr 2011 13:38:39 -0600

> So of course it technically doesn't matter but are there certain
> (non-apparent) repercussions for choosing one over the other?  It seems to
> save a couple steps by using the whole disk (not having to partition) - but
> is that it?  One thing I'm thinking about the pros of using partitions is if
> all your disks (or some) are different sizes - then you can set the
> partition sizes the same.

First, you sent this to "linux-raid-owner" instead of just
"linux-raid".  The former goes to me, not to the mailing list.

I've corrected it in the CC:

Second, to answer your question, for some disk label variants you
risk over-writing the disk label if you use the whole device
as part of your RAID volume.  This definitely will happen, for
example, with Sun disk labels.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Any pros or cons of using full disk versus partitons?
  2011-04-13 20:21 ` Any pros or cons of using full disk versus partitons? David Miller
@ 2011-04-13 20:55   ` David Brown
  2011-04-14  7:57     ` CoolCold
  0 siblings, 1 reply; 6+ messages in thread
From: David Brown @ 2011-04-13 20:55 UTC (permalink / raw)
  To: linux-raid

On 13/04/11 22:21, David Miller wrote:
> From: "Matthew Tice"<mjtice@gmail.com>
> Date: Wed, 13 Apr 2011 13:38:39 -0600
>
>> So of course it technically doesn't matter but are there certain
>> (non-apparent) repercussions for choosing one over the other?  It seems to
>> save a couple steps by using the whole disk (not having to partition) - but
>> is that it?  One thing I'm thinking about the pros of using partitions is if
>> all your disks (or some) are different sizes - then you can set the
>> partition sizes the same.
>
> First, you sent this to "linux-raid-owner" instead of just
> "linux-raid".  The former goes to me, not to the mailing list.
>
> I've corrected it in the CC:
>
> Second, to answer your question, for some disk label variants you
> risk over-writing the disk label if you use the whole device
> as part of your RAID volume.  This definitely will happen, for
> example, with Sun disk labels.

Using whole disks in the raid will make it easier for replacing disks - 
you don't have to worry about partitioning them.  You can just plug them 
in and use them.  If you have some sort of monitoring scripts and hot 
plug disks, you may be able to avoid any interaction at all on disk 
replacement.

On the other hand, using partitions gives you lots more flexibility. 
You can do things such as use a small partition on each disk to form a 
raid10 array for swap, while using a bigger partition for data.  Or 
perhaps you want a very small partition on each disk as a wide raid1 
mirror, for your /boot (not that you need so much safety for /boot, but 
that it's easier to boot from a raid1 with metadata format 0.90 than 
from other raid types).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Any pros or cons of using full disk versus partitons?
  2011-04-13 20:55   ` David Brown
@ 2011-04-14  7:57     ` CoolCold
  2011-04-14  8:11       ` NeilBrown
  0 siblings, 1 reply; 6+ messages in thread
From: CoolCold @ 2011-04-14  7:57 UTC (permalink / raw)
  To: David Brown; +Cc: linux-raid

On Thu, Apr 14, 2011 at 12:55 AM, David Brown <david.brown@hesbynett.no> wrote:
> On 13/04/11 22:21, David Miller wrote:
>>
>> From: "Matthew Tice"<mjtice@gmail.com>
>> Date: Wed, 13 Apr 2011 13:38:39 -0600
>>
>>> So of course it technically doesn't matter but are there certain
>>> (non-apparent) repercussions for choosing one over the other?  It seems
>>> to
>>> save a couple steps by using the whole disk (not having to partition) -
>>> but
>>> is that it?  One thing I'm thinking about the pros of using partitions is
>>> if
>>> all your disks (or some) are different sizes - then you can set the
>>> partition sizes the same.
>>
>> First, you sent this to "linux-raid-owner" instead of just
>> "linux-raid".  The former goes to me, not to the mailing list.
>>
>> I've corrected it in the CC:
>>
>> Second, to answer your question, for some disk label variants you
>> risk over-writing the disk label if you use the whole device
>> as part of your RAID volume.  This definitely will happen, for
>> example, with Sun disk labels.
>
> Using whole disks in the raid will make it easier for replacing disks - you
> don't have to worry about partitioning them.  You can just plug them in and
> use them.  If you have some sort of monitoring scripts and hot plug disks,
> you may be able to avoid any interaction at all on disk replacement.
>
> On the other hand, using partitions gives you lots more flexibility. You can
> do things such as use a small partition on each disk to form a raid10 array
> for swap, while using a bigger partition for data.  Or perhaps you want a
> very small partition on each disk as a wide raid1 mirror, for your /boot
> (not that you need so much safety for /boot, but that it's easier to boot
> from a raid1 with metadata format 0.90 than from other raid types).
Just my 2 cents: I've faced problems when newer disk was smaller than
old disk two or three times, so using partitions now with setting some
free space at the end - something near 80 or 100 megabytes.

If your system is located on the same disks which holds useful data,
it might be useful to split data into another mountpoint/block device
and let system skip fs check on startup and produce booted server,
which is helpful in case of system crash/powerloss and dirty
fs/breaked raid. RAID assembly problems may be caused by crappy
controller like lsi 1068e which was hanging the whole system and
desync data writes on disks on SMART request or completely on it's
own.


>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Best regards,
[COOLCOLD-RIPN]
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Any pros or cons of using full disk versus partitons?
  2011-04-14  7:57     ` CoolCold
@ 2011-04-14  8:11       ` NeilBrown
  2011-04-14  8:30         ` Roman Mamedov
  0 siblings, 1 reply; 6+ messages in thread
From: NeilBrown @ 2011-04-14  8:11 UTC (permalink / raw)
  To: CoolCold; +Cc: David Brown, linux-raid

On Thu, 14 Apr 2011 11:57:47 +0400 CoolCold <coolthecold@gmail.com> wrote:

> On Thu, Apr 14, 2011 at 12:55 AM, David Brown <david.brown@hesbynett.no> wrote:
> > On 13/04/11 22:21, David Miller wrote:
> >>
> >> From: "Matthew Tice"<mjtice@gmail.com>
> >> Date: Wed, 13 Apr 2011 13:38:39 -0600
> >>
> >>> So of course it technically doesn't matter but are there certain
> >>> (non-apparent) repercussions for choosing one over the other?  It seems
> >>> to
> >>> save a couple steps by using the whole disk (not having to partition) -
> >>> but
> >>> is that it?  One thing I'm thinking about the pros of using partitions is
> >>> if
> >>> all your disks (or some) are different sizes - then you can set the
> >>> partition sizes the same.
> >>
> >> First, you sent this to "linux-raid-owner" instead of just
> >> "linux-raid".  The former goes to me, not to the mailing list.
> >>
> >> I've corrected it in the CC:
> >>
> >> Second, to answer your question, for some disk label variants you
> >> risk over-writing the disk label if you use the whole device
> >> as part of your RAID volume.  This definitely will happen, for
> >> example, with Sun disk labels.
> >
> > Using whole disks in the raid will make it easier for replacing disks - you
> > don't have to worry about partitioning them.  You can just plug them in and
> > use them.  If you have some sort of monitoring scripts and hot plug disks,
> > you may be able to avoid any interaction at all on disk replacement.
> >
> > On the other hand, using partitions gives you lots more flexibility. You can
> > do things such as use a small partition on each disk to form a raid10 array
> > for swap, while using a bigger partition for data.  Or perhaps you want a
> > very small partition on each disk as a wide raid1 mirror, for your /boot
> > (not that you need so much safety for /boot, but that it's easier to boot
> > from a raid1 with metadata format 0.90 than from other raid types).
> Just my 2 cents: I've faced problems when newer disk was smaller than
> old disk two or three times, so using partitions now with setting some
> free space at the end - something near 80 or 100 megabytes.

You don't need partitions to do this.  Just use the --size option to mdadm.

NeilBrown


> 
> If your system is located on the same disks which holds useful data,
> it might be useful to split data into another mountpoint/block device
> and let system skip fs check on startup and produce booted server,
> which is helpful in case of system crash/powerloss and dirty
> fs/breaked raid. RAID assembly problems may be caused by crappy
> controller like lsi 1068e which was hanging the whole system and
> desync data writes on disks on SMART request or completely on it's
> own.
> 
> 
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Any pros or cons of using full disk versus partitons?
  2011-04-14  8:11       ` NeilBrown
@ 2011-04-14  8:30         ` Roman Mamedov
  2011-04-14 10:23           ` Mikael Abrahamsson
  0 siblings, 1 reply; 6+ messages in thread
From: Roman Mamedov @ 2011-04-14  8:30 UTC (permalink / raw)
  To: NeilBrown; +Cc: CoolCold, David Brown, linux-raid

[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]

On Thu, 14 Apr 2011 18:11:59 +1000
NeilBrown <neilb@suse.de> wrote:

> On Thu, 14 Apr 2011 11:57:47 +0400 CoolCold <coolthecold@gmail.com> wrote:
> 
> > Just my 2 cents: I've faced problems when newer disk was smaller than
> > old disk two or three times, so using partitions now with setting some
> > free space at the end - something near 80 or 100 megabytes.

There are also some Gigabyte motherboards which like to cut off a small
portion of a disk at the end via HPA, and writing a backup of their BIOS there.
https://encrypted.google.com/search?q=gigabyte+bios+hpa
If you had your user data or mdadm metadata there, bad luck.

On earlier motherboards this was done automatically to every new disk on
SATA0, on newer ones I think it's optional and can be disabled. But anyway, I
now prefer to leave about 8 MB of space at the end of each drive
unpartitioned, just in case.

And another point, again related to buggy BIOSes: some of them seem to read
first sectors of all attached disks and expect to see an MBR-style partition
table there; and if there's something else instead (e.g. basically random
data, in case of the whole disk used for RAID), they may become confused and
lock-up at boot. I had a couple of such cases where a board would lock-up
at HDD detection with a certain drive attached, and would only boot up
properly after it was zeroed and repartitioned.

> 
> You don't need partitions to do this.  Just use the --size option to mdadm.

But then the 1.x+ metadata is still stored at the very end of the device,
which makes it vulnerable to the HPA problem described above.

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Any pros or cons of using full disk versus partitons?
  2011-04-14  8:30         ` Roman Mamedov
@ 2011-04-14 10:23           ` Mikael Abrahamsson
  0 siblings, 0 replies; 6+ messages in thread
From: Mikael Abrahamsson @ 2011-04-14 10:23 UTC (permalink / raw)
  To: Roman Mamedov; +Cc: NeilBrown, CoolCold, David Brown, linux-raid

On Thu, 14 Apr 2011, Roman Mamedov wrote:

> But then the 1.x+ metadata is still stored at the very end of the 
> device, which makes it vulnerable to the HPA problem described above.

That's why I prefer v1.2 superblocks, it's stored safely away from MBR 
overwrites, but still not at the end.

Quoting "man mdadm"

1, 1.0, 1.1, 1.2
Use the new version-1 format superblock.  This has few 
restrictions.  The different sub-versions store the superblock at 
different locations on the device, either at the end (for 1.0), at the 
start (for 1.1) or 4K from the start (for 1.2).

I consider v1.0 and v1.1 as dangerous because of why you wrote, as well as 
accidental MBR writes.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-14 10:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <07a801cbfa12$64b8a950$2e29fbf0$@gmail.com>
2011-04-13 20:21 ` Any pros or cons of using full disk versus partitons? David Miller
2011-04-13 20:55   ` David Brown
2011-04-14  7:57     ` CoolCold
2011-04-14  8:11       ` NeilBrown
2011-04-14  8:30         ` Roman Mamedov
2011-04-14 10:23           ` Mikael Abrahamsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.