Ask / Submit
5

Mounting sd card fails (BTRFS extref option of recent kernels)

asked 2014-04-12 18:44:01 +0200

wvh gravatar image

Mounting a microSDXC card formatted as a raw BTRFS block device fails:

[ 9706.256553] mmcblk1: unknown partition table
[ 9706.524003] device label Jolla devid 1 transid 4 /dev/mmcblk1
[ 9706.526780] btrfs: disk space caching is enabled
[ 9706.526811] BTRFS: couldn't mount because of unsupported optional features (40).
[ 9706.572652] btrfs: open_ctree failed

Recent Linux kernels enable a BTRFS feature called "extref". I think the current Sailfish kernel doesn't understand this option yet; it might be a good idea to take this into consideration in future updates.

The card is a Samsung 64GB Pro microSDXC that came initially formatted as ExtFS. I reformatted it as BTRFS without partitions with a recent kernel on a Debian system. BTRFS apparently enables the "extref" option by default these days.

I hope this helps others who have the same problem.

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
2

answered 2014-04-13 13:20:44 +0200

gabriel gravatar image

Sailfish OS runs on Linux kernel 3.4 - the recommended approach with btrfs is that you either format your card with a 3.4 kernel or you use the phone itself. Future kernels will definitely support the format in 3.4, but the other way around won't work.
This is due to the fact that btrfs is still in experimental state, albeit it works pretty well. If you want to have fewer problems, use ext4 or one of the FAT formats.
I myself use btrfs, and I formatted the card with the phone - no problems there at all reading back with kernels 3.10 or 3.12.

edit flag offensive delete publish link more

Comments

I don't have any systems with kernel 3.4 around anymore, but you're right, formatting the microSDXC card from within Sailfish works fine.

It should also be possible to disable the "extref" option when creating a new file system with a recent kernel:

mkfs.btrfs -f -O ^extref -L Jolla-sdcard /dev/mmcblk0 # check with lsblk!
wvh ( 2014-04-13 13:55:59 +0200 )edit

Yes, it's definitely possible to disable options, but bear in mind that there are other aspects of the btrfs format that may differ too and you may not be able to opt-in/out, so be very careful. Again btrfs is at experimental state on 3.12, it was even more on 3.4 :-)

gabriel ( 2014-04-13 13:58:09 +0200 )edit
  1. I made this on my Gentoo desktop (kernel 3.12.13):

    mkfs.btrfs -L Kingston -f /dev/sdc1

WARNING! - Btrfs v3.12 IS EXPERIMENTAL WARNING! - see http://btrfs.wiki.kernel.org before using Turning ON incompat feature 'extref': increased hardlink limit per file to 65536 fs created label Kingston on /dev/sdc1 nodesize 16384 leafsize 16384 sectorsize 4096 size 59.00GiB 2. I copied hundreds of ogg music files to the card. 3. I put the card in to my Jolla(1.0.5.16) and installed the app Media. I have only been an ordinary Jolla user so far. I have not seen any music files in the the app Media. When will Jolla update the kernel from 3.4 to 3.12 or later?

Mr E ( 2014-04-16 21:42:56 +0200 )edit

Mr E: my understanding is that the kernel is the one that Android uses, so I'd ask Google :-) In the meantime, follow my suggestion and you'll be fine.

gabriel ( 2014-04-17 19:43:33 +0200 )edit

Mr E: disable "extref" when you make the file system. Your phone can't mount the card otherwise and hence won't find any music. I doubt you need the "extref" option on a phone anyway.

If you make the BTRFS file system without that option (or on the phone itself), Jolla mounts the file system and finds the music files immediately when you insert the card.

wvh ( 2014-04-21 01:32:26 +0200 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2014-04-12 18:44:01 +0200

Seen: 2,189 times

Last updated: Apr 13 '14