linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: David T-G <davidtg-robot@justpickone.org>
Cc: Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: to partition or not to partition (was "Re: striping 2x500G to mirror 1x1T")
Date: Wed, 9 Mar 2022 21:25:29 +0500	[thread overview]
Message-ID: <20220309212529.4eeaf79d@nvm> (raw)
In-Reply-To: <20220309160403.GH4455@justpickone.org>

On Wed, 9 Mar 2022 11:04:03 -0500
David T-G <davidtg-robot@justpickone.org> wrote:

> Is it OK to mirror a partition and an entire device?

Yes it is OK.

>   jpo:~ # parted /dev/sdb unit MiB print
>   Model: ATA ST31000524AS (scsi)
>   Disk /dev/sdb: 953870MiB
>   Sector size (logical/physical): 512B/512B
>   Partition Table: gpt
>   Disk Flags: 
> 
>   Number  Start      End        Size       File system  Name  Flags
>    1      1.00MiB    858307MiB  858306MiB  xfs          pri
>    4      950055MiB  953869MiB  3814MiB                 pri
> 

Here it seems weird that your 1TB drive has a 858GB partition, then a hole of
free space about 92 GB in size, and only then another partition of 4 GB. In
preparation for that partition to become a RAID member (instead of xfs data
directly), you could resize it to match the 944082MiB size of md0.

> with existing data (and having to fudge around, not surprisingly, the
> striping metadata overhead), and so I've been playing
> 
>   jpo:~ # parted /dev/md0 unit MiB print
>   Model: Linux Software RAID Array (md)
>   Disk /dev/md0: 944082MiB
>   Sector size (logical/physical): 512B/512B
>   Partition Table: gpt
>   Disk Flags: 
> 
>   Number  Start      End        Size       File system  Name         Flags
>    1      1.00MiB    934641MiB  934640MiB               500Graid0md  raid
>    4      934641MiB  944081MiB  9440MiB                 pri          msftdata
> 
> with how to slice up the stripe device to size it to match the existing
> sdb1 partition with the mirroring metadata overhead, when I wondered ...
> do I care?  I don't need the s4 slice on this virtual device; that's just
> leftover space.  I hate to think of it going to waste, but it's really
> trivial in the grand scheme of things.  Soooooo ... if it's just as happy
> to mirror against a whole device as it is a slice of one, then maybe I
> can skip ahead.

It is definitely an overkill to partition the md0 device. Better to just use
it entirely. If you fix up the partition size on sdb as mentioned above, there
will not be any wasted space on md0.

-- 
With respect,
Roman

      reply	other threads:[~2022-03-09 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05  4:47 striping 2x500G to mirror 1x1T David T-G
2022-03-07 14:19 ` Natanji
2022-03-07 16:24   ` Wols Lists
2022-03-09  3:02   ` backups and losses (was "Re: striping 2x500G to mirror 1x1T") David T-G
2022-03-08 23:08 ` striping 2x500G to mirror 1x1T Jani Partanen
2022-03-08 23:34   ` Roman Mamedov
2022-03-09  2:59     ` David T-G
2022-03-09 16:04 ` to partition or not to partition (was "Re: striping 2x500G to mirror 1x1T") David T-G
2022-03-09 16:25   ` Roman Mamedov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220309212529.4eeaf79d@nvm \
    --to=rm@romanrm.net \
    --cc=davidtg-robot@justpickone.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).