mounting samba/cifs with 'nounix' flag gives BUP some trouble

205 views
Skip to first unread message

tom handler

unread,
Jul 11, 2014, 10:02:23 AM7/11/14
to bup-...@googlegroups.com
Hi,
I've been using bup over a samba/cifs mount point with no problems for a long time (and with encfs further mounted over samba to add an encryption layer).
Recently, I took the advice the kernel was giving in his messages:

CIFS VFS: Negotiating Unix capabilities with the server failed. Consider mounting with the Unix Extensions disabled if problems are found by specifying the nounix mount option.

Mounting cifs/samba with the "nounix" flag proved to be challenging for bup backups: as soon as the backup started, I noticed something was wrong as it was complaining about missing idx files and some refs heads not pointing to valid object:

error: refs/heads/ubuntu does not point to a valid object!
warning: index pack-faed1b214f305ba0aefe38c75e5cf7272c4e2ab4.idx missing
warning: index pack-a5e131be672802b8a1a17b70d890c2f42c80a0f6.idx missing
warning: index pack-4ff7bf999fb0fea1c53f14facb48e0bd6c86f5b6.idx missing
...

There were quite a bit of idx files reported missing although on further investigation, the missing idx were still there.

Anyways, the backup started backing up a lot of things that were already backed up, marking them as "M" modified, although I knew they weren't. I thought that maybe it was just the index problem, and that it will not really end up backing them up. Wrong, It created a couple of 1GB packs even though I knew the backup should have taken no more than 10M.

Interestingly, redoing the backup right away would still mark a lot of "M" modified files and would probably end up backing up a couple of GB (I interrupted midway). No missing idx files this time though, but still the warning about "refs/heads/ubuntu".

At this point I reverted the repository to its previous state, before the nounix change (thanks to a previous copy of the whole bup repo), removed the "nounix" flag, re-did the backup. Everything was fine as usual now, and the resulting backup took only 10M.

Does anyone know what happened here? Why is the nounix flag breaking the backup?
Should I do further testing with this, or is the answer straightforward?

Thanks for your help, tom

tom handler

unread,
Jul 11, 2014, 10:06:37 AM7/11/14
to bup-...@googlegroups.com
I forgot to add that after the bad backup (before reverting to previous state), I mounted the disk locally (no samba) through USB and did a bup fsck. No problems were found.

Rob Browning

unread,
Jul 11, 2014, 5:03:57 PM7/11/14
to tom handler, bup-...@googlegroups.com
tom handler <tomhan...@gmail.com> writes:

> Does anyone know what happened here? Why is the nounix flag breaking
> the backup? Should I do further testing with this, or is the answer
> straightforward?

Given the description of nounix:

Disable the CIFS Unix Extensions for this mount. This can be useful
in order to turn off multiple settings at once. This includes POSIX
acls, POSIX locks, POSIX paths, symlink support and retrieving
uids/gids/mode from the server. This can also be useful to work
around a bug in a server that supports Unix Extensions.

See section INODE NUMBERS for more information.

If that means (for example) that there are roughly "no symlinks", etc.,
then are you sure encfs can handle an underlying filesystem that
limited?

(Bup probably can't (at least not for the repo dir), but if I understand
you correctly, your repo dir's not directly on the nounix filesystem.)

--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

tom handler

unread,
Jul 11, 2014, 7:44:16 PM7/11/14
to bup-...@googlegroups.com, tomhan...@gmail.com
Yes, that could very well be the problem. I had erroneously thought bup would be ok with a minimal filesystem that didn't support symlinks (bup repos only seemed to be a bunch of data files after all (idx/pack/midx), where do symlinks come into play? Even the refs/heads look like simple text files). And I hadn't thought about encfs needing them, but possibly could be that as well. I'll have to test some more to tell.

The layer structure is basically: cifs ==> encfs ==> bup, so I guess if cifs lacks support for something it's going to be missing in the upper layers as well.

Oh well, problem solved anyway: never use nounix flag if you plan to put a bup repo on it.

thanks for your time!

Rob Browning

unread,
Jul 12, 2014, 1:55:08 PM7/12/14
to tom handler, bup-...@googlegroups.com
tom handler <tomhan...@gmail.com> writes:

> where do symlinks come into play?

Perhaps they don't, but my guess is that bup may rely on at least some
of the bits that nounix is turning off.

Though from your description, it sounds like bup itself wouldn't be
seeing any of the effects of nounix; encfs would.
Reply all
Reply to author
Forward
0 new messages