SQlite issue with CIFS share
Posted: November 8th, 2011, 9:51 am
Hi all,
longtime sabnzbd user on windows, and have recently moved across to Ubuntu as running sabnzb 24x7 in a windows7 virtual machine was too much overhead. Everything went well installing, however I like to have my admin directory in the same folder structure as my downloads, so redirected it to my cifs share
\nzb
\nzb\complete
\nzb\incomplete
\nzb\admin
\nzb\logs
this worked fine except history1.db was always 0 bytes, and I was warned that database was locked. Sabnzbd worked fine, but I never had any history showing. I did some trawling and found a known issue with sqllite and CIFS shares. Unless the parameter nobrl is used when mounting the share, sqllite gets its knickers in a twist. So my
/etc/fstab finally looks like
/etc/fstab
I then mount my share in /etc/rc.local, then run sabnzbd for the first time (having stopped it autorunning at boot - see command below - due to it starting before my shares had mounted)
/etc/rc.local
I also did
as part of a process to get the share to mount at boot time as my user rather than root. Never did manage it (winshare is still owned by root after mounting) but sabnzbd working fine now. Hope this helps someone out.
longtime sabnzbd user on windows, and have recently moved across to Ubuntu as running sabnzb 24x7 in a windows7 virtual machine was too much overhead. Everything went well installing, however I like to have my admin directory in the same folder structure as my downloads, so redirected it to my cifs share
\nzb
\nzb\complete
\nzb\incomplete
\nzb\admin
\nzb\logs
this worked fine except history1.db was always 0 bytes, and I was warned that database was locked. Sabnzbd worked fine, but I never had any history showing. I did some trawling and found a known issue with sqllite and CIFS shares. Unless the parameter nobrl is used when mounting the share, sqllite gets its knickers in a twist. So my
/etc/fstab finally looks like
/etc/fstab
Code: Select all
//192.168.1.xyz/nzb /home/myuser/winshare cifs defaults,rw,iocharset=utf8,codepage=cp850,uid=1000,gid=1000,noauto,user,username=myshareuser,password=mysharepassword,file_mode=0777,dir_mode=0777 0 0Code: Select all
$ sudo update-rc.d -f sabnzbdplusCode: Select all
mount.cifs //192.168.1.xyz/nzb /home/myuser/winshare -o noperm,forceuid,uid=myuser,user=myshareuser,pass=mysharepassword,nobrlCode: Select all
/etc/init.d/sabnzbd startCode: Select all
sudo chmod u+s /sbin/mount.cifs