We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

add btrfs storage to /home

asked 2015-07-06 00:15:05 +0300

gfwp gravatar image

Hi,

right here on my desk I have a Jollaphone and a huge 128GB mini SDXC Card recycled from a previously owned tablet...

I've read around a little. Posts like: 1) https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/ and 2) https://together.jolla.com/question/34087/wiki-microsd-microsdhc-microsdxc-card/ and also others...

If I understand correctly nobody has got a /home storage expansion on / or /home (/home is a subvolume from what I see) simply using the btrfs raid0 storage striping.

In the propoposal 1) is to me not clear the destiny of the /jolla subvolume. Does it stay on a separate mount path in /media/sdcard/jolla ? Does it get mounted automatically?

Is it viable the following strategy? (... no idea of what could happen upon a sailfish update...)

1) Create 2 partitons on sd card (which format? Perhaps MS-DOS?). 2) Format both partitions. The first one up to 32GB in fat32 for android and the other with btrfs. Merge in raid0 the brtfs with / volume

Any clue is welcome

Regards

Giorgio

P.S: I'm admittedly a newbie with btrfs

edit retag flag offensive close delete

Comments

1

If you're going to merge with the / volume here are some things that need to be thought about.

  1. Does the boot process scan correctly for multi partition btrfs volumes?
  2. If you remove the card your volume will be incomplete: if set up without redundancy I.E. raid0, jbod then the volume is incomplete and can't be used, card can not be removed while phone is active at all, inclusive of set alarms.
  3. If the card fails, incomplete volume total data loss likely, then its 1 back to Jolla Care for a fresh flash of primary OS, unless you've got a disk image of original OS, then you'll need to restore it manually.
  4. You can not share the card with any other device, as it might try and restore/format the partition. I.E. corrupt the card see point 3. Therefore make one partition and lock the card in the Jolla.
  5. If the card is slow it could slow the whole FS.
  6. Something I've likely forgotten.

Advantages of adding a card to the / volume I see are

  1. Easy expansion of space that is shared effectively.
  2. If it's a quick card, could improve Disk IO as it'll be split between 2 physical flash devices.
  3. Lost phone, most likely if the person with your now lost/stolen phone is malicious they'll rip card out and try to read it's contents, being an incomplete volume, it'll be nearly useless for them, which means they'll have to break any code on the phone to easily retrieve any data, if they haven't already trashed the partition on the card.
  4. Wear leveling the flash drive.
  5. Again something I've likely forgotten.
GD ( 2015-07-06 02:52:57 +0300 )edit

Hey, for your question about 1) yes the jolla subvolume is being set default so the jolla-mountsd script mounts it just like any other card.

With your idea to add your sd to the rootfs or @home, there is a whole thread about that on http://talk.maemo.org and I strongly suggest to not do it. Why? Because Jolla may do funky things as they like and for sure they do not consider you having your uSD integrated into / or /home when upgrading. So if need be, mount uSD to /home/nemo completely but not integrated. That way you have internal storage @home still functional if the uSD mount breaks/fails, for / you better have a flashable image at hand when tinkering with it. Playing with the internal storage device can easily brick your phone for good. In future upgrades the uSD will be more utilized automatically for eg camera default storage among other things. So if you have trouble getting your internal storage consumption down I suggest you move irrelevant data off site only. I moved Android's user-data folder only as that is what consumes most of the space. It is also shared, in terms, both mounts make use of all of your uSD.

chemist ( 2015-07-06 11:50:51 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-07-06 13:20:58 +0300

V10lator gravatar image

"Create 2 partitons on sd card (which format? Perhaps MS-DOS?)"

The SailfishOS kernel understands MS-DOS and GPT (EFI) :

# cat .config | grep PARTITION
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_LDM_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-07-06 00:15:05 +0300

Seen: 428 times

Last updated: Jul 06 '15