I searched the previous discussions but could not find a solution to this specific use case. If not, please excuse me.
I just installed OpenWRT stable release and I want to extend Disk Space to have more room for packages.
I run “parted” from EMMC and have this partitions:
Number Start End Size File system Name Flags
128 17.4kB 4194kB 4177kB bios_grub
1 4194kB 4719kB 524kB ubootenv hidden, legacy_boot
2 4719kB 6816kB 2097kB factory hidden
3 6816kB 11.0MB 4194kB fip boot, hidden, esp
11.0MB 12.6MB 1573kB Free Space
4 12.6MB 46.1MB 33.6MB recovery boot, hidden, esp
46.1MB 67.1MB 21.0MB Free Space
5 67.1MB 176MB 109MB production
6 176MB 7818MB 7642MB owrt-volumes lvm
On Snapshot I used to reboot from NAND and then extend with parted using unallocated free space after the “production” partition. But on Stable release the free space after “production” partitions it is allocated as “owrt-volumes” (/dev/mmcblk0p6)
Can I delete the owrt-volumes before extend “production” (/dev/mmcblk0p5)?
There is a different/better way to proceed?
Here are my notes for setting up each of my BPI-R3 boxes. This has been in stable use for many months now. This should solve your issue.
Getting OpenWRT onto the device in the first place:
[OpenWrt Wiki] Sinovoip BananaPi BPi R3 V1.0, V1.1.
Firstly put the sdcard image onto the sdcard, set DIP
switches to boot into sdcard. Use the serial bootloader
menu to have it write to NAND. Remove sdcard, set DIP
switches to boot into NAND. Use the serial bootloader
menu to have it write into eMMC. Set DIP switches to
eMMC, it’s 8Gb of storage.
DIP switches:
0000 NOR
1010 NAND
0100 eMMC (disables sdcard)
1111 sdcard (disables eMMC)
BEFORE doing anything else you need to expand packages storage
from its paltry 58Mb. I couldn’t get extroot working on these
boards, so flip boot DIP switches to 1010 (NAND) and do:
Put DIP switches to 0100 (eMMC) and packages storage should now
be 1Gb, which is more than plenty. Probably best to run firstinstall
first to factory reset everything, then install autopart and uvol
to have the system create a separate LVM partition in the remaining
6Gb of space, this can be formatted as f2fs and used as long term
storage e.g. sensor readings. Configuring it as a samba share is
useful.
kept the switches to up,down,up,down and ssh’d back in… still the weird df -h output… tried to run the commands in your block:
root@OpenWrt:~# parted /dev/mmcblk0
GNU Parted 3.6
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/mmcblk0: unrecognised disk label
Model: MMC 008GB0 (sd/mmc)
Disk /dev/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
(parted) resizepart 5 +1G
Error: /dev/mmcblk0: unrecognised disk label
(parted)
assumed above is the issue but tried to resize.f2fs (and installed f2fs-tools with opkg), and this fails as there is no mmcblk0p66
You can safely remove owrt-volumes, it’s the LVM2 partition used for uvol to store additional user volumes and/or containers. It may contain your user data, but does not contain anything needed to boot.
The output of df -h suggests that you are running from an initramfs – the bootloader decides to start a recovery system instead of running bootcmd in case some crash logs are in pstore or production image has been corrupted. Please check (and remove) the content of /sys/fs/pstore/ and try again.