Thread (21 messages) 21 messages, 6 authors, 2012-03-01

Re: LABEL only 1 device

From: Helmut Hullen <hidden>
Date: 2012-02-27 12:24:00

Hallo, David,

Du meintest am 27.02.12:

[deleting btrfs partition]
quoted
   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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help