[Spacewalk-list] Reducing disk space used by mrepo/spacewalk

Boyd, Robert Robert.Boyd at peoplefluent.com
Tue Jun 19 14:50:11 UTC 2012


Thank you Jeremy,

So - I'm guessing it's necessary to allow spacewalk-repo-sync to copy the files first and then run hardlink afterward?  Or can I pre-link the files to skip the copy step?   It would be nice if spacewalk-repo-sync can detect which files aren't in the database yet and process them without having to copy them if they are already in the destination directory.  I suppose that might be too much to ask - but since I am new to it and haven't tried to read the code, I have no idea how it does the magic.

In the meantime I'm installing hardlink :)

Thank you!
Robert

From: Jeremy Maes [mailto:jma at schaubroeck.be]
Sent: Tuesday, June 19, 2012 10:41 AM
To: spacewalk-list at redhat.com
Cc: Boyd, Robert
Subject: Re: [Spacewalk-list] Reducing disk space used by mrepo/spacewalk

Op 19/06/2012 16:11, Boyd, Robert schreef:
At https://github.com/dagwieers/mrepo/issues/26

Aron Parsons Said:

mrepo syncs RHN channels and other YUM repos to /var/satellite/mrepo
I call spacewalk-repo-sync with include and exclude filters to avoid bringing in packages I have no need for (e.g., java*ibm,Deployment_Guide-everyfreakinglanguageever). When mrepo gains the ability to include/exclude in 0.9.0, I will not need to have spacewalk-repo-sync do the filtering because the packages will never actually land on the disk.
I hardlink between /var/satellite/redhat and /var/satellite/mrepo to save space
I use the rhn-clone-errata.py<http://git.fedorahosted.org/git/?p=spacewalk.git;a=tree;f=scripts/clone-errata;hb=HEAD> script that lives in the Spacewalk git repo
Kickstart trees (distributions) are manually added in Spacewalk and point at the ISOs that mrepo mounts automatically


I'm wanting to find out how that works to hardlink between the /var/satellite/redhat and /var/satellite/mrepo directories?  Does it matter which direction the hardlinks are  set?
There's a redhat tool called "hardlink". A "yum install hardlink" should do the trick ;)

Afterwards it's pretty easy to use, a "hardlink /dir1 /dir2" (you might also need the -c option) will scan both directories and create hardlinks for files that exist in both, so you won't have any manual work. A hardlink doesn't have a direction, as both the "files" will point to the same location on the disk. The only requirement is that both directories have to reside on the same filesystem, as you can't hardlink across different filesystems/mountpoints.


How do you set up the spacewalk-repo-sync so that it doesn't get confused when it runs against the files that are already in the destination directories because of the links?
It won't get confused as you won't make a hardlink until áfter spacewalk-repo-sync has added the new rpms to the internal spacewalk repo. On the other hand, if spacewalk-repo-sync were to see a file it already has in its internal repo it'll just skip it.


I'm asking because I'm setting up a brand new spacewalk server and trying to make it as lean as possible.

Also,  anybody have a guess about when mrepo 0.9.0 is likely to arrive?  And will it really have the filtering built in?

Thanks!

Robert Boyd
Regards,
Jeremy

**** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20120619/e5aff6c7/attachment.htm>


More information about the Spacewalk-list mailing list