I am using 3.8.13-bone28 Beaglebone Black. In order to have faster operation, I am looking to switch root partition to btrfs i.e. mmcblk0p2 as below:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 7.5G 0 disk ├─mmcblk0p1 179:1 0 48M 0 part /boot/uboot └─mmcblk0p2 179:2 0 3.3G 0 part /
Having gone through the thread: https://groups.google.com/forum/#!searchin/beagleboard/btrfs|sort:date/beagleboard/R8nlIwEYFfM/mdYBADymAAAJ , it seems like there has been recent enabling of BBB support for btrfs filesystem. However, I was wondering if this support is only applied to 4.x.x kernel or would it also work with the kernel I am using? If so, is it as simple as just changing mmcrootfstype=btrfs rootwait in uEnv.txt?
I tried with a new snapshot and it works very well. Alongside that, I am curious and would like to learn about the BBB conversion from ext4 to flash filesystem. Are there any documentation/manual online that could explain/hint/guide through the filesystem conversion from ext4 to flash filesystem like btrfs?
It's worth pointing out that btrfs is not a flash filesystem, it needs a
FTL (Flash Transition Layer) to do wear levelling on a NAND flash the
same as EXT4 does.
Your biggest hurdle is the fact that U-Boot does not understand btrfs,
so you'll need a /boot partition formatted EXT4. Not sure that this is
likely to change, as porting btrfs to U-Boot could be a major
undertaking as it's much more complex.
BTRFS environment file storage, once a filesystem driver is ported,
should be an easy undertaking… least I didn't find getting U-Boot to
support EXT4 for environment file storage particularly hard as there was
an example for FAT as a starting point.
Ohh brilliant… I was in the process of porting some of my U-boot patches
for another platform over to the latest release (they were built atop a
2014 release), but hadn't gotten around to actually playing with it.
There are definitely still problems with btrfs compression and uboot. If I take this image, update /etc/fstab to add compress=zlib, reboot to remount, and then run “btrfs fi defrag -c -r /” to compress the full filesystem, then it refuses to boot. All I see on the console is “starting the kernel” and then nothing. All the usr lights come on full and it sits there.
I’m still experimenting a bit. I think an attribute can be added to the /boot directory to have it not compress stuff in /boot. I want to see if that helps at all.