When creating a new FFS file system, the block size will indirectly
affect the largest file size that is allowed by the file system. On the other hand, when creating a snapshot, the snapshot file will appear as it is as big as the file system itself. Hence we will not be able to create a file system on large file systems with small block sizes. Add a warning about this, and gives some hints to correct the issue. Reviewed by: mckusick MFC After: 1 week
This commit is contained in:
parent
7301cf23ef
commit
3ae329b8d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142119
@ -280,6 +280,16 @@ mkfs(struct partition *pp, char *fsys)
|
|||||||
sizepb *= NINDIR(&sblock);
|
sizepb *= NINDIR(&sblock);
|
||||||
sblock.fs_maxfilesize += sizepb;
|
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.
|
* Calculate the number of blocks to put into each cylinder group.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user