All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Marc MERLIN <marc@merlins.org>
Cc: d tbsky <tbskyd@gmail.com>, list Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: new drive is 4 sectors shorter, can it be used for swraid5 array?
Date: Mon, 28 Mar 2022 18:13:42 -0600	[thread overview]
Message-ID: <CAJCQCtQyqG_zWhRVXjnc3Prc+J-7hK1hyp28mwyuKWWPJ8Uo5A@mail.gmail.com> (raw)
In-Reply-To: <20220328020512.GP4113@merlins.org>

On Sun, Mar 27, 2022 at 8:05 PM Marc MERLIN <marc@merlins.org> wrote:
>
> OMG, using a USB adapter eats 4 setors? I had no idea...
> Sure enough, I did connect the drives via USB for diagnosis since I had
> run out of sata ports.

None of my SATA-USB enclosures behave this way. But what it does do is
mask (lie) the true physical sector size, claiming it's 512 bytes
instead of 4096 bytes.

I've also seen enclosures turn a 512 byte logical sector drive into a
4096 byte logical sector drive, which is a real PITA because it
completely messes up the GPT. My understanding of the logic of GPT
format is atomic modifications that are crash safe (that's up to the
tool to do correctly too but the spec has a pretty specific order each
sector is supposed to be written), but in practice this is another
PITA for a significant minority of users who end up putting an
internal drive into an enclosure and bam - can't read the drive at
all.

It'd be kinda neat if this condition could be detected and have a
device mapper target setup to deal with it.



-- 
Chris Murphy

  reply	other threads:[~2022-03-29  0:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  3:08 new drive is 4 sectors shorter, can it be used for swraid5 array? Marc MERLIN
2022-03-18  7:54 ` Wols Lists
2022-03-18 12:30 ` Roman Mamedov
2022-03-19  4:10   ` Marc MERLIN
2022-03-19 10:14     ` Wols Lists
2022-03-19 22:02       ` Marc MERLIN
2022-03-21 19:35       ` Nix
2022-03-19 10:45   ` Roman Mamedov
2022-03-26 18:01 ` Tom Mitchell
2022-03-26 18:29   ` Wols Lists
2022-03-27  8:40 ` d tbsky
2022-03-28  2:05   ` Marc MERLIN
2022-03-29  0:13     ` Chris Murphy [this message]
2022-03-29  1:55       ` d tbsky
2022-03-30  2:33         ` Andy Smith
2022-04-02 12:48           ` d tbsky

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=CAJCQCtQyqG_zWhRVXjnc3Prc+J-7hK1hyp28mwyuKWWPJ8Uo5A@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=marc@merlins.org \
    --cc=tbskyd@gmail.com \
    /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.