Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: remus on November 25, 2014, 10:42:33 PM

Title: Need to store /tmp on physical disk
Post by: remus on November 25, 2014, 10:42:33 PM
Hi all,

Am experimenting with Rdiffweb, and have discovered an error while trying to restore a folder. Rdiffweb allows restoration of a folder, as a zip file. It builds this zip file in /tmp

This works fine for folders I've tried that produce a 50mb or 76mb file. But the large folder that I just tried that is 500mb + produces an error.

Here's a small sample of the error
Code: [Select]
Unable to restore! rdiff-backup output: Exception '[Errno 28] No space left on device'
Google led me to : http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/rdiff-backup-23/crash-with-false-no-space-left-on-device-raised-of-cla-123036/ (http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/rdiff-backup-23/crash-with-false-no-space-left-on-device-raised-of-cla-123036/)
Which suggests that the work is done in /tmp and if /tmp is not on a nice big disk then the effort could fail.

How do I set my /tmp dir to exist on /mnt/hda1/tmp in busybox, I'm guessing that once I know the code, I just add it to /opt/bootlocal.sh

Thanks All.
Title: Re: Need to store /tmp on physical disk
Post by: gerald_clark on November 25, 2014, 11:29:22 PM
No you cannot put /tmp on a physical drive.
You could make symbolic link to a directory on hard disk under /tmp.
EX;
ln -s /dev/sda1/myworkdir /tmp/somedir.
Title: Re: Need to store /tmp on physical disk
Post by: core-user on November 26, 2014, 03:53:46 AM
Would it not work the same as putting 'home' & 'opt' on your drive?
Title: Re: Need to store /tmp on physical disk
Post by: curaga on November 26, 2014, 04:39:33 AM
Most apps have a config option, or accept the TMPDIR variable, which would only move rdiffweb's tmp, not the entire dir.
Title: Re: Need to store /tmp on physical disk
Post by: remus on November 26, 2014, 07:48:08 PM
Hi curaga, I've looked into the rdiff-backup doc's here : http://www.nongnu.org/rdiff-backup/rdiff-backup.1.html

And have found following promising info

Quote
--tempdir path
              Sets the directory that rdiff-backup uses for temporary files to
              the  given path. The environment variables TMPDIR, TEMP, and TMP
              can also be used to set the temporary files directory.  See  the
              documentation  of  the  Python tempfile module for more informa-
              tion.

I'm testing rdiffweb, which is a web browser based gui for rdiff-backup repository review and recovery. Not sure if I can feed that option to rdiffweb.
Title: Re: Need to store /tmp on physical disk
Post by: remus on November 26, 2014, 08:47:24 PM
The developer of rdiffweb has kindly offered suggestions for fixing problem.

I've created a folder on disk at /mnt/hda1/tmp

and have added following to the /etc/init.d/rdiff-web init script

Code: [Select]
export TMPDIR=/mnt/hda1/tmp
I ran my recovery, and observed that the /mnt/hda1/tmp folder grew to great size. and I did not get the same error as I did previously.

Am not seeing error
Code: [Select]
Invalide date parameter
I have noticed that the date/time on my virtualbox vm microcore system is stating "Thu Nov 27 01:45:25 UTC 2014" But my local time is "Thu Nov 27 11:45" in Brisbane Australia. I'm not sure if this time sync issue is causing my error. Have emailed the developer for any ideas.

How do I fix my time sync issue anyone ?

I thought my virtualbox vm would just use my host's time...
Title: Re: Need to store /tmp on physical disk
Post by: remus on November 26, 2014, 09:26:16 PM
Feed back from developer is that
This is a known bug to do with ASCII encoding, and is being resolved for next major release, has nothing to do with date time sync.

Thanks all.