mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 02:51:55 +00:00
Merge pull request #795 from djs55/fix-resize
Fix filesystem resize by calling `e2fsck -f` first
This commit is contained in:
commit
60beadb13f
@ -7,7 +7,7 @@ depend()
|
||||
|
||||
do_fsck()
|
||||
{
|
||||
/sbin/e2fsck -p "$1"
|
||||
/sbin/e2fsck -p $*
|
||||
EXIT_CODE=$?
|
||||
# exit code 1 is errors corrected
|
||||
[ "${EXIT_CODE}" -eq 1 ] && EXIT_CODE=0
|
||||
@ -44,6 +44,8 @@ do_fsck_extend_mount()
|
||||
blockdev --rereadpt $diskdev 2> /dev/null
|
||||
mdev -s
|
||||
|
||||
# resize2fs fails unless we use -f here
|
||||
do_fsck -f "$DATA" || return 1
|
||||
resize2fs "$DATA"
|
||||
|
||||
do_fsck "$DATA" || return 1
|
||||
|
Loading…
Reference in New Issue
Block a user