From owner-freebsd-amd64@freebsd.org Mon Jan 16 01:17:07 2017 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F1A1CB177D for ; Mon, 16 Jan 2017 01:17:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E66F1E6F for ; Mon, 16 Jan 2017 01:17:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0G1H76s047911 for ; Mon, 16 Jan 2017 01:17:07 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 216127] sbin/restore doesn't honour extended attributes (extattr on ufs) Date: Mon, 16 Jan 2017 01:17:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dewayne@heuristicsystems.com.au X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 01:17:07 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216127 Bug ID: 216127 Summary: sbin/restore doesn't honour extended attributes (extattr on ufs) Product: Base System Version: 11.0-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: dewayne@heuristicsystems.com.au CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org During a ufs filesystem restore we found that extended attributes weren't correctly installed on=20 # uname -aKU FreeBSD hathor 11.0-STABLE FreeBSD 11.0-STABLE #0 r311660M: Sun Jan 8 21:3= 0:51 AEDT 2017 root@hathor:/110002/D/K8/hqdev-amd64-smp-vga amd64 1100509 1100509 /sbin/restore is our primary backup strategy as neither of cp, tar nor rsync store extended attributes. # Simplest test - for a successful test of extended attributes sh=20 truncate -s 64m /tmp/testf M=3D`mdconfig -a -t vnode -f /tmp/testf` newfs /dev/$M mount /dev/$M /mnt/A cd /mnt/A echo hello>file-ext setextattr system hi hello file-ext setextattr user sz 6 file-ext lsextattr system file-ext && getextattr system hi file-ext dump -0Lar -C 32 -r -f /tmp/d.dmp /mnt/A rm -v file-ext cd /mnt/A && restore -rvf /tmp/d.dmp lsextattr system file-ext;=20 getextattr system hi file-ext; getextattr user sz file-ext exit umount /mnt/A && mdconfig -du 0 # Test for failure. sh=20 truncate -s 64m /tmp/testf M=3D`mdconfig -a -t vnode -f /tmp/testf` newfs /dev/$M mount /dev/$M /mnt/A cd /mnt/A echo hello>file-ext setextattr system m "`md5 -q file-ext`" file-ext setextattr user sz `stat -f %z file-ext` file-ext lsextattr system file-ext && getextattr system m file-ext dump -0Lar -C 32 -r -f /tmp/d.dmp /mnt/A # Added the following cd=20 umount /mnt/A && mdconfig -du 0 && rm /tmp/testf # Could replace the from here to next comment with "rm -v file-ext"=20 truncate -s 64m /tmp/testf M=3D`mdconfig -a -t vnode -f /tmp/testf` newfs /dev/$M mount /dev/$M /mnt/A cd /mnt/A && restore -rvf /tmp/d.dmp # lsextattr system file-ext;=20 getextattr system m file-ext; getextattr user sz file-ext cd exit umount /mnt/A; mdconfig -du 0 Results: During restore - note that the name and value appear to be merged in the sy= stem table. Set attributes for ./file-ext: system, (40 bytes), mb1946ac92492d2347c6235b4d2611184 user, (24 bytes), sz If we change=20 setextattr system m "`md5 -q file-ext`" file-ext to setextattr system m "`md5 -q file-ext|head -c 6`" file-ext We get a different result during restore Set attributes for ./file-ext: system, (16 bytes), mb1946a (unable to set) user, (24 bytes), sz Something is very confused. Happy to test as we tried quite a few combinations of restoring on same/different vnode devices with more complex ext attributes. --=20 You are receiving this mail because: You are on the CC list for the bug.=