[BPI-R3] Change or add partion to /overlay

This sounds very interesting!

Do you made any performance tests? I’m interested if this make a difference than using eMMC as main storage and extending it’s partition :slight_smile:

cheers

There is a benchmark for nvme with “hdparm”, but no benchmark for SPI-Nand.
nvme benchmark [KP230 Gen3.0 × 4]


root@BPI-R3:~# hdparm -t --direct /dev/nvme0n1

/dev/nvme0n1: Timing O_DIRECT disk reads: 1908 MB in 3.00 seconds = 635.47 MB/sec


Can get a benchmark by booting with an SD card and running “hdparm” on SPI-Nand, but since are already using to, it may be a little impossible.

But, I’ve used it with both SPI-Nand and eMMC and can’t feel any difference.
I don’t think there will be any problems in practice.
However, SPI-Nand is probably slower than eMMC in terms of Bus speed specifications.

Hello,

Does this work for BPI-R3 and an external USB drive?

Doesn’t seem to work for me… I currently boot from eMMC. Wanting to expand /overlay for more packages, etc.

With this method described by yohru you have to boot from SPI-Nand and then follow the extroot configuration but with eMMC as device.

@yohru thanks for informations, i also think in real world the performance difference is not necessary. i think i’ll try that too :slight_smile:

I have only tested it with eMMC and mvne, but it should work.

Is a ext4 formatted USB memory are visible with “lsusb -t”?
Is it recognized by “block info” and “blcok detect”?
Are the following packages installed?


Required

opkg install kmod-usb-storage
opkg install kmod-usb-storage-uas
opkg install kmod-fs-ext4
opkg install usbutils
opkg install block-mount
opkg install e2fsprogs

It might be convenient

opkg install fdisk cfdisk gdisk

Reference => https://openwrt.org/docs/guide-user/storage/usb-drives

I think my problem maybe due to ubifs? The extroot url page says ubifs will not work.

/dev/ubiblock0_2p1: UUID="4f09ab5b-b1aa15a5-513f1f34-03fe5cc2" VERSION="4.0" TYPE="squashfs"
/dev/ubi0_4: UUID="4feacfee-25d5-464a-92e5-863f58762cd1" VERSION="w5r0" TYPE="ubifs"
/dev/mmcblk0p65: UUID="4f09ab5b-b1aa15a5-513f1f34-03fe5cc2" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mmcblk0p66: UUID="c14525c5-0449-4584-9813-0cc908c2b5d4" LABEL="rootfs_data" VERSION="1.16" MOUNT="/overlay" TYPE="f2fs"
/dev/sda1: UUID="7360cada-50ce-4e9f-9396-618a37ce81e3" LABEL="extroot" VERSION="1.0" TYPE="ext4"

Depending on the startup method(SPI-Nand / eMMC), whether Extroot is possible or not may be different…?
It might be better to extend eMMC using the method described in this thread using “parted”.

I’m still unconfirmed yet.
However, I am writing this as a it may be helpful.

Expanding storage (optional)

Note:
MBR => cfdisk
GPT => cgdisk

Thanks for this Google Wifi writeup.

When using this command:

resize2fs /dev/loop0

Gives, this error:

root@OpenWrt:/# resize2fs /dev/loop0
resize2fs 1.47.0 (5-Feb-2023)
resize2fs: Invalid argument while trying to open /dev/loop0
Couldn't find valid filesystem superblock.

Should the command arguments be modified for BPi-R3?

Thanks,

Navi

PS: Using Current stable release - OpenWrt 23.05.0 on BPi-R3, Want to use docker to run Home assistant on the device, but I am running out of space when installing docker. BPi-R3 is booting from emmmc and I have already used cfdisk to repartition the free space of 7.1gb and it shows up in the software pane of open-Wrt.

Since OpenWrt is now 23.05, I actually tried it.
I tried changing various settings, but it didn’t work.
It seems to be difficult to boot from eMMC and assign /overlay to the free space on the eMMC.

I decided to boot with SPI-Nand as usual and assign /overlay to the entire eMMC.

P.S.
There is no problem if you use HA with the default entity retention of 10 days, but if you want to retain entities for more over 10 days ago, recommend to assign to NVMe SSD.
If something happens to the eMMC, it cannot be easily replaced.

Thanks for the pointers, I think I am going to first test out the setup on eMMC and then buy and install a M.2 NVMe SSD after I figure out best setup for cooling the SSD. Now for me the next step is to boot from NAND and use resize.f2fs /dev/mmcblk0p66 command to extend the overlay to entire 8GB eMMC. Since I am still new to using Linux CLI commands, I am not sure how to partially extend the overlay using resize.f2fs command or I would have only extended the overlay to 2GB to match the RAM.

Since only pcie2.0 x2 lanes available, you do not need a fast and hot ssd.

I use a Kingston NV2 on a pcie3 x4 lane system, and it does not use a lot of power and it does not get hot.

So this NV2 would already be more then fast enough for the PBI-R3 and would not get hot at all.

1 Like

Ok, I was able to increase my storage space by following the instructions in this post https://forum.banana-pi.org/t/bpi-r3-how-to-flash-openwrt-snapshot-on-emmc/14055. Now I have more than enough space (1.46GB to be exact) to install packages.

why only 1.46 GB? from 8GB emmc there should be more free space

Thanks for your other post listing steps to increase eMMC storage space on BPi-R3. I was able to increase my storage space to 1.43GB! However, looking at this discussion I am not sure if increasing it to 1.43GB was such a good idea! Were you able to do the math and figure out what is the ideal storage size for BPi-R3? Considering it has 2GB RAM. Should I Change the size to 764MB as mentioned elsewhere in this thread?

I was trying to be conservative and not exceed the total RAM size of 2GB, but i don’t fully understand the math and consequences of using all storage space on eMMC so maybe I should reconsider! I was thinking of bringing it down to 764MB after reading other posts in this thread. Do you have any recommendation?

no, this is special openwrt handling and i do not use openwrt :stuck_out_tongue:

but afair if you map the additional space not to root-partition there should be no problem with sysupgrade, imho overlay-fs is not touched here…but you should not extend the root-partition with openwrt itself as this is overridden on sysupgrade and backup does not work if too large (depend on available ram).

Is this the correct link below?

Yes, Please scroll down to the last post by Haldi. How to increase useable eMMC space on PBi-R3 and Open-WRT

I have ordered Patriot P300, 512GB, M.2 SSD (P300P512GM28) which is also PCIe Gen 3 x4. Let see how hot this gets. During summer outside temperatures can reach 45.3°C in my area.