Size of overlay (root)

Hi

I’m familiar with normal partition resizing, but volumio is using squashfs or overlayfs?

This is my current disk:

root@volumio:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 2.0G 497M 1.4G 26% /imgpart
/dev/loop0 247M 247M 0 100% /static
overlay 354M 285M 43M 88% /
devtmpfs 479M 0 479M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 4.7M 482M 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 487M 0 487M 0% /sys/fs/cgroup
tmpfs 487M 16K 487M 1% /tmp
tmpfs 487M 36K 487M 1% /var/log
tmpfs 487M 0 487M 0% /var/spool/cups
tmpfs 487M 0 487M 0% /var/spool/cups/tmp
/dev/mmcblk0p1 61M 29M 33M 47% /boot
tmpfs 98M 0 98M 0% /run/user/1000

I’d like to resize #3 in the list, “overlay 354M 285M 43M 88% /”.

How? I’ve tried expand-the-card-t3942.html, but that script wanted to resize p2, which is blocked by p3…

Both :mrgreen:
The script won’t work for Volumio 2 as the partitioning scheme differs from version 1.5 (which the thread was referring to).
In fact, you should not re-size the disk at all as this is done by Volumio 2 on first boot.
It will resize the 3rd (data) partition to the max. size of the disk.
The partition is for user data and also holds all volumio configuration settings and data.
It also exposes an SMB share (INTERNAL), so you can drop files on it from another Linux, Windows or MAC machine.
The data partition is also used for the dynamic part of the overlayfs filesystem.
That data is in folder /dyn and /ext, you should NOT use or modify these for anything else.

-Gé-

Ah, that explains why it didn’t work.

I want to install lots of packages (yes, I know it’s discurraged), to make a python script running (0p.no/2016/08/17/radios_part_2.html). I made it for musicbox, but that project has died, so I want to port it over to Volumio.

I don’t think that it’s “discouraged”, it’s simply that you need to know what you’re doing and recognise the effects that you may have on the core Volumio system. I think that it actually enriches Volumio if, after completing such a project, you can provide a working guide that allows others to follow in your footsteps without falling into all the potential pitfalls. If it could be worked into a plugin, then even better, but it sounds as though this customisation may be a little more extensive :slight_smile: . Good luck, and let us know how you get on.

Sure, my intention is full documentation and free code. But I still don’t know how to stretch the root fs. =)

You do not need to stretch the rootfs for it, just install your packages. The rootfs is transparent, the added/ modified rootfs files will be stored in the dynamic part of the rootfs (which is on the data partition), this is the nice bit of overlayfs

-Gé-

Really? I got a full disk when installing packages. But I’ll try again and report back with more details.

As you can see in my first post, / was at 88% usage. Now, after installing a few python packages, it’s at 100%…

volumio@volumio:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p2  2.0G  497M  1.4G  26% /imgpart
/dev/loop0      247M  247M     0 100% /static
overlay         354M  325M  2.4M 100% /
devtmpfs        479M     0  479M   0% /dev
tmpfs           487M     0  487M   0% /dev/shm
tmpfs           487M  4.7M  482M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           487M     0  487M   0% /sys/fs/cgroup
tmpfs           487M   16K  487M   1% /tmp
tmpfs           487M     0  487M   0% /var/spool/cups
tmpfs           487M   20K  487M   1% /var/log
tmpfs           487M     0  487M   0% /var/spool/cups/tmp
/dev/mmcblk0p1   61M   29M   33M  47% /boot
tmpfs            98M     0   98M   0% /run/user/1000

I’ve rebooted.

1 Like

Your overlay partition is extremely small to begin with.
This what you should have (Sparky example) after a first boot on a newly flashed image using an 8Gb SD:

overlayfs 5.9G 17M 5.5G 1% / /dev/mmcblk0p2 1.3G 501M 725M 41% /imgpart /dev/loop0 250M 250M 0 100% /static devtmpfs 397M 0 397M 0% /dev tmpfs 495M 0 495M 0% /dev/shm tmpfs 495M 4.7M 491M 1% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 495M 0 495M 0% /sys/fs/cgroup tmpfs 495M 16K 495M 1% /tmp tmpfs 495M 0 495M 0% /var/spool/cups tmpfs 20M 20K 20M 1% /var/log tmpfs 495M 0 495M 0% /var/spool/cups/tmp /dev/mmcblk0p1 60M 9.7M 51M 17% /boot tmpfs 99M 0 99M 0% /run/user/1000
Notice the size of overlay? Are you sure you did not change anything manually between flashing the image and first boot?
-Gé-

Aha. I did try to follow that other disk resize guide for an earlier volumio version, so that probably messed it up. Thanks! I’ll reflash and try again.

Thought so :mrgreen: