Merge pull request #795 from djs55/fix-resize

Fix filesystem resize by calling `e2fsck -f` first
This commit is contained in:
Justin Cormack 2016-11-28 03:42:15 -08:00 committed by GitHub
commit 60beadb13f

View File

@ -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