[Box Backup] backup on nfs-mounted storage

Ruben Vandeginste boxbackup@fluffy.co.uk
Thu, 19 Oct 2006 19:26:00 +0200

At Tue, 17 Oct 2006 21:20:12 +0100 (BST), Chris Wilson wrote:
> It depends on whether you need to use the root account for anything. My 
> guess is that you might have problems running "bbstoreaccounts check", 
> "create", etc. unless you run them as the bbstored user.

Just using sudo and in this way running bbstoreaccounts as the
bbstored user seems to work. 
> You can probably reconfigure the NAS box to squash root to the bbstored 
> user instead of the anonymous user. If it runs Linux, that should be as 
> simple as adding "(...,anonuid=<uid of bbstored user>)" to the appropriate 
> entry/entries in /etc/exports, and running "exportfs -a".

I'll need to look into that. The official way to access the NAS is
through its web interface, but you can also mount the disk as an USB2
disk and in that way, I can access the Linux partitions, but I didn't
look further into it. I can't just login into the NAS, however.

> I think so, but I'm not 100% positive that fcntl locks work on NFS either.

After testing and searching more about locking files on NFS in Linux,
I found that I need to use "fcntl", but I also need to run the "statd"
daemon on both the server and the client. So, for testing, I just ran
a NFS server on my desktop and mounted that on my laptop, where I was
configuring boxbackup and in that configuration I can create the
account.  I just commented out the flock code and enabled the fcntl
code in both 'common/NamedLock.cpp' and 'raidfile/RaidFileWrite.cpp'.
That seems to work just fine.

Then I tried to use the NFS from the NAS and that didn't work.. my
guess is that it's not running statd, or maybe the NFS server doesn't
support locking.  I'll have to take a look at the Linux on the NAS. In
any case, it seems locking on NFS has always been rather

In any case thanks for your comments,