All of lore.kernel.org
 help / color / mirror / Atom feed
From: David T-G <davidtg-robot@justpickone.org>
To: Linux RAID <linux-raid@vger.kernel.org>
Subject: to partition or not to partition (was "Re: striping 2x500G to mirror 1x1T")
Date: Wed, 9 Mar 2022 11:04:03 -0500	[thread overview]
Message-ID: <20220309160403.GH4455@justpickone.org> (raw)
In-Reply-To: <20220305044704.GB4455@justpickone.org>

Hi again, all --

...and then davidtg-robot@justpickone.org said...
% 
% I have a 1T data drive (currently in use with data) that I'd like to
% mirror with a pair of 500G drives striped together.  I'll be mirroring
% two partitions, and I'll be striping partitions to ensure the correct
[snip]

Is it OK to mirror a partition and an entire device?  Are there any pros
or cons?

I now have my 2ea 500G drives partitioned

  jpo:~ # parted /dev/sdc unit MiB print
  Model: ATA WDC WD5000AAVS-0 (scsi)
  Disk /dev/sdc: 476940MiB
  Sector size (logical/physical): 512B/512B
  Partition Table: gpt
  Disk Flags: 

  Number  Start      End        Size       File system  Name                    Flags
   1      1.00MiB    472171MiB  472170MiB               raid0-WD-WMASU0686160   raid
   4      472171MiB  476940MiB  4769MiB    reiserfs     wwn-0x50014ee055b724ad

  jpo:~ # parted /dev/sdd unit MiB print
  Model: ATA WDC WD5000AAVS-0 (scsi)
  Disk /dev/sdd: 476940MiB
  Sector size (logical/physical): 512B/512B
  Partition Table: gpt
  Disk Flags: 

  Number  Start      End        Size       File system  Name                    Flags
   1      1.00MiB    472171MiB  472170MiB               raid0-WD-WMASU0769665   raid
   4      472171MiB  476940MiB  4769MiB    ext3         wwn-0x50014ee055b72bcd

(I always reserve a small slice at the end of the disk in which to keep
array structure data and other helpful info) and striped 

  jpo:~ # mdadm --detail /dev/md0
  /dev/md0:
             Version : 1.2
       Creation Time : Wed Mar  9 05:48:41 2022
          Raid Level : raid0
          Array Size : 966739968 (921.96 GiB 989.94 GB)
        Raid Devices : 2
       Total Devices : 2
         Persistence : Superblock is persistent

         Update Time : Wed Mar  9 05:48:41 2022
               State : clean 
      Active Devices : 2
     Working Devices : 2
      Failed Devices : 0
       Spare Devices : 0

              Layout : -unknown-
          Chunk Size : 512K

  Consistency Policy : none

                Name : jpo:500Graid0md  (local to host jpo)
                UUID : fc674dbd:577b7d48:5cbe936f:6954eb62
              Events : 0

      Number   Major   Minor   RaidDevice State
         0       8       33        0      active sync   /dev/sdc1
         1       8       49        1      active sync   /dev/sdd1

into a 1T-ish device ready to be half a mirror.  I had originally done
lots of partition size math equal exactly half of my 1T drive partition

  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

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.

Thoughts?


Thanks again! :-)

:-D
-- 
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt


  parent reply	other threads:[~2022-03-09 16:09 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 ` David T-G [this message]
2022-03-09 16:25   ` to partition or not to partition (was "Re: striping 2x500G to mirror 1x1T") Roman Mamedov

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=20220309160403.GH4455@justpickone.org \
    --to=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 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.