From owner-freebsd-fs@freebsd.org Sun Dec 25 04:41:09 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82958C855AF for ; Sun, 25 Dec 2016 04:41:09 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09CF11E5B for ; Sun, 25 Dec 2016 04:41:08 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from mart.js.berklix.net (pD9FE9508.dip0.t-ipconnect.de [217.254.149.8]) (authenticated bits=128) by land.berklix.org (8.15.2/8.15.2) with ESMTPA id uBP3V4iO085211 for ; Sun, 25 Dec 2016 03:31:04 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id uBP3V1rl070868 for ; Sun, 25 Dec 2016 04:31:01 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id uBP3Un70004592 for ; Sun, 25 Dec 2016 04:31:01 +0100 (CET) (envelope-from jhs@berklix.com) Message-Id: <201612250331.uBP3Un70004592@fire.js.berklix.net> To: freebsd-fs@freebsd.org Subject: when ufs is 99% full, current seems to limit creat to 28672 bytes From: "Julian H. Stacey" Organization: http://berklix.eu BSD Linux Unix Consultants, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.eu/free/ X-From: http://www.berklix.eu/~jhs/ Date: Sun, 25 Dec 2016 04:30:49 +0100 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Dec 2016 04:41:09 -0000 A puzzle below, that I think I've solved, but comments welcome: When ufs is 99% full, current limits creat to 28672 bytes. On current, mount /dev/ada0s4f on /data (ufs, NFS exported, local, soft-updates) /bin/df /data Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ada0s4f 868629268 863272592 5356676 99% /data csh foreach i ( `cd /host/fire/0s4/ftp/pub/FreeBSD/mail/ports ; /bin/ls -1 [0-9]*`) # Above just a trick to generate 3000 numeric names. # ( testblock -v -b 512 tb.$i ) # My little C program # http://berklix.com/~jhs/src/bsd/jhs/bin/public/testblock/ # OR a simpler standard dd ... ( dd if=/dev/zero of=dd.$i ) end Produces loads of little files of size 28672 bytes = 0x7000 A foreground fsck of FS shows no errors. No ZFS in use. Where does all the extra space come from ? Why does it keep allowing more little files ? But not files bigger than 7K ? The last 5 Gig seems unusable space not in the meta space of normal free blocks for big files. Presumably instead in the payload of initial data space pre allocated along with each unused inode ? So 1K for inode & 7K data ? ffsinfo | more bsize int32_t 0x00008000 fsize int32_t 0x00001000 df -i /dev/ada0s4f Filesystem 1K-blocks Used Avail Capacity iused ifree %iused /dev/ada0s4f 868629268 863272592 5356676 99% 9595016 102683126 9% dc 102683126 28672 * p # 2 944 130 588 672 3G not 5.3G as above from df, but seems not too dissimilar. If this 0x7K phenomena is not documented in manuals somewhere ? it perhaps should be ? How I noticed: I wanted to soak up every last block on FS, (cos Ive been having block device errors, so I wanted to force a read write on all unused blocks to hopefully get IDE drive to re-allocate anything flakey.) ada0: 953869MB (1953525168 512 byte sectors) Tips very welcome on [usb scsi] Commands/Manuals/ ports/ to either: rescan partition (I could achive a crude reallocation of discovered bad blocks, using drivers inside disk or FreeBSD, by writing new test data on my partition with dd or my testblock -b 60k /dev/ada0s4f reformat disk. Maybe man fsck See Also should ref camcontrol ? Cheers, Julian -- Julian Stacey, BSD Linux Unix Sys Eng Consultant Munich Reply below, Prefix '> '. Plain text, No .doc, base64, HTML, quoted-printable. http://berklix.eu/brexit/#stolen_votes