Re: btrfs on an external HD?

On 27/11/10 01:45, Brad Alexander wrote:
Thanks for your post, Alan.

Lets take this discussion back to the list rather than hold it in private - and I am subscribed, so no need to copy me either

On Fri, Nov 26, 2010 at 4:39 PM, Alan Chandler
<alan@xxxxxxxxxxxxxxxxxxxxx> wrote:

I've just tried it on my own similar drive as an experiment. I think,
although I have not yet got far enough into it to fully understand it, is
that a first step after mkfs.btrfs and then mount should be to create a
subvolume that will be the default one. You should then umount the complete
volume and mount the subvolume.

I created a btrfs partition on my laptop from my previous job, but
really didn't experiment with it much. I definitely didn't get to play
with the subvolumes and snapshotting...

I missed that step out, and I think it was probably a mistake - but I'm
finding the docs a little patchy. Its almost like you have to already know
what it does to understand the docs. I am not sure if you mess up with this
that you can then change it - docs covering this sort of advice seems to be

What docs did you reference when using this? I haven't found anything
that I could really sink my teeth into when searching. I have read the
stuff on the btrfs wiki, but that almost seems like promotional
material rather than howto or beginners stuff.

I found very little outside of the wiki

I've also considered
just using ext4, since it seems fall in that gray area between
reiserfs, which I have used for years and is getting really long in
the tooth, and btrfs, which is the next great thing. However, that
"having to fsck every 30 boots" mindset really tends to annoy me.

I used to use reiserfs and one of its great strengths was packing small files into the same block. I have since moved to bigger discs and ext4 - but it is wasteful of space.

The main reason I chose to try btrfs was because I was try to squeeze an extra level of backup into a 160G disk and it just wouldn't go - I was hoping this packing of files would help things. It did to some extent - enough to enable me to store most of what was important. Given it was a 3rd level backup I was willing risk loosing it.

What seems to be realy great - provided of course that you set it up duing
the mkfs.btrfs time is that you can add multiple devices to the file system
and replace raid and lvm. Because its built into the filesystem,
synchronising a new device when its added to a raid array is a lot faster
than the mdadm stuff that is currently available.

This is something that I'm still trying to get my brain around. I
create an lvm then stick my traditional filesystems inside of that
container. When I build a box, I create an encrypted block on the hard
drive, then stick an LVM within that. I wonder how this is going to
work with btrfs...

As far as I can work out, using mkfs.btrfs with the -d raid1 -m raid1 switches becomes the equivalent of an mdadm assemble and a vgcreate all in one go. Creating a subvolume in that filesystem then becomes the equivalent of an lvcreate. Snapshoting that subvolume is the equivalent of the lvcreate with the -s switch.

Conceptually what I find difficult to understand is that you create these subvolumes and snapshots in directories within the overall filesystem - and you can designate one of them to be the default subvolume. The filesystem itself may be spread over multiple devices.

When you mount (one of) the device(s) you mount the subvolume. This leaves me with unanswered questions:
- What happens to the rest of the filesystem when you mount the default subvolume - do you loose access to it
- how do you mount the filesystem when its spread over multiple devices (ie what device do you refer to in the mount command).

I currently run raid/lvm on my desktop for all bar my boot partition and I
am condidering whether btrfs could replace it.

That is my ultimate goal. This external hard drive is just a
small-scale experiment to see if the filesystem is viable yet and get
familiar with its workings before eventually building systems with it.

Exactly what I was trying to do.

Alan Chandler

To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx

Relevant Pages

  • Re: mount() function problem !
    ... mount() attaches the filesystem specified by source (which is often a device name, ... point within a file system. ... details of the options available for each filesystem type. ... Specifies the journalling mode for file data. ...
  • Re: [autofs] [RFC] Towards a Modern Autofs
    ... >entangling autofs with that work. ... >filesystem it's willing to export. ... >>map is mounted. ... The result is that some users will see mount points ...
  • Re: UFS Bug: FreeBSD 6.1/6.2/7.0: MOKB-08-11-2006, CVE-2006-5824, MOKB-03
    ... They can simply mount a filesystem with any number of SUID ... root binaries on it and have their way with the box. ... They have physical access to the machine. ...
  • Re: Notes on support for multiple devices for a single filesystem
    ... device is to have a mount option that contains the path to the block special ... an additional mount option when the device number is stored in the filesystem ... We can either do this in user space, or in kernel space. ...
  • Re: Automove vs Noautomove in BPXPRMxx
    ... read/write filesystem and the executables are in a separate, ... trying to manually mount the filesystem or you have a corrupted mount ... Automove vs Noautomove in BPXPRMxx ... Are you saying you have the same data set name but 2 physically ...