Hi.
I have problem with preserving EA's and ACL's when restoring FS from dump.
Software versions:
Kernel k_athlon-2.4.20-38 from SuSE with:
SGI XFS 1.2.0 with ACLs, DMAPI, realtime, quota, no debug enabled
libc: glibc-2.3.2
xfsdump: xfsdump-2.2.6
I have XFS partition /mnt2 as /dev/system/test (i using LVM).
/dev/system/test 519488 256 519232 1% /mnt2
I created this simple directory structure:
dhcp4:/mnt2 # ls -lR
.:
total 4
drwxr-xr-x 3 root root 26 Apr 7 13:23 .
drwxr-xr-x 21 root root 4096 Apr 4 15:48 ..
drwxr-xr-x 2 root root 16 Apr 4 15:47 aaa
-rw-rwxr-- 1 root root 0 Apr 4 15:47 ccc
./aaa:
total 0
drwxr-xr-x 2 root root 16 Apr 4 15:47 .
drwxr-xr-x 3 root root 26 Apr 7 13:23 ..
-rw-rwxr-- 1 root root 0 Apr 4 15:47 bbb
I added EA and ACL to file ccc:
dhcp4:/mnt2 # setfattr -n user.test -v text ccc
dhcp4:/mnt2 # setfacl -m u:ftp:rwx ccc
dhcp4:/mnt2 # getfattr *
# file: ccc
user.test
dhcp4:/mnt2 # getfacl *
# file: aaa
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
# file: ccc
# owner: root
# group: root
user::rw-
user:ftp:rwx
group::rwx
mask::rwx
other::r--
Then I dumped partition with xfsdump:
dhcp4:/mnt2 # xfsdump -v 5 -L dump -M dump -0 -f /tmp/dump /mnt2
The log is attached as dump.log.
Then I restored FS with xfsrestore:
dhcp4:/mnt2 # rm -rf *
dhcp4:/mnt2 # xfsrestore -v 5 -f /tmp/dump /mnt2
dhcp4:/mnt2 # getfattr *
# file: ccc
user.test
dhcp4:/mnt2 # getfacl *
# file: aaa
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
# file: ccc
# owner: root
# group: root
user::rw-
group::rwx
other::r--
The ACL for user ftp on file ccc isn't restored.
Then I do the same with the difference that I have only EA on file ccc, not ACL.
dhcp4:/mnt2 # rm /tmp/dump
dhcp4:/mnt2 # xfsdump -v 5 -L dump -M dump -0 -f /tmp/dump /mnt2
dhcp4:/mnt2 # rm -rf *
dhcp4:/mnt2 # xfsrestore -v 5 -f /tmp/dump /mnt2
The logs are in dump2.log and restore2.log.
dhcp4:/mnt2 # getfattr * // no EA
dhcp4:/mnt2 # getfacl *
# file: aaa
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
No file ccc!
The directory aaa and file bbb was OK.
I recreated file ccc with ACL:
dhcp4:/mnt2 # touch ccc
dhcp4:/mnt2 # setfacl -m u:ftp:rwx ccc
dhcp4:/mnt2 # getfacl *
# file: aaa
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
# file: ccc
# owner: root
# group: root
user::rw-
user:ftp:rwx
group::r--
mask::rwx
other::r--
Dumped/restored FS:
dhcp4:/mnt2 # rm /tmp/dump
dhcp4:/mnt2 # xfsdump -v 5 -L dump -M dump -0 -f /tmp/dump /mnt2
dhcp4:/mnt2 # rm -rf *
dhcp4:/mnt2 # xfsrestore -v 5 -f /tmp/dump /mnt2
The logs are in dump3.log and restore3.log.
dhcp4:/mnt2 # getfacl *
# file: aaa
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
# file: ccc
# owner: root
# group: root
user::rw-
group::rwx
other::r--
The ACL isn't restored.
Is this expected behaviour?
Thanks.
jan
logs.tar.gz
Description: application/gunzip
|