Experiment /etc/fstab

asked 2015-12-31 17:32:13 +0300

GD gravatar image

Experiment mounting sdcard using traditional linux /etc/fstab file.

It Works

Known glitchs

  1. Jolla mount script will not mount card. Only an issue if using sub volumes in btrfs (Which I am)
  2. Upgrade from 1.1.6 -> 1.1.7 Failed until I unmount the manual mount (Completed correctly whilst mounted for both 1.1.7 -> 1.1.9 and 1.1.9 -> 2.0.0 NOTE This was for a simple mount not for either /home or /data)

Now for the Why

  1. Learning what Sailfish is like.
  2. More space for user storage
  3. Less chance of btrfs out of space issues for root drive
  4. less flash wear for inbuilt storage
  5. Above all why not try something new? After all a factory reset will reset the fstab anyway therefore it should NOT brick the device if it fouls up big time.
Cons:
  1. If some on knows how to mount a non default btrfs sub volume, the've got access to data. by simply removing the card.
  2. Sensitive data should be sim linked back to internal storage
  3. Depending on the card read/write speed may cause some performance slowdowns.
  4. If the card can't be mounted then the phone is broken untill a factory reset is performed unless you can fix the card in another computer/phone.

/home aka User Storage

Mounting /home to a btrfs sub volume on the sdcard.

Interesting side effects.

  1. In system settings about product produces to space sage circle graphs. 1 for System storage the other User storage.

Android

Mounting /data to a btrfs sub volume on the sdcard

Con:

  1. Apps are slower as they have slower disk access (at least for my class 10 card)

Interesting side effects.

  1. Android apps think that the ROM is 30Gb

Warning

This is not for those that blindly follow instructions. Understand what you're doing or it'll likely end up in a factory reset.

There said that but here are a few points to think about.

  1. If the sdcard is missing/dies then no boot for you, as required mounts fail the phone will not be able to boot.
  2. If you want to revert then, space may be an issue, as you'll like use more.
  3. Untested if and upgrade will fail when /home or /data are mounted on sdcard

Base steps I tested

  1. Ensure you have all you wanted pictures, contacts, music, etc backed up You could loose it remember.
  2. Formatted sdcard using https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-btrfs-and-share-space-with-android/
  3. created 3 sub volumes
    @home for home
    android for data
    Jolla for a typical mount (Set as default subvol)
  4. STOP android support (via command line or any utility suchs as Jolla's own utils.)
  5. temp mount the appropriate subvol to say /srv (it's only tempory)
  6. I used rsync you can us cp with "-a" also. Copy/Sync the data and or home to ie. rsync -vah /data/* /srv
  7. edit /etc/fstab
    /data add a line similar for home except using the uuid of your sdcard and change the subvol to android
    /home comment out the /home mount (Easier to return if in doubt) add a new line the same except for change the uuid to that of sdcard
    Finally add one for /media/sdcard/"sdcard-uuid" this time do not specify subvol
  8. restart device
  9. Test it out

Waiting

Now waiting to see if it fails the next upgrade? Which hopefully will be soon enough.

Still haven't made My mind if i'll go back yet or not. Interesting to see other peoples opinions of this.

edit retag flag offensive close delete

Comments

Thanks a lot for sharing your findings!

lakutalo ( 2015-12-31 23:51:38 +0300 )edit

In case of dead sdcard, if the mount device was specified by device name instead of uuid, would there be a chance of booting the phone simply by replacing the sdcard?

tlsiu ( 2016-01-02 14:17:59 +0300 )edit

Not that I'm currently willing to test, but I'd assume yes but in a limited capacity. Obviously data, contacts, and all your accounts etc would be missing, it'd probably have a fit building your user profile. You may need to create the directory nemo on the card first.

GD ( 2016-01-04 12:48:08 +0300 )edit