Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cleaning up /var/cache/http-replicator [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Fri Dec 02, 2016 5:38 pm    Post subject: cleaning up /var/cache/http-replicator [SOLVED] Reply with quote

80G of disk space is used on my distfile server. 29G is /var/cache/http-replicator which is four times as big as a typical /usr/portage/distfiles on my boxes.

The tail of "ls -lt /var/cache/http-replicator is:
Code:
-rw-rw-r-- 1 portage portage    106381 Mar 24  2003 commonbox-styles-0.6.tar.bz2
-rw-rw-r-- 1 portage portage    526934 Mar 24  2003 automake-1.5.tar.gz
-rw-rw-r-- 1 portage portage     22866 Mar 24  2003 fxload-2002_04_11.tar.gz
-rw-rw-r-- 1 portage portage     81223 Mar 24  2003 gtk+-1.2.10-r8-gentoo.diff.bz2
-rw-rw-r-- 1 portage portage    207697 Mar 24  2003 hfsutils-3.2.6.tar.gz
-rw-rw-r-- 1 portage portage   2868322 Mar 24  2003 gtk+-1.2.10.tar.gz
-rw-rw-r-- 1 portage portage     39571 Mar 24  2003 NeXT_XEmacs.tar.gz
-rw-rw-r-- 1 portage portage   1751886 Mar 24  2003 recode-3.6.tar.gz
-rw-rw-r-- 1 portage portage     19739 Mar 24  2003 ide-smart-1.4.tar.gz
-rw-rw-r-- 1 portage portage     55817 Mar 24  2003 mac-fdisk_0.1.orig.tar.gz
-rw-rw-r-- 1 portage portage    421480 Mar 24  2003 glib-1.2.10.tar.gz
-rw-rw-r-- 1 portage portage     43441 Mar 24  2003 docbk30.zip
-rw-rw-r-- 1 portage portage     62039 Mar 24  2003 psutils-1.17.tar.gz
-rw-rw-r-- 1 portage portage     93250 Mar 24  2003 SGMLSpm-1.03ii.tar.gz
-rw-rw-r-- 1 portage portage    443844 Mar 24  2003 autoconf-2.13.tar.gz
-rw-rw-r-- 1 portage portage     30267 Mar 24  2003 logsentry-1.1.1.tar.gz
-rw-rw-r-- 1 portage portage      7373 Mar 24  2003 cpuburn_1_4_tar.gz
-rw-rw-r-- 1 portage portage     99438 Mar 24  2003 tcp_wrappers_7.6.tar.gz
-rw-rw-r-- 1 portage portage    950726 Mar 24  2003 id3lib-3.8.3.tar.gz
-rw-rw-r-- 1 portage portage   8155158 Mar 24  2003 commonbox-styles-extra-0.2.tar.bz2
-rw-rw-r-- 1 portage portage     22047 Mar 24  2003 netselect-0.3.tar.gz
-rw-rw-r-- 1 portage portage    173229 Mar 10  2003 libdvdplay-1.0.1.tar.bz2
-rw-rw-r-- 1 portage portage    120033 Jan 16  2003 XML-XQL-0.68.tar.gz
-rw-rw-r-- 1 portage portage     79860 Jan  4  2003 libmix-205.tgz
-rw-rw-r-- 1 portage portage     40526 Nov 14  2002 CursesWidgets-1.997.tar.gz
-rw-rw-r-- 1 portage portage     83928 Oct 23  2002 tsocks-1.8beta5.tar.gz
-rw-rw-r-- 1 portage portage    103091 Jul 14  2001 Text-Unidecode-0.04.tar.gz
-rw-rw-r-- 1 portage portage     25693 Dec 18  2000 nttcp-1.47.tar.gz
-rw-rw-r-- 1 portage portage    413167 Dec 31  1969 sound-theme-freedesktop-0.7.tar.bz2

There are files from 2003! gtk version 1! How can I clean this up, short of deleting everything and starting over?


Last edited by Tony0945 on Mon Dec 05, 2016 1:07 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Dec 02, 2016 6:32 pm    Post subject: Reply with quote

Tony0945,

Wow, a file from before Unix time began :)
Code:
-rw-rw-r-- 1 portage portage    413167 Dec 31  1969 sound-theme-freedesktop-0.7.tar.bz2


