Date: Sun, 13 Nov 2005 10:17:59 -0800 From: John-Mark Gurney <gurney_j@resnet.uoregon.edu> To: Joseph Koshy <joseph.koshy@gmail.com> Cc: freebsd <freebsd-hackers@freebsd.org> Subject: Re: UFS2 max limits? Message-ID: <20051113181759.GM775@funkthat.com> In-Reply-To: <84dead720511112135j435a3723ld15a9d993bbae9cc@mail.gmail.com> References: <84dead720511112135j435a3723ld15a9d993bbae9cc@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Joseph Koshy wrote this message on Sat, Nov 12, 2005 at 11:05 +0530: > The Wikipedia page referenced below says that UFS2 supports a > filesystem size of 2^80 Bytes (1YiB) with the limit on a given > file being 2^55 bytes (32 PiB). Those sound correct, as UFS2 uses 64bit frag addresses, which when combined with a frag size of 16 (for 65536 bytes per frag) gives you 2^80 for total file system size.... as for the file size, The approximate max can be calculated by (blocksize / sizeof(ufs2_daddr_t)) ^ 3 * blocksize the real max would add in addition: (blocksize / sizeof(ufs2_daddr_t)) ^ 2 * blocksize + (blocksize / sizeof(ufs2_daddr_t)) * blocksize + 9 * blocksize so, with a blocksize of 65536, and ufs2_daddr_t's size being 8 bytes, you end up with: (2^16 / 2^3) ^ 3 * 2^16 (2^13)^3 * 2^16 2^(13*3) * 2^16 2^39 * 2^16 2^(39 + 16) 2^55 but if you add the additional blocks, you'll end up with larger, but not enough to go to 2^56 for file sizes... > Are these numbers correct? I somehow remember the limits as > being much lower (of the order of 16TB or so). You might be thinking of UFS1... Now there is a funny thing that I found out about UFS2 and UFS1... UFS1 supports larger file sizes (not file system sizes) due to the fact that the ufs_daddr_t is smaller (32bits), means it can get more out of the indirect blocks than UFS2 can... UFS1 can have files of 2^58 compared to UFS2's 2^55... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051113181759.GM775>