Before proceeding, just to make everything clear, my server, as of this
writing, currently has two drives, which I will refer to as main/primary
and spare/secondary. The original intention of getting the spare drive
was to be able to fit all the FF content for our first two proposed
repos (F7 & F8) onto one drive. The following is somewhat of an
analysis toward that end. ;)
Okay, I ran hardlink.py on the tree, and I realized the original values
are more-or-less bunk. I saved a few GB, but I also decided to switch
to SI units (i.e., 1 MB = 1,000 KB = 1,000,000 B), so just ignore the
original listing above.
I included the `du` command I used. I'll explain each argument at the
end:
du --total --si --dereference --summarize
76G
domains/repo.*************.org/fedora/releases/7
88G
domains/repo.*************.org/fedora/releases/8
58G
domains/repo.*************.org/fedora/updates/7
62G
domains/repo.*************.org/fedora/updates/8
283G total
du --total --si --dereference --count-links --summarize
100G
domains/repo.*************.org/fedora/releases/7
120G
domains/repo.*************.org/fedora/releases/8
70G
domains/repo.*************.org/fedora/updates/7
71G
domains/repo.*************.org/fedora/updates/8
359G total
* --total means provide a total at the end.
* --si means use SI units (already explained before)
* --dereference means dereference symbolic links, which I use for
linking the F7 updates directory on my primary drive
* --count-links (only used in the 2nd set) means sum up the sizes
of all hard links as if they were complete files
* --summarize means don't print sizes of all subdirectories, just
sum everything together for each directory
The first results are after running hardlink.py, but cannot be compared
with the original posting I made (which I thought was premature anyway)
because I have also converted to using the SI units instead of the
powers-of-two units. What differentiates the first batch from the
second is that the second batch actually sums-up all the hardlinked file
sizes as well. I just wanted to see how much hardlinking is actually
saving us, and it turns out to be quite significant.
So, the total space consumed on disk is 283GB (as evidenced by the first
batch).
Some space is technically wasted due to no hardlinking with other
directories for the F7 updates directory. But since it is unlikely that
the amount of space saved will amount to over 20GB (the approximate
amount needed to fit onto the spare drive), I think this setup will work
just fine for now.
Some other space-saving measures might be to figure out what data we
really don't need to mirror, which would mean we could possibly squeeze
everything onto one drive by removing unnecessary data. I think this is
to our advantage, because I believe putting all FF data onto one drive
will not only be more efficient (it's an EXT4-formatted partition),
it'll also yield more performance (less contention with my other sites
on the main drive and, also, it's an EXT4-formatted partition ;) ).
________________________________________________________________________
Basil Mohamed Gohar
abu_hurayrah(a)hidayahonline.org
www.basilgohar.com