Keith Lofstrom wrote:
> A VERY BIG CAUTION for using ext3 - be SURE to make extra inodes when
> you make a partition for dirvish, because once you use all the inodes,
> you may have 60% of the data space in your partition available, but
> no way to write to it. Dirvish can end up writing a lot of little
> directories, and that chews up inodes a lot faster than it chews up
> data space, with all the hardlinking to data. A disappointment with
> a default ext3 partition drove me to ReiserFS for a couple of years.
Generally, I agree - but I don't think guessing is good or necessary there.
Regarding the inodes vs data blocks debate, what I would do (unless you
have HA requirements) is to take the defaults for mkfs, and back up for
a few months.
Then take some time right after taking the off-site tapes (you /do/ have
off-site tapes, do you?), take the machine offline and *measure* what
inode/data blocks ratio you need.
Then use that measurement to recreate the FS optimally and go back from
tapes.
The defaults of mkfs should be safe for a few months; inodes shouldn't
run out that fast if your backups are at only daily granularity for a
few GB.
The relevant measurements as I see them are the number of directories,
data size (and average file size and stddev of file sizes if you want to
do this *very* precisely) and number of links.
I'm just not sure how to measure all of these:
Number of directories in the banks, easy:
------
(for i in "bank directories"; do find $i -type d) | wc -l
------
The real size of all the data files, kinda not too hard (untested, but
in principle it works for sure, don't paste it though, my Perl syntax
might be rusty):
------
(for i in "bank directories"; do find $i -type f -links 1 -print0 |
xargs -0 du -k) | perl -e '$tally=0;while(<>){split / /; $tally+=$_[0]'}
print "$tally\n"
------
The number of links is harder, because I might have an off-by-one *for
each file with multiple links* there:
------
for i in "bank directories"; do find $i -type f -links +1 | wc -l
------
I can't test that right now, though; I'm on a Mac so I don't have a real
Unix FS handy.
Yours, Bernd
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish