July-7th-2019, 05:46 AM
(This post was last modified: November-4th-2020, 06:53 PM by Armin@netPI.)
Meanwhile I found out why the command
did not work as expected.
Physically the LVM volume BACKUP is directly following the SYSTEM volume. If you now resize the SYSTEM volume with the command above then the original SYSTEM volume remains as it is and at its place - cause there is no immediate space left due to followin BACKUP - and a second socalled "segment" for SYSTEM is created behind the BACKUP volume. So SYSTEM is split in two segments and this cannot be resolved by netPI.
The trick is now to delete the BACKUP volume first and then resize the SYSTEM volume. Volume BACKUP is of no relevance for netPI so you can delete it without remorse. So call first
Make sure you have not called a resizing command before. So take a fresh 1:1 copy of your orignal SD card image. If a second segment was created during resizing the procedure will not work at all.
Now call
with any size (1G = example) you want.
If you want to create the BACKUP volume afterwards too again then call
at the end and you have a 100% partition structure as before but with a larger memory that can be used by netPI.
Insert the card afterwards back into your netPI and boot it and feel happy.
Thx
Armin
Code:
lvresize -L +1G -n -f --resizefs rootfs/SYSTEM
did not work as expected.
Physically the LVM volume BACKUP is directly following the SYSTEM volume. If you now resize the SYSTEM volume with the command above then the original SYSTEM volume remains as it is and at its place - cause there is no immediate space left due to followin BACKUP - and a second socalled "segment" for SYSTEM is created behind the BACKUP volume. So SYSTEM is split in two segments and this cannot be resolved by netPI.
The trick is now to delete the BACKUP volume first and then resize the SYSTEM volume. Volume BACKUP is of no relevance for netPI so you can delete it without remorse. So call first
Code:
lvremove /dev/rootfs/BACKUP
Make sure you have not called a resizing command before. So take a fresh 1:1 copy of your orignal SD card image. If a second segment was created during resizing the procedure will not work at all.
Now call
Code:
lvresize -L +1G -n -f --resizefs rootfs/SYSTEM
with any size (1G = example) you want.
If you want to create the BACKUP volume afterwards too again then call
Code:
lvcreate -L 372M -n BACKUP rootfs
at the end and you have a 100% partition structure as before but with a larger memory that can be used by netPI.
Insert the card afterwards back into your netPI and boot it and feel happy.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)