Re: to partition or not to partition (was "Re: striping 2x500G to mirror 1x1T")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Mar 2022 11:04:03 -0500
David T-G <davidtg-robot@xxxxxxxxxxxxxxx> 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



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux