PDA

View Full Version : Linking a directory to another partition?


DiscipleDOC
07-24-07, 01:01 PM
Is there a way that I can link my cache directory (/var/cache/apt/archives/partial/) to another directory or partition? I've cleaned that directory, and I am still getting "No space left on devce" error message....

I got this when I did a df -h:

Filesystem Size Used Avail Use% Mounted on
/dev/root 3.4M 27K 3.4M 1% /
/dev/sda1 799M 697M 103M 88% /cdrom
/ramdisk 1.6G 2.1M 1.6G 1% /ramdisk
/UNIONFS 291M 291M 0 100% /UNIONFS
/dev/sdb1 799M 697M 103M 88% /cdrom
/dev/cloop 2.0G 2.0G 0 100% /KNOPPIX
/dev/sdb2 995M 301M 695M 31% /media/sdb2
/media/sdb2/knoppix.img
291M 291M 0 100% /KNOPPIX.IMG
/dev/sdb3 2.1G 549M 1.5G 27% /media/sdb3

evilghost
07-24-07, 01:52 PM
You can either symlink it or actually create a new mount for it.

To symlink to /dev/sdb3 I'd do this.


mkdir -p /media/sdb3/apt_archives
cp -av /var/cache/apt/archives/* /media/sdb3/apt_archives
rm -rf /var/cache/apt/archives
ln -s /var/cache/apt/archives /media/sdb3/apt_archives

DiscipleDOC
07-24-07, 01:54 PM
Thanks, bro! :thumbsup:

DiscipleDOC
07-26-07, 11:29 PM
You can either symlink it or actually create a new mount for it.

To symlink to /dev/sdb3 I'd do this.


mkdir -p /media/sdb3/apt_archives
cp -av /var/cache/apt/archives/* /media/sdb3/apt_archives
rm -rf /var/cache/apt/archives
ln -s /var/cache/apt/archives /media/sdb3/apt_archives

Ok...this didn't work. I linked it, but it is still putting these files in the /var/cache/apt/ location.

How can I mount this on a different partition?