Increasing the "root" LVM volume size

I resized my root volume size following the detailed tutorial on tjc
https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size
Maybe not for the fainthearted but everything worked fine. Is this change persistent if I now reset the device? TIA

Hello,

did you try this on a running system or right after flashing Sailfish OS ?..
I would try that too, but can not use a data loss right now.

Greetings
Steffen

it was an xperia x that I had just reset but as far as I can remember any little changes I made were retained…wait for more advice before deciding!

Are you from germany? If so you can read my forum-post at the Link here.
I have do it with a complete installed SFOS-XA2+ with many apps (native and android).
I also logged the terminal output of the commands there.

Hello, I have now followed the instructions. I have used the default values. And since the file system also used the 625 blocks, everything went through error-free. But the most important thing for me is that I didn’t lose any data.

Greetings
Steffen

Thanks Volker_S, no I don’t speak German but I had a look and the post seems pretty much like the tjc one linked above. My main questions remains: does this change remain after a reset?
And now, on an xa2 I get this message: “telnet: Unable to connect to remote host: Connection timed out.” Any ideas? I found a brief note on the zendesk page that you must have an sdcard in the device for recovery to work, but still no joy.

That depends on what you call a “reset”.
I have not tested any of that, but from what I understand, a “factory reset” done on the device itself just wipes the home partition and possibly uninstalls third party rpms. None of that should change any partition sizes.

Re-flashing the device using the install images however will most certainly reset the partition sizes.

thanks sigurg, that makes sense. I may try soon and post results.

I resized an encrypted phone with a cracked screen, just for fun (just had an operation on my achille’s tendon) and had telnet connection problems. Posted solution here @ “Resizing root directory - telnet connection problems”. Device with lots of apps and data, nothing lost that I can see so far.

For your question, if this change persists: no, I’m afraid not.
I did this on a X10plus and after a reset (settings\reset) due to non related update problems, the expanded root drive was back to default. (The next update went smooth, so this failed update was a different issue).

As the whole LVM area is created when installing SailfishOS, a “factory reset” or re-flashing SailfishOS will create the original LVM layout again; unless Jolla changes the default sizes of the LVM volumes (“root” and “home”).

@defactofactotum, does that fully answer your question?

1 Like

Well, you definitely shall backup before resizing filesystems with valuable data on them.

And better double check that there is sufficient free space for the single shrinking action (the first resize2fs of the “home” volume), which is implicitly provided by a freshly flashed SailfishOS.
The shrinking of the “home” volume is the only really critical action, which may result in data loss. Note, that it should abort with an error message without doing anything, if there is insufficient space; but if it really fails the “home” filesystem might be spoiled.

Thanks Olf, and thanks for the resizing guide.

IIRC there are also some TJC threads which talk about changing the partition sizes in the flashable image itself.

That would obviously persist in the reflashing case.

I had a quick look but couldn’t find anything…but sounds good. On the other hand the resize operation as described is easy enough to do