Joao S Veiga
Cadet
- Joined
- Apr 1, 2014
- Messages
- 2
Hello (please excuse me if this is not the proper subforum; could not find a better one from the descriptions),
SHORT STORY: Is it possible to rsync -A (preserve ACLs) from a linux (posix ACLs) machine to freeNAS? How?
Thanks,
Joao
LONG STORY:
There seems to be a problem rsyncing files/dirs from a linux system to freeNAS 9.2.0 with "preserve ACLs". I've looked at the release notes from 9.2.0 to 9.2.1.3 and didn't see anything related to rsync, so I did not try upgrading yet.
If the -A (preserve ACL) flag on the sending linux client is used, even if there is no ACL set for the file/dir, the transfer fails - hanging if it is only one file, returning errors if it is a directory.
I understand that the ACL support in the sending machine (linux, ext4, mounted with acl option) is not the same as the one in freeNAS (freeBSD, zfs, mounted with nfsv4acls option) - one is POSIX ACLs, other is NFS V4 ACLs, but I assumed that rsync should be "agnostic" and properly convert between the ACL "flavors".
If not, is there even a way to workaround this and allow the use of rsync to backup files from a linux server (with POSIX ACLs) to a freeNAS server?
I have tried both "Unix" and "Windows/Mac" Type of ACL in the Volume "Change Permissions" configuration (I'd think this would change the mount option, but no - what is this for?)
Here are some test results:
VERSIONS:
**on zulu - my debian linux server**
zulu:/shared/rsynctest# mount | grep sdb9
/dev/sdb9 on /shared type ext4 (rw,acl)
zulu:/shared/rsynctest# rsync --version | grep version
rsync version 3.0.7 protocol version 30
**on gronholm - a test freeNAS system, has an anonymous rsync module named zulu**
[root@gronholm] /mnt/testvol# mount | grep testvol
testvol on /mnt/testvol (zfs, local, nfsv4acls)
[root@gronholm] /mnt/testvol# rsync --version | grep version
rsync version 3.0.9 protocol version 30
**on nas - a ReadyNAS box (linux-based), has an anonymous rsync module named zulu**
nas:/c/zulu# mount | grep acl
/dev/c/c on /c type ext2 (rw,noatime,acl,user_xattr,usrquota,grpquota)
nas:/c/zulu# rsync --version | grep version
rsync version 3.0.9 protocol version 30
TESTS:
**single file, no acl set, no "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -v singlefile nas::zulu
singlefile
sent 114 bytes received 27 bytes 282.00 bytes/sec
total size is 44 speedup is 0.31
WORKS to freeNAS:
zulu:/shared/rsynctest# rsync -v singlefile gronholm::zulu
singlefile
sent 114 bytes received 27 bytes 282.00 bytes/sec
total size is 44 speedup is 0.31
**single file, no acl set, with "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -vvA singlefile nas::zulu
opening tcp connection to nas port 873
sending daemon args: --server -vvpAe.Lsf . zulu/
singlefile
total: matches=1 hash_hits=1 false_alarms=0 data=0
sent 74 bytes received 33 bytes 214.00 bytes/sec
total size is 44 speedup is 0.41
HANGS to freeNAS:
zulu:/shared/rsynctest# rsync -vvA singlefile gronholm::zulu
opening tcp connection to gronholm port 873
sending daemon args: --server -vvpAe.Lsf . zulu/
^Crsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(543) [sender=3.0.7]
**directory, no acl set, no "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -v noacldir nas::zulu
skipping directory noacldir
sent 4 bytes received 8 bytes 24.00 bytes/sec
total size is 0 speedup is 0.00
zulu:/shared/rsynctest# rsync -av noacldir nas::zulu
sending incremental file list
noacldir/
noacldir/file1
noacldir/file2
sent 141 bytes received 50 bytes 382.00 bytes/sec
total size is 0 speedup is 0.00
WORKS to freeNAS:
zulu:/shared/rsynctest# rsync -av noacldir gronholm::zulu
sending incremental file list
noacldir/
noacldir/file1
noacldir/file2
sent 141 bytes received 50 bytes 382.00 bytes/sec
total size is 0 speedup is 0.00
**directory, no acl set, with "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -aAvv noacldir nas::zulu
opening tcp connection to nas port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 66 bytes received 9 bytes 150.00 bytes/sec
total size is 0 speedup is 0.00
ACL ERROR to freeNAS:
zulu:/shared/rsynctest# rsync -aAvv noacldir gronholm::zulu
opening tcp connection to gronholm port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
recv_acl_access: value out of range: 3a0d
rsync error: error in rsync protocol data stream (code 12) at acls.c(1063) [Receiver=3.0.9]
rsync: connection unexpectedly closed (5 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
**directory, with acl set, with "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -aAvv acldir nas::zulu
opening tcp connection to nas port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
acldir/
acldir/aclfile1
acldir/aclfile2
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 167 bytes received 50 bytes 28.93 bytes/sec
total size is 0 speedup is 0.00
ACL ERROR to freeNAS:
zulu:/shared/rsynctest# rsync -aAvv acldir gronholm::zulu
opening tcp connection to gronholm port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
recv_acl_index: ACL_TYPE_ACCESS ACL index 18 > 0
rsync error: error in rsync protocol data stream (code 12) at acls.c(1118) [Receiver=3.0.9]
rsync: connection unexpectedly closed (5 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
NOTE: also tried rsyncing an ACL dir from "nas" to "gronholm" as they have the same rsync version, but got the same results.
Thanks,
Joao
SHORT STORY: Is it possible to rsync -A (preserve ACLs) from a linux (posix ACLs) machine to freeNAS? How?
Thanks,
Joao
LONG STORY:
There seems to be a problem rsyncing files/dirs from a linux system to freeNAS 9.2.0 with "preserve ACLs". I've looked at the release notes from 9.2.0 to 9.2.1.3 and didn't see anything related to rsync, so I did not try upgrading yet.
If the -A (preserve ACL) flag on the sending linux client is used, even if there is no ACL set for the file/dir, the transfer fails - hanging if it is only one file, returning errors if it is a directory.
I understand that the ACL support in the sending machine (linux, ext4, mounted with acl option) is not the same as the one in freeNAS (freeBSD, zfs, mounted with nfsv4acls option) - one is POSIX ACLs, other is NFS V4 ACLs, but I assumed that rsync should be "agnostic" and properly convert between the ACL "flavors".
If not, is there even a way to workaround this and allow the use of rsync to backup files from a linux server (with POSIX ACLs) to a freeNAS server?
I have tried both "Unix" and "Windows/Mac" Type of ACL in the Volume "Change Permissions" configuration (I'd think this would change the mount option, but no - what is this for?)
Here are some test results:
VERSIONS:
**on zulu - my debian linux server**
zulu:/shared/rsynctest# mount | grep sdb9
/dev/sdb9 on /shared type ext4 (rw,acl)
zulu:/shared/rsynctest# rsync --version | grep version
rsync version 3.0.7 protocol version 30
**on gronholm - a test freeNAS system, has an anonymous rsync module named zulu**
[root@gronholm] /mnt/testvol# mount | grep testvol
testvol on /mnt/testvol (zfs, local, nfsv4acls)
[root@gronholm] /mnt/testvol# rsync --version | grep version
rsync version 3.0.9 protocol version 30
**on nas - a ReadyNAS box (linux-based), has an anonymous rsync module named zulu**
nas:/c/zulu# mount | grep acl
/dev/c/c on /c type ext2 (rw,noatime,acl,user_xattr,usrquota,grpquota)
nas:/c/zulu# rsync --version | grep version
rsync version 3.0.9 protocol version 30
TESTS:
**single file, no acl set, no "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -v singlefile nas::zulu
singlefile
sent 114 bytes received 27 bytes 282.00 bytes/sec
total size is 44 speedup is 0.31
WORKS to freeNAS:
zulu:/shared/rsynctest# rsync -v singlefile gronholm::zulu
singlefile
sent 114 bytes received 27 bytes 282.00 bytes/sec
total size is 44 speedup is 0.31
**single file, no acl set, with "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -vvA singlefile nas::zulu
opening tcp connection to nas port 873
sending daemon args: --server -vvpAe.Lsf . zulu/
singlefile
total: matches=1 hash_hits=1 false_alarms=0 data=0
sent 74 bytes received 33 bytes 214.00 bytes/sec
total size is 44 speedup is 0.41
HANGS to freeNAS:
zulu:/shared/rsynctest# rsync -vvA singlefile gronholm::zulu
opening tcp connection to gronholm port 873
sending daemon args: --server -vvpAe.Lsf . zulu/
^Crsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(543) [sender=3.0.7]
**directory, no acl set, no "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -v noacldir nas::zulu
skipping directory noacldir
sent 4 bytes received 8 bytes 24.00 bytes/sec
total size is 0 speedup is 0.00
zulu:/shared/rsynctest# rsync -av noacldir nas::zulu
sending incremental file list
noacldir/
noacldir/file1
noacldir/file2
sent 141 bytes received 50 bytes 382.00 bytes/sec
total size is 0 speedup is 0.00
WORKS to freeNAS:
zulu:/shared/rsynctest# rsync -av noacldir gronholm::zulu
sending incremental file list
noacldir/
noacldir/file1
noacldir/file2
sent 141 bytes received 50 bytes 382.00 bytes/sec
total size is 0 speedup is 0.00
**directory, no acl set, with "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -aAvv noacldir nas::zulu
opening tcp connection to nas port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 66 bytes received 9 bytes 150.00 bytes/sec
total size is 0 speedup is 0.00
ACL ERROR to freeNAS:
zulu:/shared/rsynctest# rsync -aAvv noacldir gronholm::zulu
opening tcp connection to gronholm port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
recv_acl_access: value out of range: 3a0d
rsync error: error in rsync protocol data stream (code 12) at acls.c(1063) [Receiver=3.0.9]
rsync: connection unexpectedly closed (5 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
**directory, with acl set, with "preserve ACL" -A flag,**
WORKS to ReadyNAS:
zulu:/shared/rsynctest# rsync -aAvv acldir nas::zulu
opening tcp connection to nas port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
acldir/
acldir/aclfile1
acldir/aclfile2
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 167 bytes received 50 bytes 28.93 bytes/sec
total size is 0 speedup is 0.00
ACL ERROR to freeNAS:
zulu:/shared/rsynctest# rsync -aAvv acldir gronholm::zulu
opening tcp connection to gronholm port 873
sending daemon args: --server -vvlogDtpAre.iLsf . zulu/
sending incremental file list
recv_acl_index: ACL_TYPE_ACCESS ACL index 18 > 0
rsync error: error in rsync protocol data stream (code 12) at acls.c(1118) [Receiver=3.0.9]
rsync: connection unexpectedly closed (5 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
NOTE: also tried rsyncing an ACL dir from "nas" to "gronholm" as they have the same rsync version, but got the same results.
Thanks,
Joao