How much disk space do I need for reposync?
Hello there,
I would like to create a simple mirror using reposync
and createrepo
. With these tools I like to sync the following repos which are included in a standard subscription:
- Red Hat Software Collections (for RHEL Server)
- Oracle Java (for RHEL Server)
- Red Hat Enterprise Linux Server
- Red Hat Developer Toolset (for RHEL Server)
Does someone know how much disk space is required to sync the repos mentioned above? Please tell me, if you know.
Best regards,
Joerg
Responses
Hello, it is not possible to give exact sizes as packages have dependencies and new package version are released in Errata from time to time. So the repo size keeps growing. The Satellite 6 Installation Guide gives some guidelines in the Storage Requirements and Recommendations section.
I have never used the Oracle Java repo, only repos for testing Satellite Server with ed Hat Enterprise Linux 7 Server, but I suggest you allocate 50 GB if you can, and then do a test to see the size. What ever the final size is remember to leave room for growth. Using LVM storage is best for coping with the growth.
I wanted to piggyback off Jorg's comment above with an updated size. I just created new local repos and the space below is what was used (with no compression of any kind, please note). Also please note - I only download 3 of the 5 mentioned above, so I do not have a size that includes those other two.
reposync --gpgcheck -l --repoid=rhel-7-server-optional-rpms --download_path=[mypath] --downloadcomps --download-metadata
- 231M ///repodata
- 2.9G ///rhel-7-server-extras-rpms
- 46G ///rhel-7-server-optional-rpms
- 39G ///rhel-7-server-rpms
- 88G total
(Anyone landing here reading this specific discussion who downloads multiple repositories)
One important thing to remember if you have multiple repositories that happen to be on the same file system... In my case, I do a content-view export courtesy of Rich Jerrido (thanks Rich, I've been relying on your good article for some years now). Again, in my case, the content view export I do results in about 1.8-ish TB of rpms. I do a hardlink -cv /path/to/Default-Content-View-Export_using_the_actual_name
which does a deduplication of duplication rpms by hard linking them. The result is going from 1.8TB to 313GB. Then I have to do a rsync -Hau --progress $source $target
- and the -H
will retain hard links during the rsync.
I do this from my public facing satellite. I take the resultant content view that has been deduplicated of duplicated rpms by hard-linking to my collection of disconnected satellites.
If you have multiple repositories on the same file system, this might be useful to you. Those repositories do have a lot of rpm duplications, enough in my case to take it from 1.8TB to 313GB or so. Your actual mileage may vary since you may not be taking down an entire Content View export such as I'm doing. It may help though if you take more than one repository down.
Regards
RJ
I ran a reposync just for centos and reached 50GB before I ran out of space. I believe Jörg's summary referes to just "newest packages".
Yes Edward - Jörg said : "Today I ran reposync for the RHEL 8 repos downloading only the newest packages." ... :)
Nothing has changed here, what Stephen said is still valid : "It is not possible to give exact sizes as packages have
dependencies and new package version are released in Errata from time to time. So the repo size keeps growing."
Regards,
Christian
Understood - but grosso modo? 100GB, 1TB? I need to define disk space and don't want it all to fail at 95%.
I need to make a full repository for an customer who is air gapped and it will be used by foreman to deploy bare metal and VMs. So I need the large number. If you say 100GB so 200GB should be enough then (I hope).
This might be useful info for somebody, today, I was setting a local mirror for RHEL8, and below is the disk space it used.
2.2G codeready-builder-for-rhel-8-x86_64-rpms
36G rhel-8-for-x86_64-appstream-rpms
9.5G rhel-8-for-x86_64-baseos-rpms
1.3G rhel-8-for-x86_64-supplementary-rpms
For those who want to reduce the amount of space the entire set of repos uses, I posted something above on that using hardlink -cvv /path/to/where/you/downloaded/repos
.
This is even more relevant when you have downloaded multiple repositories and placed them in one directory. I mentioned above for example, when I download the entire Red Hat content view with my satellite server, I can reduce the footprint by hundreds of gigabytes.
See my post above (scroll up) on this.
Regards,
RJ
Newest only (rhel-77-server-rpms is RHEL 7.7)
93M codeready-builder-for-rhel-8-x86_64-rpms
5.5G rhel-77-server-rpms
287M rhel-7-server-extras-rpms
6.6G rhel-7-server-rpms
8.7G rhel-8-for-x86_64-appstream-rpms
2.2G rhel-8-for-x86_64-baseos-rpms
after using hardlink to dedup:
93M codeready-builder-for-rhel-8-x86_64-rpms
5.5G rhel-77-server-rpms
287M rhel-7-server-extras-rpms
3.8G rhel-7-server-rpms
8.7G rhel-8-for-x86_64-appstream-rpms
2.2G rhel-8-for-x86_64-baseos-rpms
14/10/2021
Hi I am testing reposync with option -n for save my disk space i have a question if i want to except download packages *.i686.rpm ? How can i config that?
i am a newbie, sorry for easy my question:) May, 15/10/2021
Jan 2021 the repos were around the size below - will have grown since then, but it will hopefully provide a ball-park figure.
2.2G codeready-builder-for-rhel-8-x86_64-rpms
36G rhel-8-for-x86_64-appstream-rpms
9.5G rhel-8-for-x86_64-baseos-rpms
1.3G rhel-8-for-x86_64-supplementary-rpms