answered
2017-02-11 11:04:59 +0200
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!
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 +0200 )editCan you take screenshot of Settings > Storage and then also from User data and System data?
Sage ( 2017-02-08 18:16:01 +0200 )edit@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 +0200 )editThat is fine, do you have developer mode installed? If you do could you give output of following cmdline
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 +0200 )editOkay, email sent.
nthn ( 2017-02-08 18:46:27 +0200 )edit