Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see:
viewtopic.php?t=158230
Linux Kernel, Network, and Services configuration.
korakios
Posts: 4 Joined: 2017-10-27 09:19
#1
Post
by korakios » 2017-10-27 09:51
Hi,
could anyone help me to use my RAM for apt cache?
I did many attempts , now my paranoid last configuration is
fstab
Code: Select all
tmpfs /var/cache/apt/partial tmpfs defaults,noatime,nodiratime 0 0
tmpfs /var/cache/apt/archives/ tmpfs defaults,noatime,nodiratime 0 0
tmpfs /var/cache/apt/archives/partial tmpfs defaults,noatime,nodiratime 0 0
rc.local
Code: Select all
mkdir -p /var/cache/apt/partial &
mkdir -p /var/cache/apt/archives &
mkdir -p /var/cache/apt/archives/partial &
but intalling packages fail , eg:
Code: Select all
Failed to fetch https://netcologne.dl.sourceforge.net/project/ubuntuzilla/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_56.0.2-0ubuntu1_amd64.deb rename failed, Invalid cross-device link (/var/cache/apt/archives/partial/firefox-mozilla-build_56.0.2-0ubuntu1_amd64.deb -> /var/cache/apt/archives/firefox-mozilla-build_56.0.2-0ubuntu1_amd64.deb).
Last edited by
korakios on 2017-10-28 09:25, edited 1 time in total.
p.H
Global Moderator
Posts: 3049 Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times
#2
Post
by p.H » 2017-10-27 11:31
It seems that apt expects /var/cache/apt/archives and /var/cache/apt/archives/partial to be in the same filesystem, so that downloaded files can be moved from one to the other without copying the data.
Last edited by
p.H on 2017-10-27 11:34, edited 1 time in total.
korakios
Posts: 4 Joined: 2017-10-27 09:19
#3
Post
by korakios » 2017-10-27 11:34
p.H wrote: It seems that apt expects var/cache/apt/archives and /var/cache/apt/archives/partial to be in the same filesystem.
Thanks @p.H,
Any workarounds?
p.H
Global Moderator
Posts: 3049 Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times
#4
Post
by p.H » 2017-10-27 11:43
Don't mount /var/cache/apt/archives/partial as a separate tmpfs.
PS : Why do you set noatime and nodiratime on a tmpfs ? These options are mostly used with SSDs to reduce writes, but this is irrelevant with a tmpfs.
korakios
Posts: 4 Joined: 2017-10-27 09:19
#5
Post
by korakios » 2017-10-27 11:50
So , with
Code: Select all
tmpfs /var/cache/apt/archives/ tmpfs defaults 0 0
and
Code: Select all
mkdir -p /var/cache/apt/archives/partial &
I am ok?
PS. For noatime,nodiratime I was copy pasting from the net !
p.H
Global Moderator
Posts: 3049 Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times
#6
Post
by p.H » 2017-10-27 11:52
I guess so.
I don't know what /var/cache/apt/partial is used for though. Didn't even notice it existed.
Edit : I just checked that there is no such directory on my Debian system.
debiman
Posts: 3063 Joined: 2013-03-12 07:18
#7
Post
by debiman » 2017-10-28 08:54
putting archives in volatile storage seems illogical.
i need to ask, why do you want all this?
korakios
Posts: 4 Joined: 2017-10-27 09:19
#8
Post
by korakios » 2017-10-28 09:12
It works now as @p.H. suggested
I do it because I install uninstall many packages and I have an ssd.
Also it helps (10x faster) on Raspberry Pi using RAM instead of the sd card
debiman
Posts: 3063 Joined: 2013-03-12 07:18
#9
Post
by debiman » 2017-10-28 09:17
please mark your thread SOLVED by editing the first post.