mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-30 05:49:28 +03:00
fsadm: add luks specific error message for small devices
This commit is contained in:
@ -581,6 +581,10 @@ resize_luks() {
|
||||
error "New size is not sector alligned"
|
||||
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))
|
||||
NEWFSIZE=$(( NEWCBLOCKCOUNT * 512))
|
||||
|
||||
|
Reference in New Issue
Block a user