Date: Thu, 22 Aug 2024 16:55:35 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: freebsd-hackers@freebsd.org Subject: Re: makefs -t ffs makes too large image Message-ID: <d3eb46f1-29cc-4fa0-a346-86e1c5434834@quip.cz> In-Reply-To: <1781435895.20240822135231@yahoo.com> References: <1781435895.20240822135231.ref@yahoo.com> <1781435895.20240822135231@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 22/08/2024 12:52, Anthony Pankov wrote: > Hello, > > There is no much info about makefs so I ask here. > > I've tried to make UFS image via `makefs` of a directory sized 500Mb and get file of 1200Mb. > Is it a bug or feature? Is it related to source files that lies on ZFS while making UFS image? > > #makefs -t ffs -B little -o label=rootfs -o version=2 -o softupdates=0 image/rootfs.ufs installed > > Calculated size of `image/rootfs.ufs': 1264320512 bytes, 14974 inodes > Extent size set to 32768 > image/rootfs.ufs: 1205.8MB (2469376 sectors) block size 32768, fragment size 4096 > using 2 cylinder groups of 866.31MB, 27722 blks, 11136 inodes > > #du -hcd 1 installed/ > > 512B installed/media > 512B installed/tmp > 512B installed/mnt > 2,4M installed/sbin > 259K installed/var > 512B installed/dev > 99K installed/libexec > 835K installed/bin > 384M installed/usr > 9,7M installed/rescue > 676K installed/etc > 512B installed/net > 5,0K installed/root > 512B installed/proc > 9,4M installed/lib > 90M installed/boot > 497M installed/ > 497M total > > # tunefs -p image/rootfs.ufs > ... > tunefs: maximum blocks per file in a cylinder group: (-e) 8192 > tunefs: average file size: (-f) 16384 > tunefs: average number of files in a directory: (-s) 64 > tunefs: minimum percentage of free space: (-m) 8% > tunefs: space to hold for metadata blocks: (-k) 0 > tunefs: optimization preference: (-o) time > tunefs: volume label: (-L) rootfs Is it possible that you have enabled compression on source ZFS filesystem? Try to ad -A to you "du" command to see actual size of files, not compressed size on filesystem. Kind regards Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d3eb46f1-29cc-4fa0-a346-86e1c5434834>