I only see too little space on your "/". So the question is where sqlite3 puts it's temp database. I don't know how to let sqlite3 print that.
Therefore, I had a look at the sqlite3 source code:
Code: Select all
/*
** Return the name of a directory in which to put temporary files.
** If no suitable temporary file directory can be found, return NULL.
*/
static const char *unixTempFileDir(void){
static const char *azDirs[] = {
0,
0,
0,
"/var/tmp",
"/usr/tmp",
"/tmp",
0 /* List terminator */
};
unsigned int i;
struct stat buf;
const char *zDir = 0;
azDirs[0] = sqlite3_temp_directory;
if( !azDirs[1] ) azDirs[1] = getenv("SQLITE_TMPDIR");
if( !azDirs[2] ) azDirs[2] = getenv("TMPDIR");
for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
if( zDir==0 ) continue;
if( osStat(zDir, &buf) ) continue;
if( !S_ISDIR(buf.st_mode) ) continue;
if( osAccess(zDir, 07) ) continue;
break;
}
return zDir;
}
So the temp directory is (probably in order of priority):
Code: Select all
sqlite3_temp_directory
SQLITE_TMPDIR
SQLITE_TMPDIR
/var/tmp
/usr/tmp
/tmp
About sqlite3_temp_directory: "Applications are strongly discouraged from using this global variable". So let's focus on the other five directories, and the space they have:
Code: Select all
df -h `printenv SQLITE_TMPDIR`
df -h `printenv TMPDIR`
df -h /var/tmp
df -h /usr/tmp
df -h /tmp
Can you run that on your ReadyNAS?
For comparison, here is the output on my Linux system:
Code: Select all
sander@flappie:~$ df -h `printenv SQLITE_TMPDIR`
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 17G 14G 2,3G 86% /
none 4,0K 0 4,0K 0% /sys/fs/cgroup
udev 1,9G 4,0K 1,9G 1% /dev
tmpfs 376M 1,5M 374M 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 1,9G 18M 1,9G 1% /run/shm
none 100M 68K 100M 1% /run/user
/dev/sda6 73G 66G 3,3G 96% /home
sander@flappie:~$ df -h `printenv TMPDIR`
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 17G 14G 2,3G 86% /
none 4,0K 0 4,0K 0% /sys/fs/cgroup
udev 1,9G 4,0K 1,9G 1% /dev
tmpfs 376M 1,5M 374M 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 1,9G 18M 1,9G 1% /run/shm
none 100M 68K 100M 1% /run/user
/dev/sda6 73G 66G 3,3G 96% /home
sander@flappie:~$ df -h /var/tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 17G 14G 2,3G 86% /
sander@flappie:~$ df -h /usr/tmp
df: ‘/usr/tmp’: No such file or directory
sander@flappie:~$ df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 17G 14G 2,3G 86% /
sander@flappie:~$
Meaning the first ENV vars are not set, /var/tmp does exist (and has 2.3GB space available), /usr/tmp does not exist, and /tmp does exist (and has 2.3GB space available).