My http-replicator uses the distfiles on its host as its cache, so
Code:
eclean -d distfiles
pares it back to the packages installed on that host.
I only run that when it threatens to fill up the HDD as its also my mail server.

I never delete any distfiles on my main box, an least, not deliberately. I have a 93G collection going back to April 2009 and on another (powered off box) going back possibly to 2002, when I started with Gentoo..
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Fri Dec 02, 2016 10:32 pm    Post subject: Reply with quote

Saw that myself. :D Something had to be wrong with the unix time (probably zero). But gtk 1.2, it's like a time warp.

This is a new SSD. I copied everything from the old HDD by "cp -a" I was surprised that it seemed to take forever. So everything is still there on the HDD (now on the shelf).
Code:
 # eclean -d distfiles
 * Building file list for distfiles cleaning...
 * Your distfiles directory was already clean.

   The following unavailable installed packages were found
             sys-kernel/gentoo-sources-4.7.5

It's the cache that's huge. Maybe I should symlink to the cache and run eclean?


I also had a /var/cache/gdm and/var/cache/hald but I just deleted the with "rm -r". They eren't big, but totally useless.

Since the cache is 13% of the SSD's total, maybe I should run trim after I erase the files?

Generally, I migrate rather than reinstall, but I see the logic of fresh installing and just migrating /root and /home (maybe /etc).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Dec 02, 2016 11:45 pm    Post subject: Reply with quote

Tony0945,

That file from before the beginning of time will less than your timezone offset into very early Unix time.
Times are stored in UTC then timezome offset for display.
If you are in the USA, that UTC-5 to UTC-8, its easy to get such files.

Is it worth having distfiles on SSD? Reading/writing distfiles is only a very small part of the build time.
They may still be in the disk cache at first use too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sat Dec 03, 2016 12:32 am    Post subject: Reply with quote

UTC-6 here.

I've (obviously) used the http-replicator for many years now and only switched to SSD two weeks ago. This machines reason for existing (it runs 24 7) is to serve portage files, a few local pages, and centralized local ebuilds. I'm inclined to add minidlna server so that a second machine doesn't have to run 24 7. That would entail physically moving a 5TB drive (obviously HDD) over. If you think it advisable, I could reconnect the old HDD and use it for /var/cache or better yet, when I connect the 5TB, point /var/cache/http-replicator to a directory on that drive via symlink. Please give me your thoughts on this.

I sync three other Gentoo machines via this one so that I don't get banned for over using the portage servers.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Sat Dec 03, 2016 12:45 am    Post subject: Reply with quote

Not sure if this is what you are asking ... I pare both the distdir and http-replicator cache using eclean-dist. To get to the http-replicator directory, define DISTDIR before (or as) running eclean (or eclean-dist).

Code:
DISTDIR=/var/cache/http-replicator eclean-dist --destructive --nocolor
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sat Dec 03, 2016 1:34 am    Post subject: Reply with quote

cboldt wrote:
Code:
DISTDIR=/var/cache/http-replicator eclean-dist --destructive --nocolor
Whoa! In a flash that did it!
Code:
 [   24.2 G ] Total space from 5003 files were freed in the distfiles directory


Thanks!
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Sat Dec 03, 2016 3:43 pm    Post subject: Reply with quote

My pleasure. Your local network sounds similar to mine. Just a few Gentoo machines here, and a handful of Win, Android, and whatever. One of the Gentoo machines does "portage serving" for both the portage tree and source files. I doubt I have an optimal setup, as the portage tree is served using rsyncd, and distfiles via http-replicator.

I like use of eclean rather than tmpwatch for distfiles and htto-replicator, because some source files have a darn long life. The only potential "abuse of remote source code server" from the network here is that http-replicator is pared according to source files on that machine, which isn't exactly the same as what is installed on the other machines. This might create a duplicate fetch in a rare instance, but I figure it would be really rare, because each machine's DISTFILE directory should have all of the source code for what is installed on that particular machine. Even after being pared, http-replicator is always totally redundant looking at the machine it sits on. The "gap" is that http-replicator isn't quite comprehensive comparing it to the DISTFILE directory on the other machines.

I clean 'em all out (using eclean) once a month, in a cronjob.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum