All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Helmut Hullen" <Hullen@t-online.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: LABEL only 1 device
Date: 27 Feb 2012 13:24:00 +0100	[thread overview]
Message-ID: <C3f3Dlli1uB@helmut.hullen.de> (raw)
In-Reply-To: <20120227120640.GO1046@twin.jikos.cz>

Hallo, David,

Du meintest am 27.02.12:

[deleting btrfs partition]

>>    OK, the real problem you're seeing is that when btrfs removes a
>> device from the filesystem, that device is not modified in any way.
>> This means that the old superblock is left behind on it, containing
>> the FS label information. What you need to do is, immediately after
>> removing a device from the FS, zero the first part of the partition
>> with dd and /dev/zero.

> A correction here: if the device being removed is writable, the
> superblock is cleared so it's not recognized as a part of any other
> fs:

[...]

> Doing this manually means zeroing 4k block at all offsets up to
> partition size:

> Superblock 0 offset 65536
> Superblock 1 offset 67108864
> Superblock 2 offset 274877906944
> Superblock 3 offset 1125899906842624
> Superblock 4 offset 4611686018427387904

My actual experiments:

  dd if=/dev/zero of=/dev/sdxn bs=16M count=1

seems to be enough. Perhaps deleting the first 16 MByte is too much.

Viele Gruesse!
Helmut

      reply	other threads:[~2012-02-27 12:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26 15:23 LABEL only 1 device Helmut Hullen
2012-02-26 15:30 ` Hugo Mills
2012-02-26 16:12   ` Helmut Hullen
2012-02-26 16:44     ` Hugo Mills
2012-02-26 16:57       ` Helmut Hullen
2012-02-26 17:14         ` Hugo Mills
2012-02-26 18:11           ` Helmut Hullen
2012-02-27  6:44           ` Helmut Hullen
2012-02-27 10:11             ` Hugo Mills
2012-02-27 10:27               ` Helmut Hullen
2012-02-27 16:48                 ` Duncan
2012-02-27 21:15                   ` Helmut Hullen
2012-02-27 21:23                     ` Hugo Mills
2012-02-27 21:33                     ` Felix Blanke
2012-02-27 21:45                     ` Hugo Mills
2012-02-27 21:59                       ` Helmut Hullen
2012-02-26 18:07       ` Duncan
2012-02-28 22:35         ` Karel Zak
2012-03-01  0:54           ` Duncan
2012-02-27 12:06       ` David Sterba
2012-02-27 12:24         ` Helmut Hullen [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=C3f3Dlli1uB@helmut.hullen.de \
    --to=hullen@t-online.de \
    --cc=helmut@hullen.de \
    --cc=linux-btrfs@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.