balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
969 stars 116 forks source link

Data partition filesystem resize fails for large disks #1977

Closed alexgg closed 2 years ago

alexgg commented 4 years ago

When provisioning on large disks the filesystem resize fails with:

Jul 28 14:17:44 localhost sh[740]: Resizing the filesystem on /dev/disk/by-state/resin-data to 1952801880 (1k) blocks.
Jul 28 14:17:44 localhost sh[740]: The filesystem on /dev/disk/by-state/resin-data is now 1952801880 (1k) blocks long.
Jul 28 14:17:44 localhost kernel: EXT4-fs (sda6): ext4_check_descriptors: Block bitmap for group 131056 not in group (block 35184616189952)!
Jul 28 14:17:44 localhost kernel: EXT4-fs (sda6): group descriptors corrupted!
Jul 28 14:17:44 localhost resin-partition-mounter[758]: mount: /run/tmp.gN6HRW0bOF: mount(2) system call failed: Structure needs cleaning.
Jul 28 14:17:44 localhost resin-partition-mounter[758]: umount: /run/tmp.gN6HRW0bOF: not mounted.
Jul 28 14:17:44 localhost resin-partition-mounter[758]: resin-data: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
Jul 28 14:17:44 localhost resin-partition-mounter[758]:         (i.e., without -a or -p options)
Jul 28 14:17:45 localhost resin-partition-mounter[758]: WARN: UUIDs not regenerated - retry on next boot
Jul 28 14:17:45 localhost resin-partition-mounter[758]: INFO: Mounting /dev/disk/by-state/resin-data (resin-data) in /mnt/data.
Jul 28 14:17:45 localhost kernel: EXT4-fs (sda6): ext4_check_descriptors: Block bitmap for group 131056 not in group (block 35184616189952)!
Jul 28 14:17:45 localhost kernel: EXT4-fs (sda6): group descriptors corrupted!
Jul 28 14:17:45 localhost resin-partition-mounter[758]: mount: /mnt/data: mount(2) system call failed: Structure needs cleaning.

This might be related to resize2fs, see https://github.com/rancher/k3os/issues/145

For details see https://jel.ly.fish/2399d089-df1b-4d01-b2f3-26ae4cda77af

The hardware it's reported on is: https://www.intel.com.au/content/www/au/en/products/boards-kits/nuc/kits/nuc8i3beh.html

And it reportedly works in 2.38.3+rev4

jellyfish-bot commented 4 years ago

[rahul-thakoor] This issue has attached support thread https://jel.ly.fish/2399d089-df1b-4d01-b2f3-26ae4cda77af

floion commented 4 years ago

Ordered 1 https://www.amazon.co.uk/Seagate-BarraCuda-Internal-Drive-Factor/dp/B01LXRWWB6/ref=sr_1_fkmr0_1?dchild=1&keywords=Seagate+2TB+BarraCuda+2.5%22+hdd+model+ST2000LM015+%28SATA+III%29&qid=1596786027&sr=8-1-fkmr0 and will investigate once we get the hw

alexgg commented 2 years ago

Addressed in the linked PR, closing.