Ask / Submit
25

Installing system updates fails when there is not enough space in "system data" partition

asked 2017-02-08 16:47:43 +0300

nthn gravatar image

updated 2017-07-24 21:27:37 +0300

The Jolla Tablet, the Jolla C/Aqua Fish and the Turing Phone all only have less than 2,5GB system memory (see https://together.jolla.com/question/154944/ or https://together.jolla.com/question/153509/ with no solution and a bricked phone). 2GB of this is immediately filled, and system updates require 500MB free memory. Ergo, installing system updates is impossible.

How can this be solved? Why is the system partition not at least twice the size? Whose fault is this?

Update: Sailfish 2.1.1.23 now requires 520MB. This is only getting worse.

edit retag flag offensive close delete

Comments

5

I can confirm this serious issue on my Jolla C (at least with the 2.0.4 -> 2.0.5 upgrade where I had to remove almost all apps to be able to proceed). This needs to be dealt with.

nodevel ( 2017-02-08 16:52:26 +0300 )edit
4

Can you take screenshot of Settings > Storage and then also from User data and System data?

Sage ( 2017-02-08 18:16:01 +0300 )edit
1

@Sage:

Settings > Storage

User data

System data

I can retake them in English if needed, but I think it should be clear.

nthn ( 2017-02-08 18:22:49 +0300 )edit
2

That is fine, do you have developer mode installed? If you do could you give output of following cmdline

 devel-su du -x -a / > /home/nemo/Documents/filelist.txt

and then share that file or if you don't want to share it publicly (it might contain some personal information in filenames etc.) you can send it to my e-mail: marko dot saukko (a) jolla dot com :)

Sage ( 2017-02-08 18:36:00 +0300 )edit
1

Okay, email sent.

nthn ( 2017-02-08 18:46:27 +0300 )edit

3 Answers

Sort by » oldest newest most voted
12

answered 2017-02-11 11:04:59 +0300

seiichiro0185 gravatar image

updated 2017-02-11 11:15:46 +0300

On the Jolla C it is possible to change the space for root (System Data) and home (User data) using the revocery mode.

EVERYTHING I WRITE HERE WAS TESTED SUCESSFULLY ON MY JOLLA C, I TAKE NO RESPONSIBILITY IF THIS INSTRUCTIONS BRICK YOUR PHONE, TRASH YOUR DATA, KILL YOUR KITTEN... !! BE SURE TO MAKE BACKUPS OF ANYTHING IMPORTANT ON YOUR PHONE BEFORE ATEMPTING THIS.

THE FOLLOWING INSTRUCTIONS ARE ONLY FOR EXPERIENCED USERS. PLEASE READ AND UNDERSTAND THE WHOLE THING BEFORE DOING IT! IF YOU FOLLOW THE INSTRUCTIONS YOU ARE DOING SO AT YOUR OWN RISK!!

So enough with the Disclaimer, Here are the steps:

  • Make sure you have enough free space on User data (home), at least as much as you want to assign to System Data!
  • Get you Jolla C into Recovery Mode
  • Select "Shell" in the Recovery Menu:
  • Confirm the Prompt and enter your Device Lock Code if asked
  • Check the current lvm layout:

/ # lvm 
lvm> vgs 
  VG       #PV #LV #SN Attr   VSize  VFree
  sailfish   1   2   0 wz--n- 12.93g    0   
lvm> lvs 
  LV   VG       Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home sailfish -wi-a----- 10.49g    
  root sailfish -wi-ao----  2.44g    
lvm>

  • Check and resize the home filesystem (make sure you free up enough space, I resized to 5GB, so there is roughly 5GB of free space after it. Best is to resize smaller than the intended Size to have an error margin, we will re-add the additional space later

/ # e2fsck -f /dev/sailfish/home 
e2fsck 1.43.1 (08-Jun-2016)
home: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
home: 9887/615552 files (1.7% non-contiguous), 244132/2749440 blocks

/ # resize2fs /dev/sailfish/home 5G
resize2fs 1.43.1 (08-Jun-2016)
Resizing the filesystem on /dev/sailfish/home to 1310720 (4k) blocks.
The filesystem on /dev/sailfish/home is now 1310720 (4k) blocks long.

  • Reduce the size of the home LV, add the freed space to the root LV

/ # lvm
lvm> lvresize -L -2663M /dev/sailfish/home
  Rounding size to boundary between physical extents: 2.60 GiB
  WARNING: Reducing active logical volume to 7.89 GiB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce home? [y/n]: y
  Size of logical volume sailfish/home changed from 10.49 GiB (2685 extents) to 7.89 GiB (2020 extents).
  Logical volume home successfully resized
lvm> lvresize -l +100%FREE /dev/sailfish/root
  Size of logical volume sailfish/root changed from 2.44 GiB (625 extents) to 5.04 GiB (1290 extents).
  Logical volume root successfully resized
lvm> lvs 
  LV   VG       Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home sailfish -wi-a----- 7.89g    
  root sailfish -wi-ao---- 5.04g

  • Resize filesystems to the new LV sizes

/ # resize2fs /dev/sailfish/home
resize2fs 1.43.1 (08-Jun-2016)
Resizing the filesystem on /dev/sailfish/home to 2068480 (4k) blocks.
The filesystem on /dev/sailfish/home is now 2068480 (4k) blocks long.
/ # resize2fs /dev/sailfish/root
resize2fs 1.43.1 (08-Jun-2016)
Filesystem at /dev/sailfish/root is mounted on /rootfs; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/sailfish/root is now 1320960 (4k) blocks long.
/ #

If everything went well you can now leave the revcovery shell and reboot your Phone. You should see the new sizes for User data and System data in the Settings.

These Instructions might work on other Devices that use LVM and EXT4, but I did not try this.

I did not experience any negative effects so far, but that doesn't mean there aren't any!

AND AGAIN: YOU DO EVERYTHING WRITTEN HERE AT YOU OWN RISK!

edit flag offensive delete publish link more
11

answered 2017-02-08 22:07:09 +0300

Sage gravatar image

If you have such issues you can help debug the issue with following.

NOTE: it is not recommended to enable developer mode if you do not know what you are doing.

NOTE: by providing the files you might reveal some personal data based on installed packages or files. You have been warned.

  1. Say which device you have and if you have

  2. Say if you have enabled developer mode and installed some packages outside jolla store or done some "hacking" with the device and touched as root user (devel-su)

  3. Provide screenshots of following pages:

    1. Settings > Storage

    2. Settings > Storage > System data

    3. Settings > Storage > User data

  4. Run following commands in developer mode, in terminal or over ssh and provide the files for review:

rpm -qa --queryformat '%{SIZE}\t %{NAME}-%{version}\n' > /home/nemo/Documents/pkgs.txt

ssu lr > /home/nemo/Documents/repo-setup.txt

devel-su du -x -a / > /home/nemo/Documents/filelist.txt

In many cases the problem is found from some files that user has installed to system data partition which then prevents installation of the update. This usually is because of some hacking/development which has caused stale files to system data partition or installation of packages that consume the space from system data partition.

Each case seems to be a bit different and caused by user doing thing in developer mode.

edit flag offensive delete publish link more

Comments

I managed to free enough space by deleting quite many application. Not desired workaround but I have now made the update successfully. I would be nice to show which application etc. is taking the most space so one can easier decide what to remove.

KylliOrvokki ( 2017-02-10 14:44:30 +0300 )edit
4

answered 2017-04-03 22:41:25 +0300

thisisme gravatar image

I had the same problem when trying to update to 2.1.0.11 EA release in my Jolla C. I couldn't figure out what files to remove but I noticed that the free space was slowly decreasing even while I was checking the filesystem.

I hadn't rebooted the phone in several days so I tried rebooting the phone and suddenly the used space dropped from 85% to 55%... No idea what exactly hogged the space but it might work for someone else too...

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
13 followers

Stats

Asked: 2017-02-08 16:47:43 +0300

Seen: 1,891 times

Last updated: Jul 24