(SOLVED) No space left in device

Message
Author
User avatar
Moltke
Posts: 229
Joined: Tue Dec 19, 2017 6:07 pm

Re: (SOLVED) No space left in device

#11 Post by Moltke »

Yep, the Live-usb-Storege folder is owned by the user, so you can move and symlink those to the Live-usb-storage folder:
Here a example one liner for the ~/.cache folder

Code: Select all

cp -a ~/.cache ~/Live-usb-storage && mv ~/.cache  ~/.cache.old && ln -s ~/Live-usb-storage/.cache ~/.cache && rm -r ~/.cache.old
Thanks for the clarifying, one question though, in that one liner the .cache dir is being copied not moved onto Live-usb-storage, so what's the benefit of that? Will I end up having two .cache dirs, one in /home and the other one in Live-usb with the same content? Sorry, I haven't used symlinks that much if any at all.
Sure you can remove the kernel not used by the Live-init, do a remaster afterwards so it get cleared also from the linuxfs.
Great! Thanks!

EDIT: Ok, I took a closer look at your one liner and I got what it does so I tried in some dirs in my /home, the biggest ones and now

Code: Select all

df -ih /home
S.ficheros     Nodos-i NUsados NLibres NUso% Montado en
/dev/loop2         59K     480     58K    1% /home
Thanks a lot for your assistance, learnt something new today. :happy:
Without each other's help there ain't no hope for us :happy:

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: (SOLVED) No space left in device

#12 Post by fehlix »

Moltke wrote: Wed Aug 14, 2019 3:43 pm

Code: Select all

cp -a ~/.cache ~/Live-usb-storage && mv ~/.cache  ~/.cache.old && ln -s ~/Live-usb-storage/.cache ~/.cache && rm -r ~/.cache.old
Thanks for the clarifying, one question though, in that one liner the .cache dir is being copied not moved onto Live-usb-storage, so what's the benefit of that?
The above "mv" move and the "ln -s" symlink are two "atomic" operations be changing just two inode entries within the filesystem table. So the time between those are very short.
If you would just "move" from Home to Live-usb-storage, it involves a copy and a delete on each file, which might take long. But as we are in a working system, the system might try to access the .cache and update the cache during the operate of the "copy-delete"-move, because of missing/updating cache-files.
So the above procedure tries to make sure that the system does not have time to realize that we have changed something with location the .cache-folder.
Other directories you might just do with one move and one symlink, instead of a the above cp/mv/ln/rm combo.
Moltke wrote: Wed Aug 14, 2019 3:43 pm Will I end up having two .cache dirs, one in /home and the other one in Live-usb with the same content?
No, the .cache-symlink as a kind of "pointer" to the real .cache-directory and does not occupy any space on the homefs as it is just an entry with the fs-table.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “antiX”