Size of overlay (root)

Discuss about Hardware diy and tweaks

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Size of overlay (root)

Postby lars » Tue Jan 10 2017 21:19

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...
Random avatar
lars
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jan 10 2017 21:15

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Size of overlay (root)

Postby gkkpch » Wed Jan 11 2017 11:37

lars wrote: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é-
User avatar
gkkpch
Moderator
 
Posts: 757
Joined: Mon Dec 29 2014 22:38
Location: Wollerau, Switzerland


Size of overlay (root)

Postby lars » Wed Jan 11 2017 19:42

gkkpch wrote: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 (https://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.
Random avatar
lars
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jan 10 2017 21:15


Size of overlay (root)

Postby chsims1 » Thu Jan 12 2017 09:52

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 :) . Good luck, and let us know how you get on.
User avatar
chsims1
Moderator
 
Posts: 439
Joined: Sat Aug 02 2014 10:44
Location: East Yorkshire, UK


Size of overlay (root)

Postby lars » Fri Jan 13 2017 09:38

chsims1 wrote: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 :) . 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. =)
Random avatar
lars
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jan 10 2017 21:15


Size of overlay (root)

Postby gkkpch » Fri Jan 13 2017 19:55

lars wrote:
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é-
User avatar
gkkpch
Moderator
 
Posts: 757
Joined: Mon Dec 29 2014 22:38
Location: Wollerau, Switzerland


Size of overlay (root)

Postby lars » Tue Jan 17 2017 09:26

gkkpch wrote:
lars wrote: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.
Random avatar
lars
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jan 10 2017 21:15


Size of overlay (root)

Postby lars » Sat Jan 21 2017 02:07

lars wrote:
gkkpch wrote: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%...

Code: Select all
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.
Random avatar
lars
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jan 10 2017 21:15


Size of overlay (root)

Postby gkkpch » Sat Jan 21 2017 11:25

lars wrote:
lars wrote:
gkkpch wrote: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%...

Code: Select all
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.

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:
Code: Select all
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é-
User avatar
gkkpch
Moderator
 
Posts: 757
Joined: Mon Dec 29 2014 22:38
Location: Wollerau, Switzerland


[Probably solved] Size of overlay (root)

Postby lars » Sat Jan 21 2017 13:37

gkkpch wrote: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:
Code: Select all
overlayfs       5.9G   17M  5.5G   1% /

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.
Random avatar
lars
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jan 10 2017 21:15

Next

Return to Diy and Tweaks

Who is online

Users browsing this forum: No registered users and 0 guests