Skip to contentSkip to conversation

converting one-disk btrfs into RAID-1?

DISCUSSION Tomasz Chmielewski 5 participants 7 messages Oct 11, 2010 – Oct 12, 2010 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Some Linux distributions started adding btrfs support in their installers. Unfortunately, you can't specify your own mkfs.btrfs parameters, so the best an installer can produce is a btrfs filesystem made on one partition.

Is it possible to turn a 1-disk (partition) btrfs filesystem into RAID-1?

Suppose you have your / btrfs filesystem on /dev/vda3, and there is a free /dev/vdb3 partition which you would like to use to have btrfs RAID-1 - what are the options to set it up like this?

A command like:

btrfs device add /dev/vdb3 /

will, I suppose, simply make RAID-0 and double your available storage - are there any options to make it RAID-1?

Or, will it be RAID-1 after I do:

btrfs filesystem balance /

?

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#1 lore raw

Hi,

Quoted 2 lines

Is it possible to turn a 1-disk (partition) btrfs filesystem into RAID-1?

Not yet, but I'm pretty sure it's on the roadmap.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>
One Laptop Per Child
#2 lore raw
Quoted 8 lines · Chris Ball

Hi,

Quoted 2 lines

Is it possible to turn a 1-disk (partition) btrfs filesystem into RAID-1?

Not yet, but I'm pretty sure it's on the roadmap.

- Chris.

Is it possible to view the raid levels of data and meta data for an existing btrfs filesystem? It's easy to pick them when creating the system, but I couldn't find any way to view them afterwards.

#3 lore raw
Quoted 6 lines · David Brown
Quoted 5 lines · Chris Ball

Hi,

Quoted 2 lines

Is it possible to turn a 1-disk (partition) btrfs filesystem into RAID-1?

Quoted 7 lines
Quoted 3 lines

Not yet, but I'm pretty sure it's on the roadmap.

- Chris.

Is it possible to view the raid levels of data and meta data for an existing btrfs filesystem? It's easy to pick them when creating the system, but I couldn't find any way to view them afterwards.

"btrfs f df" will show them, except for few kernel releases when the ioctl()
was broken.

Signature · 2 lines
Tomasz Torcz                                                       72->|   80->|
xmpp: [email protected]                                          72->|   80->|
#4 lore raw
Quoted 7 lines · Tomasz Torcz
Quoted 3 lines · David Brown

Is it possible to view the raid levels of data and meta data for an existing btrfs filesystem? It's easy to pick them when creating the system, but I couldn't find any way to view them afterwards.

"btrfs f df" will show them, except for few kernel releases when the ioctl()
was broken.

Umm...

hrm@vlad:~ $ sudo btrfs fi df /mnt/
[sudo] password for hrm:
Data: total=303.01GB, used=302.16GB
Metadata: total=3.01GB, used=476.77MB
System: total=11.88MB, used=36.00KB

This is the latest btrfs git kernel and tools. What should I be
seeing here?

Hugo.

Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
               --- emacs: Emacs Makes A Computer Slow. ---               
#5 lore raw
Quoted 11 lines · Hugo Mills
Quoted 7 lines · Tomasz Torcz
Quoted 3 lines · David Brown

Is it possible to view the raid levels of data and meta data for an existing btrfs filesystem? It's easy to pick them when creating the system, but I couldn't find any way to view them afterwards.

"btrfs f df" will show them, except for few kernel releases when the ioctl()
was broken.

   Umm...
Quoted 8 lines

hrm@vlad:~ $ sudo btrfs fi df /mnt/
[sudo] password for hrm:
Data: total=303.01GB, used=302.16GB
Metadata: total=3.01GB, used=476.77MB
System: total=11.88MB, used=36.00KB

This is the latest btrfs git kernel and tools. What should I be
seeing here?

Do you have this patch applied?
http://www.mail-archive.com/[email protected]/msg06239.html

Signature · 2 lines
Tomasz Torcz                                                       72->|   80->|
xmpp: [email protected]                                          72->|   80->|
#6 lore raw
In reply to Tomasz Torcz
Quoted 9 lines · Tomasz Torcz
Quoted 8 lines · David Brown
Quoted 7 lines · Chris Ball

Hi,

Quoted 2 lines

Is it possible to turn a 1-disk (partition) btrfs filesystem into RAID-1?

Not yet, but I'm pretty sure it's on the roadmap.

Quoted 9 lines
Quoted 5 lines
Quoted 1 line

- Chris.

Is it possible to view the raid levels of data and meta data for an existing btrfs filesystem? It's easy to pick them when creating the system, but I couldn't find any way to view them afterwards.

"btrfs f df" will show them, except for few kernel releases when the ioctl()
was broken.

I guess it's time to update my System Rescue CD to a version with the btrfs command rather than just btrfsctl etc. Thanks!