hi,

we have indeed noticed issues when doing resize2fs on the release images. we are using the Android make_ext4fs utility to create the ext4 images , even for Linux, and it seems to be causing issues when we have 'large' filesystem (e.g. several GBs). The last time we looked into that with Fathi was before the holidays, and we haven't got back to it (at least I haven't).

make_ext4fs is a tool that does 2 things:
 * creates an ext4fs from a local directly
 * sparse the image using Android/fastboot sparse format (https://android.googlesource.com/platform/system/core/+/master/libsparse/sparse_format.h)

It can in theory be replaced by:
* mkfs.ext4 (standard linux tool)
* img2simg tool from Android that creates a sparse image

However we have noticed some slight differences in the sparse images produced by the 2 processes: while make_ext4fs produces image with 'DONTCARE' blocks, img2simg uses FILL blocks (see sparse_format for details). And that change was breaking the tools we use to create the SD image that flashes images on the DragonBoard.. Well i understand this is not a good excuse to not pursue.. and I think we should get back to this topic, and use mkfs.ext4fs instead of make_ext4fs tool to create our Linux images. But that involves quite a bit of changes in many of our jobs.. Many we can start with Hikey builds for now, and in the mean time i can look at fixing the problems with the SD image tools for DragonBoard...

Fathi: do you agree? Do you have time to work on that? Anyone else willing to help?

nico

On Thu, Jan 28, 2016 at 7:02 AM, David Brown <david.brown@linaro.org> wrote:
When working right, resize2fs should be perfectly safe on the rootfs. The kernel/tool has supported online resize for quite some time. I also seem to remember it working with older releases as well.

Otherwise, I have an 8GB eMMC device, with half of the space unused. I guess another alternative would be to make another partition and put an additional 4GB filesystem there.

David

On Wed, Jan 27, 2016 at 10:58 PM, Guodong Xu <guodong.xu@linaro.org> wrote:


On 28 January 2016 at 13:53, David Brown <david.brown@linaro.org> wrote:
I've found even just trying to resize the partition manually with resize2fs results in an error:

root@linaro-alip:~# resize2fs /dev/mmcblk0p9

I could be wrong. But is it good to resize rootfs which is in eMMC in a linux system? When we consider the resize requirement, we focus on resize the SD card partition actually (/dev/mmcblk1px), not eMMC.

-Guodong



resize2fs 1.42.12 (29-Aug-2014)
[  198.540333] EXT4-fs (mmcblk0p9): resizing filesystem from 819200 to 1757691 blocks
Filesystem at /dev/mmcblk0p9 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
[  198.603678] EXT4-fs warning (device mmcblk0p9): reserve_backup_gdb:969: reserved block 192 not at offset 191
[  198.613577] EXT4-fs (mmcblk0p9): resized filesystem to 1757691
Performing an on-line resize of /dev/mmcblk0p9 to 1757691 (4k) blocks.
[  198.688748] EXT4-fs warning (device mmcblk0p9): reserve_backup_gdb:969: reserved block 192 not at offset 191
resize2fs: Invalid argument While trying to add group #25

David

On Wed, Jan 27, 2016 at 10:36 PM, Guodong Xu <guodong.xu@linaro.org> wrote:
+Akira and Ricardo.

Akira, yes we met the same problem in Lemaker. Bruce Zou from lemaker just reported a similar issue here:



On 27 January 2016 at 11:41, Guodong Xu <guodong.xu@linaro.org> wrote:
Hi, Nico and Fathi


Bruce from Lemaker reported this issue when he tries to use 'resize-helper.sh' to resize his SD card on HiKey. Here is his log.

Would you please have a check? Does his procedure correct?

-Guodong



On 27 January 2016 at 10:19, bruce.zou <bruce.zou@lemaker.com> wrote:

Hi

 

         昨天聊的这个问题,帮忙看看哈。重启后没有任何变化。

 

root@linaro-alip:~# lsblk

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT

mmcblk0boot0 179:64   0    4M  1 disk

mmcblk0boot1 179:128  0    4M  1 disk

mmcblk0      179:0    0  7.3G  0 disk

├─mmcblk0p1  179:1    0    1M  0 part

├─mmcblk0p2  179:2    0    1M  0 part

├─mmcblk0p3  179:3    0    1M  0 part

├─mmcblk0p4  179:4    0    8M  0 part

├─mmcblk0p5  179:5    0    2M  0 part

├─mmcblk0p6  179:6    0   64M  0 part /boot/efi

├─mmcblk0p7  179:7    0  256M  0 part

├─mmcblk0p8  179:8    0  256M  0 part /media/linaro/cache

└─mmcblk0p9  179:9    0  6.7G  0 part

mmcblk1      179:192  0  7.4G  0 disk

├─mmcblk1p1  179:193  0   68M  0 part /media/linaro/boot

└─mmcblk1p2  179:194  0    2G  0 part /

root@linaro-alip:~# ./resize-helper.sh

Warning: The kernel is still using the old partition table.

The new table will be used at the next reboot.

The operation has completed successfully.

Error: Partition doesn't exist.

resize2fs 1.42.12 (29-Aug-2014)

The filesystem is already 506880 (4k) blocks long.  Nothing to do!

root@linaro-alip:~#

 

 

Bruce Zou

Making Innovation Easy
LeMaker Team -- The Professional Makers for Hardware and Software Customization.

Address: B1002, SIAT campus, Shenzhen University Town, Shenzhen, China 
Post Code: 518055 

Email:
support@lemaker.org (Technical Support) 
product@lemaker.org (Product Distribution) 

http://www.lemaker.org/

 




_______________________________________________
Dev mailing list
Dev@lists.96boards.org
https://lists.96boards.org/mailman/listinfo/dev