If I have a filesystem on a partition or disk that is already the same size as that partition or disk growfs reports an error:
# growfs -y /dev/md0 growfs: requested size 100MB is not larger than the current filesystem size 100MB
Of course I can embiggen the disk/partition and growfs:
# mdconfig -d -u 0 # truncate -s 110M disk-image # mdconfig -a -f disk-image # growfs -y /dev/md0 super-block backups (for fsck_ffs -b #) at: 205248
and get an error on a subsequent attempt:
# growfs -y /dev/md0 growfs: requested size 110MB is not larger than the current filesystem size 110MB
For some cloud/virtualization use cases it would be convenient to grow the filesystem on boot any time the disk/partition happens to be larger.
This could be under an option, but I think it's unnecessary. This patch leaves a message in place for this case, but exits with status 0.
# growfs -y /dev/md0 growfs: requested size 110MB is equal to the current filesystem size 110MB # echo $? 0 #