here's an example for fsck on a largish volume with a lot of files: # df -hi /nfs/archive Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/sd0e 3.6T 2.3T 1.2T 67% 3900811 119021683 3% /nfs/archive # umount /nfs/archive # \time -l fsck -f /dev/sd0e ** /dev/rsd0e ** File system is already clean ** Last Mounted on /nfs/archive ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 3900811 files, 307622602 used, 179239875 free (49355 frags, 22398815 blocks, 0.0% fragmentation) 1966.70 real 14.68 user 36.78 sys 137096 maximum resident set size 0 average shared memory size 0 average unshared data size 0 average unshared stack size 3561095 minor page faults 4 major page faults 0 swaps 0 block input operations 5 block output operations 0 messages sent 0 messages received 0 signals received 526407 voluntary context switches 30 involuntary context switches #
note that with nearly 4 million files, the amount of time required by fsck increased dramatically(over 30 minutes) but memory usage increased much less (only 137MB). this particular system has 12GB RAM but doesn't appear to ever use much of it. the sd0 device is a 6TB RAID10 array (4x 3TB drives) on an Areca ARC1110 PCI-X controller (in a 64-bit 133MHz PCI-X slot), partitioned with 1/3 of the space on sd0d and the remaining 2/3 on sd0e. /dev/sd0d was mostly idle (although still mounted) while fsck was running. -ken On Tue, Feb 10, 2015 at 5:35 PM, Jan Stary <h...@stare.cz> wrote: > On Feb 10 17:48:22, na...@mips.inka.de wrote: > > On 2015-02-10, yary <not....@gmail.com> wrote: > > > > > I know FFS2 can handle that size easily, but I'm worried about fsck > > > taking forever. This machine will have 1.5GB RAM, from what I've read > > > that's not enough memory to fsck a 4TB volume without painful > > > swapping. > > > > It vastly depends on the number of files you have on there. > > And if you know in advance that the files will be large > ("video editing"?) and there will not be many of them, > you might benefit from 'newfs -i' (and other options) > when creating the file system.