Re: BTRFS Multidevice Filesystem: Save to delete one device?

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

 



On Sun, Oct 13, 2013 at 03:02:40PM +0200, Thomas Schneider wrote:
> Hello!
> I have the following disk setup:
> 1x 3TB WD
> 2x 2TB WD
> On each disk I have created a single partition, and this partition is formatted in BTRFS.
> Then, I have setup a multidevice filesystem:
> root@pc5:/media# btrfs filesystem show
> Label: 'WD30EZRX-00M'  uuid: 7008c941-a5e1-44b6-9965-de726d22cc21
> Total devices 3 FS bytes used 4.07TB
>    devid    2 size 1.82TB used 1.72TB path /dev/sdd1
>    devid    1 size 2.73TB used 2.63TB path /dev/sdb1
>    devid    3 size 1.82TB used 0.00 path /dev/sdc1
> 
> Btrfs Btrfs v0.19
> root@pc5:/media# btrfs filesystem df /media/sdb1/
> Data: total=4.17TB, used=4.07TB
> System, DUP: total=8.00MB, used=472.00KB
> System: total=4.00MB, used=0.00
> Metadata, DUP: total=94.00GB, used=5.30GB
> Metadata: total=8.00MB, used=0.00
>  
> You can see that devid 3 (=/dev/sdc1) is not utilized at all.

   Was that added later, after you'd filled much of the FS? (I'm just
checking -- otherwise, the space usage you show here might indicate
some kind of problem).

> Question:
> How can I delete devid 2 (=/dev/sdd1) securely without loosing any data?

$ btrfs dev del /media/sdb1 /dev/sdd1

   The data on the device will be moved elsewhere in the FS (i.e. to
the other two devices).

   However, be aware that there's a bug in the code in the area of
balancing and device management, and you should probably be running a
3.12-rc4+ kernel (or 3.11.5) before you try this. Your userspace tools
are also old and could probably do with an upgrade -- but that's not
particulary an issue in this instance.

> Please note that all data stored in this multidevice filesystem is located in a subvolume, means no data is stored in root tree.
>  
> root@pc5:/media# btrfs subvolume list /media/sdb1/
> ID 258 top level 5 path @video
> ID 2760 top level 5 path @musik
> ID 3995 top level 5 path @bilder
> ID 3996 top level 5 path @dokumente
> ID 3997 top level 5 path @software
> ID 3998 top level 5 path @hardware

   That doesn't make any difference for this operation.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- "You know,  the British have always been nice to mad people." ---  

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux