mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
fsadm: add luks specific error message for small devices
This commit is contained in:
parent
888dd33148
commit
6df7917581
@ -581,6 +581,10 @@ resize_luks() {
|
|||||||
error "New size is not sector alligned"
|
error "New size is not sector alligned"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $((NEWBLOCKCOUNT - CRYPT_DATA_OFFSET)) -lt 1 ]; then
|
||||||
|
error "New size is smaller than minimum ($(((CRYPT_DATA_OFFSET + 1) * 512)) bytes) for LUKS device $VOLUME"
|
||||||
|
fi
|
||||||
|
|
||||||
NEWCBLOCKCOUNT=$((NEWBLOCKCOUNT - CRYPT_DATA_OFFSET))
|
NEWCBLOCKCOUNT=$((NEWBLOCKCOUNT - CRYPT_DATA_OFFSET))
|
||||||
NEWFSIZE=$(( NEWCBLOCKCOUNT * 512))
|
NEWFSIZE=$(( NEWCBLOCKCOUNT * 512))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user