diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index b796aefa36fb..0b653d55ac5c 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -280,6 +280,16 @@ mkfs(struct partition *pp, char *fsys) sizepb *= NINDIR(&sblock); sblock.fs_maxfilesize += sizepb; } + + /* + * It's impossible to create a snapshot in case that fs_maxfilesize + * is smaller than the fssize. + */ + if (sblock.fs_maxfilesize < (u_quad_t)fssize) { + warnx("WARNING: You will be unable to create snapshots on this " + "file system. Correct by using a larger blocksize."); + } + /* * Calculate the number of blocks to put into each cylinder group. *