Page 1 of 2
Any chance for btrfs as a disk format?

Posted:
Thu Sep 20, 2012 8:02 pm
by jutezak
I'm hoping for btrfs to appear on my NAS. The reason is it allows for snapshots, which are basically backups of what is stored. These take no space; only data updated takes a bit of space. Thus, an MP3 that is tagged will only consume 4k or so extra to keep the two versions. This way, many backups can be kept on a relatively small disk. Just make a snapshot every now and then, and when space gets tight, delete an old snapshot.
It will also be possible to make a backup of a computer to this using rsync. With the --inplace option, rsync will write only modified sections in files - and btrfs will consume only space for those blocks. Allowing efficient backup of a computer.
Apart from this question, I wish to make a great thanks or 'heel erg bedankt' for making the Network Space V2 lite a usable device :)
Re: Any chance for btrfs as a disk format?

Posted:
Fri Sep 21, 2012 5:55 pm
by fvdw
it could be enabled in the kernel as module currently it is not enabled. I will put it on the to do list
After releasing 13-0 I can sent you atrial kernel with support of this file system so you could do some tests but you will also need btrfs tools compiled and installed
Furthermore you need to format a partition in this format and this is not something we have implemented in our firmware, it would mean you have to reformat the big data partition now formatted as ext3 to this file system and of course all data will be lost...also I don't know if samba and the all the other servers can read this kind of format, if not then it makes little sense to implement it.
if it works like a block device then a disk image file could be created and formatted in this format and mounted in the ext3 file system...
Re: Any chance for btrfs as a disk format?

Posted:
Sat Sep 22, 2012 8:48 am
by jutezak
That would be great! I do not mind losing my data at this point. The file system should just work like a normal one, so samba, nfs and everything should work fine. I believe the snapshots will appear in a different file system tree, so the media servers do not have to scan them.
It is useful to have a very recent kernel, though 2.6.39.4 seems to be fine for btrfs given the recent improvements. The only important change is in 3.4:
3.4 - performance, I/O errors are reported to client instead of panicing system
3.2 - performance
3.0 - performance, defragmenting of writes
Performance improvents will never hurt on our little CPU of course.
Re: Any chance for btrfs as a disk format?

Posted:
Sat Sep 22, 2012 1:11 pm
by fvdw
seems you have experience in linux,
Recompiling the 2.6.39.4 kernel with btrfs enable is not too much work. To compile a more recent one is more difficult as it needs special patches to get all features working on the nwsp2 lite back side usb. There is no plan yet to compile a more recent kernel also because 2.6.39.4 is only one year old, recent enough for the time being :-D
seems you have some experience in linux, If you want to try yourself I can recompile the current kernel with btrfs enabled and send it to you, for btrfs progs I need to look if it compiles easily and doesn't need additional dependencies that are not in the firmware
Re: Any chance for btrfs as a disk format?

Posted:
Sat Sep 22, 2012 11:49 pm
by jutezak
I would definitely be willing to try that! I suppose I'll just log in to the nas and dd the kernel over the boot partition there. Easy enough and great stuff. Having the btrfsprogs makes things easier - though connecting the drive to the PC is not a big deal.
Any suggestions for a benchmark to run? I can run bonnie++ over nfs to see how the performance compares, but maybe there are better choices.
Thanks in advance - and again a great many thanks for making this NAS useable.
Thomas
Re: Any chance for btrfs as a disk format?

Posted:
Sun Sep 23, 2012 1:54 pm
by fvdw
Indeed that will be the procedure just write the new kernel with dd to /dev/sda6
In the meantime I recompiled the kernel and it seems to run ok, in dmesg it is reported that btrfs is loaded
- Code: Select all
Linux version 2.6.39.4 (root@fvdwsl-nwsp2.local) (gcc version 4.2.3) #54 PREEMPT Sun Sep 23 13:50:08 GMT+1 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: LaCie Network Space v2
..<snip>
SGI XFS Quota Management subsystem
Btrfs loaded
msgmni has been set to 493
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
<snip>....
I will sent you this kernel by pm
Re: Any chance for btrfs as a disk format?

Posted:
Sun Sep 23, 2012 2:13 pm
by fvdw
pm sent with trial kernel
I also succeeded to compile btrfs progs :bananadance
so those will be sent as well by pm
ps I did not test if they work ok :lmao :whistle
Re: Any chance for btrfs as a disk format?

Posted:
Sun Sep 23, 2012 4:33 pm
by fvdw
In the meantime I tested the btrfs-progs and there seems to be a bug specific for arm
I patched the files
I now could create a disk image of 2 GB and format that with mkfs.brtfs and mount it on the nwsp2 :punk
also the old busybox mount command seems to be able to mount the image
I will sent you the patched files
- Code: Select all
root@fvdwsl-nwsp2:/share/1000/fvdw/btrfs-progs-a55616e # mkfs.btrfs /share/1000/fvdw/test-2000.img
WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using
fs created label (null) on /share/1000/fvdw/test-2000.img
nodesize 4096 leafsize 4096 sectorsize 4096 size 1.95GB
Btrfs Btrfs v0.19
root@fvdwsl-nwsp2: # cd /mnt
root@fvdwsl-nwsp2:/mnt # mkdir btfrs
root@fvdwsl-nwsp2:/mnt # mount /share/1000/fvdw/test-2000.img btfrs/
root@fvdwsl-nwsp2:/mnt # umount btfrs
root@fvdwsl-nwsp2:/mnt # busybox mount /share/1000/fvdw/test-2000.img btfrs/
root@fvdwsl-nwsp2:/mnt # mount
....
/dev/loop1 on /rw_fs/tmp/mnt/btfrs type btrfs (rw,relatime,noacl)
root@fvdwsl-nwsp2:/mnt #
so everything seems to be up and running for your tests
Re: Any chance for btrfs as a disk format?

Posted:
Sun Sep 23, 2012 6:22 pm
by jutezak
I've installed the kernel. The btrfsprogs are in a separate directory in /rw_fs; this is good enough for the moment.
I have unmounted /dev/sda8, made a a btrfs file system on it with default settings, and rebooted the nas. And guess what: it gets mounted and it just works! Now I am copying on some test data for experiments, and reading and thinking a bit on how to use the snapshot feature in a clever way.
Great thanks for this new development!
Re: Any chance for btrfs as a disk format?

Posted:
Sun Sep 23, 2012 7:21 pm
by fvdw
:vhcool nice to hear it is working.
one request what is the read and write speed to this btrfs formatted partition (test with big file of at least 300 MB)?
(On the standard ext3 partition I reach 25 to 30 MB/s)
ps I suppose you are aware that btrfs is still considered as unstable file system and in experimental phase...you might risk to loose your data.. :ugeek: