Hello y'all. My NFS-fu and filesystem-fu have failed me. I'm stumped.
I have a SAN device that runs a busy-box linux. I can ssh to it and poke around, but it is managed by a web gui. So for example I made changes in /etc/exports, but they reverted after I rebooted the box. The GUI is quite extensive, but I haven't figured out how to enable ACLs. The one place I found that option, it's greyed out. There must be an enable somewhere that has to be on before I can apply it to a filesystem/share.
I'm telling this story inside out, so pardon the weird order.
The problem I'm having is that writing to my samba/CIFs share works great- no problems- but my writes to the NFS share do not. Also, I have a number of other NAS boxes I use in a similar way and I don't have this issue with them.
It seems like it can write all the top level stuff, like everything in the / directory, and some things in those directories, but fails on other stuff several levels deep. I can't figure out the pattern as to what it can and can not write.
The errors I'm getting all contain the string "failed: Operation not permitted (1)" - typically "rsync: [receiver] chown ... failed: Operation not permitted (1)"
I see 29 files or directories in / on the original. The same number show up in / on the backup.
ls -la -R /home | grep [rwx-][rwx-][rwx-]|wc -l should count just files & directories (more or less) in /home and gives me 29978 on the original. On the backup, I get zero.
The same command run against /etc gives me 2092. The backup copy shows the same number.
For /usr, original = 173377, copy = 134271. Limiting that to /usr/local: original = 111475, copy = 11416
Like I said, I can't figure out the pattern here.
The procedure I'm using to copy is: (run as root)
EXC="--exclude '/tmp/*' --exclude 'var/spool/*' --exclude 'var/tmp/*' --exclude 'var/cache/*' --exclude 'run/*' --exclude 'proc/*' --exclude 'sys/*'"
# NAS is mounted in /data/nas and has separate dirs for each host I back up.
rsync -avxz ${EXC} / data/nas/${HOSTNAME}
For some of the tests, I wiped out the contents of the backup with rm -rf before trying again. That doesn't seem to make much difference.
The NAS is mounted like this:
172.20.0.94:/raid0/data/_NAS_NFS_Exports_/Share1 on /data/nas type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=4,sec=sys,mountaddr=172.20.0.94,mountvers=3,mountport=56355,mountproto=tcp,local_lock=none,addr=172.20.0.94)
From the source machine, after being written by the backup script:
drwxrwxrwx 19 root root 4096 Jan 4 16:45 /data
drwxrwsrwx+ 1 99 users 40 Feb 28 17:43 /data/nas
drwxrwsrwx+ 1 99 users 328 Feb 15 17:10 /data/nas/clarke # fails (NFS)
drwsrwsrwx+ 1 tom ntadmins 48 Jan 19 15:17 /data/nas/Eowyn # succeeds (CIFS)
drwx--S---+ 1 99 users 5394 Mar 14 11:17 /data/nas/clarke/etc # succeeds
drwx--S---+ 1 99 users 0 Mar 10 13:41 /data/nas/clarke/home # fails
There aren't enough files in / to generalize, but the ones I see are -rw-------
For the directories in / I see these: (mostly the latter)
dr-x--S---+
drwx--S---+
---
In an ssh session to the nas, I see:
drwxrwsrwx 1 nobody users 328 Feb 15 17:10 clarke/
drwx--S--- 1 nobody users 5394 Mar 14 11:17 clarke/etc/
drwx--S--- 1 nobody users 0 Mar 10 13:41 clarke/home/
Again, the files in / are -rw-------
/home and /etc have the same permissions and ownership:
drwx--S--- 1 nobody users
Given that I see trailing plus signs on some of the dirs, I wonder if there's a FACL set.
nas # getfacl clarke/etc/
# file: clarke/etc/
# owner: nobody
# group: users
# flags: -s-
user::rwx
group::---
other::---
default:user::rwx
default:group::rwx
default:other::rwx
nas # getfacl clarke/home/
# file: clarke/home/
# owner: nobody
# group: users
# flags: -s-
user::rwx
group::---
other::---
default:user::rwx
default:group::rwx
default:other::rwx
Any ideas appreciated!
TIA,
Tom
"HEY YOU" (loud shouting) • Second Tops (Set Dancing) • FIND ME ON FACEBOOK
43° 7' 17.2" N by 88° 6' 28.9" W • Elevation 815' • Grid Square EN53wc
Sr. Systems Administrator • Open-source Dude • Musician • Registered Linux User 385531
--... ...-- / -.. . / -. ----. --.- --.- -...