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

Jeremy Maes jma at schaubroeck.be
Tue Jun 19 14:41:16 UTC 2012


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/34ec0faa/attachment.htm>


More information about the Spacewalk-list mailing list