question

mfoo avatar image
mfoo asked

Venus GX Partition Layout - small /data

Hello,

Have been hacking around with a Venus GX running v2.90 Large. Using SignalK with node-red embedded rather than the image-provided node-red to facilitate some custom N2K/SignalK functionality. Problem I'm having is the /data partition filling up. At 120MB it is undersized compared to expected parameters.

My understanding is that the partitions should have been resized by installing an image later than v2.73. However I note in my own previous thread from 2021 I forced a firmware installation - Venus GX had v2.72 installed. I crammed the beta v2.70_5-large-18 into it by running swupdate manually.


@mvader answered on that issue that the installer for v2.73 would automagically update the partioning on a Venus GX if required. I assumed that this hook would also be part of the installer for any version after v2.73. Was this mistaken? Is v2.73 the magic sauce? Or perhaps my ham-fisting of the initial large image flipped some bit that breaks the check for repartitioning?

I can advise that in this case v2.90 was installed over v2.70~large via the standard GUI/online update, no manual swupdate shenanigans.

I did try resetting to defaults by applying venus-data.tgz with no apparent change in partitioning. Do not believe this is related to the usual resize2fs for the root partition.

Here's the mounted filesystems after fresh install (/dev/mmcblk0 is a 32GB mSD card):

  1. root@beaglebone:~# df -k
  2. Filesystem 1K-blocks Used Available Use% Mounted on
  3. /dev/root 1212848 832676 301236 73% /
  4. devtmpfs 245884 4 245880 0% /dev
  5. tmpfs 254588 900 253688 0% /run
  6. tmpfs 254588 796 253792 0% /var/volatile
  7. /dev/mmcblk1p5 122835 2053 111608 2% /data
  8. /dev/mmcblk0p1 30736384 4416 30731968 0% /run/media/mmcblk0p1
  9. tmpfs 254588 900 253688 0% /service
  10. /dev/sda1 1932960 696416 1236544 36% /run/media/sda1

After installing node-red under signalk and the venus plugins, /data is just about full:

  1. root@beaglebone:~# df -k
  2. Filesystem 1K-blocks Used Available Use% Mounted on
  3. /dev/root 1212848 832684 301228 73% /
  4. devtmpfs 245884 4 245880 0% /dev
  5. tmpfs 254588 900 253688 0% /run
  6. tmpfs 254588 356 254232 0% /var/volatile
  7. /dev/mmcblk1p5 122835 99248 14413 87% /data
  8. /dev/mmcblk0p1 30736384 4416 30731968 0% /run/media/mmcblk0p1
  9. tmpfs 254588 900 253688 0% /service

Here's what I would expect to find as partition sizes (larger /data) on a beaglebone/Venus GX per https://github.com/victronenergy/venus/wiki/machines

  1. root@beaglebone:~# df
  2. Filesystem 1K-blocks Used Available Use% Mounted on
  3. /dev/root 1261181 316027 883950 26% /
  4. devtmpfs 247184 4 247180 0% /dev
  5. tmpfs 255888 212 255676 0% /run
  6. tmpfs 255888 452 255436 0% /var/volatile
  7. /dev/mmcblk1p5 499656 76652 386308 17% /data
  8. /dev/mmcblk1p6 4374280 8824 4123536 0% /scratch

Hope someone has some guidance! Thanks.

modificationsSignalKstorage
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
mfoo avatar image
mfoo answered ·

In the absence of expert guidance, digging into the install process it seems that the MMC should be repartitioned with sfdisk every time a firmware is installed.

Will try to go run an installer again...


  1. https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-images/venus-install-initramfs/install.sh
  2.  
  3. do_install() {
  4. do_mounts
  5. do_modules $MODULES
  6. do_mtdparts
  7. watchdog &
  8. waitdev $SWUDEV
  9. findimg $SWUDEV
  10. do_testmode
  11. do_format
  12. setup_data $DATADEV $DATAFS
  13. install_swu
  14. install_firmware
  15. setup_board_id
  16. }
  17.  
  18. do_format() {...}
  19.  
  20. format_mmc() {
  21. mmc=$1
  22.  
  23. root_blocks=$((ROOT_SIZE * 1024 * 2))
  24.  
  25. msg "Creating partitions..."
  26. sfdisk -W always /dev/$mmc <<EOF
  27. label: dos
  28. label-id: 0x564e5553
  29. 2048, 16384, c, *
  30. , $root_blocks, L
  31. , $root_blocks, L
  32. ,, E
  33. ,, L
  34. EOF
  35.  
  36. msg "Formatting data partition..."
  37. mkfs.ext4 -F /dev/${mmc}p5
  38.  
  39. DATADEV=/dev/${mmc}p5
  40. DATAFS=ext4
  41. }
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mfoo avatar image
mfoo answered ·

Finally got back to this system today. Installed full fdisk via opt and had a look at the partition table:

  1. # fdisk -l
  2. Disk /dev/mmcblk1: 3.66 GiB, 3909091328 bytes, 7634944 sectors
  3. Units: sectors of 1 * 512 = 512 bytes
  4. Sector size (logical/physical): 512 bytes / 512 bytes
  5. I/O size (minimum/optimal): 512 bytes / 512 bytes
  6. Disklabel type: dos
  7. Disk identifier: 0x564e5553
  8.  
  9. Device Boot Start End Sectors Size Id Type
  10. /dev/mmcblk1p1 * 2048 18431 16384 8M c W95 FAT32 (LBA)
  11. /dev/mmcblk1p2 18432 2639871 2621440 1.3G 83 Linux
  12. /dev/mmcblk1p3 2639872 5261311 2621440 1.3G 83 Linux
  13. /dev/mmcblk1p4 5261312 7634943 2373632 1.1G 5 Extended
  14. /dev/mmcblk1p5 5263360 7634943 2371584 1.1G 83 Linux

So clearly a new partition format was laid out with /dev/mmcblk1p5 being partitioned as 1.1G but the filesystem hadn't been resized. resize2fs to the rescue!

  1. # resize2fs /dev/mmcblk1p5
  2. resize2fs 1.45.7 (28-Jan-2021)
  3. Filesystem at /dev/mmcblk1p5 is mounted on /data; on-line resizing required
  4. old_desc_blocks = 1, new_desc_blocks = 5
  5. The filesystem on /dev/mmcblk1p5 is now 1185792 (1k) blocks long.

And there we go, /data is now a useful size, 1GB instead of 100MB.

  1. root@beaglebone:/# df -k
  2. Filesystem 1K-blocks Used Available Use% Mounted on
  3. /dev/root 1212808 837784 296084 74% /
  4. devtmpfs 245884 4 245880 0% /dev
  5. tmpfs 254588 904 253684 0% /run
  6. tmpfs 254588 380 254208 0% /var/volatile
  7. /dev/mmcblk1p5 1144219 108853 984011 10% /data
  8. /dev/mmcblk0p1 30736384 4416 30731968 0% /run/media/mmcblk0p1
  9. tmpfs 254588 904 253684 0% /service
  10. overlay 254588 380 254208 0% /var/lib
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Experiments, Modifications and Adaptions. Mods (Modifications) can be made to Victron Software by the Community. Please use the modifications space for enthusiasts who want to push what is possible, without official Victron Support.

Additional resources still need to be added for this topic