<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I didn&#39;t see anything in your strace logs that would indicate the lustre xattrs were &quot;restored&quot;,<br>
rather that they were &quot;created&quot; (as they always are) when the files or directories are created.<br>
<br></blockquote><div><br></div><div>Agreed.  The strace output I provided was for the &quot;tar zxvf /scratch.tgz&quot; command that did not extract the xattrs.  As you wrote, in that scenario the xattrs were created when the files and directories were extracted/created.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">&quot;trusted.lov&quot;   - holds layout for a regular file, or the directory default layout (== lustre.lov)<br>
&quot;trusted.lma&quot;   - holds FID for current file, some flags<br>
&quot;trusted.lmv&quot;   - holds layout for a striped directory (DNE 2), not present otherwise<br>
&quot;trusted.link&quot;  - holds parent directory FID+filename for each link to a file (for lfs fid2path)<br>
<br></blockquote><div><br></div><div>Andreas, time and time again, you are always such a big help in understanding Lustre in depth.  Thank you very much for putting together this list of xattrs!  Its nice to have a better understanding of how many exist, what they hold, and their names.  I hope to see them soon in the Lustre manual - <a class="gmail-issue-link" href="https://jira.hpdd.intel.com/browse/LUDOC-373" id="gmail-key-val" rel="44998" style="font-family:arial,sans-serif;font-size:14px;color:rgb(0,92,158);text-decoration:none">LUDOC-373</a></div><div><br></div><div>Regards,</div><div>Brett</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Cheers, Andreas<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
&gt; On Mon, Mar 20, 2017 at 1:51 AM, Dilger, Andreas &lt;<a href="mailto:andreas.dilger@intel.com">andreas.dilger@intel.com</a>&gt; wrote:<br>
&gt;&gt; On Mar 19, 2017, at 20:57, Brett Lee &lt;<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Help from down under! :)  Thanks Malcolm!!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Using the correct extract syntax, both directories and files restored with the expected stripe size and stripe count.  This means that Zmanda should be able to work as a backup solution for some Lustre file systems, especially if able to using multiple per-directory &quot;agents&quot; to perform backups in parallel.<br>
&gt;&gt;<br>
&gt;&gt; I tested this on RHEL7, and it seems tar needs a bit of encouragement to restore Lustre xattrs:<br>
&gt;&gt;<br>
&gt;&gt;        tar xvf &lt;tarfile&gt; --xattrs-include=&quot;lustre.*&quot;<br>
&gt;&gt;<br>
&gt;&gt; This will restore the important &quot;lustre.lov&quot; xattr with the file layout (Lustre itself discards the other &quot;lustre.*&quot; xattrs silently) for regular files via mknod+setxattr.  It still doesn&#39;t restore the default lustre.lov xattr onto the directory, even though it backed those xattrs up.<br>
&gt;&gt;<br>
&gt;&gt; Unfortunately, I didn&#39;t see the tar process even trying to access any config file like /etc/xattr.conf or /etc/tar.conf whatever, so I don&#39;t think there is any way to make this the default without recompiling tar.  Sadly, I thought we&#39;d gotten away from this once RHEL6 had patched their tar and GNU tar had added xattr support natively in 1.27, but it seems that we&#39;ll need to patch it again.  One option would be to add &quot;lustre.*&quot; to the xattrs-include list if extracting to a Lustre filesystem (e.g. checked via statfs() at the start).<br>
&gt;&gt;<br>
&gt;&gt; Cheers, Andreas<br>
&gt;&gt;<br>
&gt;&gt;&gt; Go Lustre!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Folks, my bad for only checking one source - the 3rd hit via Google for &quot;backup restore xattrs tar&quot;:<br>
&gt;&gt;&gt; <a href="https://www.cyberciti.biz/faq/linux-tar-rsync-preserving-acls-selinux-contexts/" rel="noreferrer" target="_blank">https://www.cyberciti.biz/faq/<wbr>linux-tar-rsync-preserving-<wbr>acls-selinux-contexts/</a><br>
&gt;&gt;&gt; I wasn&#39;t aware that &quot;tar&quot; was so dynamic in this respect.  Alas, this again justifyies the adage &quot;trust, but verify&quot; - and especially with backups.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brett<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Protect Yourself Against Cybercrime<br>
&gt;&gt;&gt; PDS Software Solutions LLC<br>
&gt;&gt;&gt; <a href="https://www.TrustPDS.com" rel="noreferrer" target="_blank">https://www.TrustPDS.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Sun, Mar 19, 2017 at 3:34 PM, Cowe, Malcolm J &lt;<a href="mailto:malcolm.j.cowe@intel.com">malcolm.j.cowe@intel.com</a>&gt; wrote:<br>
&gt;&gt;&gt; The version of tar included in RHEL 7 doesn\u2019t restore the lustre xattrs by default \u2013 you can use the following to extract files with the requisite xattrs:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; tar --xattrs-include=lustre.* -xf &lt;backup&gt;.tar<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This assumes the files were backed up with the --xattrs flag:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; tar --xattrs -cf &lt;backup&gt;.tar &lt;file list&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Note, that you don\u2019t appear to need to whitelist the Lustre xattrs when backing up, only when restoring.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Malcolm.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; From: lustre-discuss &lt;<a href="mailto:lustre-discuss-bounces@lists.lustre.org">lustre-discuss-bounces@lists.<wbr>lustre.org</a>&gt; on behalf of &quot;Dilger, Andreas&quot; &lt;<a href="mailto:andreas.dilger@intel.com">andreas.dilger@intel.com</a>&gt;<br>
&gt;&gt;&gt; Date: Monday, 20 March 2017 at 8:11 am<br>
&gt;&gt;&gt; To: Brett Lee &lt;<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.com</a>&gt;<br>
&gt;&gt;&gt; Cc: Lustre discussion &lt;<a href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.<wbr>org</a>&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Subject: Re: [lustre-discuss] Backup software for Lustre<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The use of openat() could be problematic since this precludes storing the xattr before the file is opened. That said, I don&#39;t see anywhere in your strace log that (f)setxattr() is called to restore the xattrs, for either the regular files or directories, even after the file is opened or written?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Does the RHEL tar have a whitelist of xattrs to be restored?  The fact that there are Lustre xattrs after the restore appears to just be normal behavior for creating a file, not anything related to tar restoring xattrs.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Andreas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mar 19, 2017, at 10:45, Brett Lee &lt;<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Sure, happy to help.  I did not see mknod+setxattr in the strace output.  Included is a trimmed version of the strace output, along with a few more bits of information.  Thanks!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # cat /proc/fs/lustre/version<br>
&gt;&gt;&gt; lustre: 2.7.19.8<br>
&gt;&gt;&gt; # cat /etc/redhat-release<br>
&gt;&gt;&gt; CentOS Linux release 7.3.1611 (Core)<br>
&gt;&gt;&gt; # uname -r<br>
&gt;&gt;&gt; 3.10.0-514.2.2.el7_lustre.x86_<wbr>64<br>
&gt;&gt;&gt; # rpm -qa|grep tar<br>
&gt;&gt;&gt; tar-1.26-31.el7.x86_64<br>
&gt;&gt;&gt; # sha1sum `which tar` `which gtar`<br>
&gt;&gt;&gt; ea17ec98894212b2e2285eb2dd99aa<wbr>d76185ea7d  /usr/bin/tar<br>
&gt;&gt;&gt; ea17ec98894212b2e2285eb2dd99aa<wbr>d76185ea7d  /usr/bin/gtar<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Striping was set on the four directories before creating the files.<br>
&gt;&gt;&gt; mkdir -p /scratch/1; lfs setstripe -c 1 --stripe-size 128K /scratch/1; lfs getstripe /scratch/1<br>
&gt;&gt;&gt; mkdir -p /scratch/2; lfs setstripe -c 2 --stripe-size 256K /scratch/2; lfs getstripe /scratch/2<br>
&gt;&gt;&gt; mkdir -p /scratch/3; lfs setstripe -c 3 --stripe-size 768K /scratch/3; lfs getstripe /scratch/3<br>
&gt;&gt;&gt; mkdir -p /scratch/4; lfs setstripe -c 4 --stripe-size 1M    /scratch/4; lfs getstripe /scratch/4<br>
&gt;&gt;&gt; After tar, all files and directories all had the default Lustre striping.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # tar ztvf /scratch.tgz<br>
&gt;&gt;&gt; drwxr-xr-x root/root         0 2017-03-19 10:54 scratch/<br>
&gt;&gt;&gt; drwxr-xr-x root/root         0 2017-03-19 10:57 scratch/4/<br>
&gt;&gt;&gt; -rw-r--r-- root/root   4194304 2017-03-19 10:57 scratch/4/4.dd<br>
&gt;&gt;&gt; drwxr-xr-x root/root         0 2017-03-19 10:57 scratch/3/<br>
&gt;&gt;&gt; -rw-r--r-- root/root   4194304 2017-03-19 10:57 scratch/3/3.dd<br>
&gt;&gt;&gt; drwxr-xr-x root/root         0 2017-03-19 10:57 scratch/1/<br>
&gt;&gt;&gt; -rw-r--r-- root/root   4194304 2017-03-19 10:57 scratch/1/1.dd<br>
&gt;&gt;&gt; drwxr-xr-x root/root         0 2017-03-19 10:57 scratch/2/<br>
&gt;&gt;&gt; -rw-r--r-- root/root   4194304 2017-03-19 10:57 scratch/2/2.dd<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # strace tar zxvf /scratch.tgz &gt; strace.out 2&gt;&amp;1<br>
&gt;&gt;&gt; execve(&quot;/usr/bin/tar&quot;, [&quot;tar&quot;, &quot;zxvf&quot;, &quot;/scratch.tgz&quot;], [/* 22 vars */]) = 0<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; (-cut - loading libraries)<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; fstat(1, {st_mode=S_IFREG|0644, st_size=10187, ...}) = 0<br>
&gt;&gt;&gt; mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4a63d9f000<br>
&gt;&gt;&gt; write(1, &quot;scratch/\n&quot;, 9scratch/<br>
&gt;&gt;&gt; )               = 9<br>
&gt;&gt;&gt; mkdirat(AT_FDCWD, &quot;scratch&quot;, 0700)      = -1 EEXIST (File exists)<br>
&gt;&gt;&gt; newfstatat(AT_FDCWD, &quot;scratch&quot;, {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; write(1, &quot;scratch/4/\n&quot;, 11scratch/4/<br>
&gt;&gt;&gt; )            = 11<br>
&gt;&gt;&gt; mkdirat(AT_FDCWD, &quot;scratch/4&quot;, 0700)    = 0<br>
&gt;&gt;&gt; write(1, &quot;scratch/4/4.dd\n&quot;, 15scratch/4/4.dd<br>
&gt;&gt;&gt; )        = 15<br>
&gt;&gt;&gt; openat(AT_FDCWD, &quot;scratch/4/4.dd&quot;,<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; O_WRONLY|O_CREAT|O_EXCL|O_<wbr>NOCTTY|O_NONBLOCK|O_CLOEXEC, 0600) = 4<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 5632) = 5632<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 5632) = 5632<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; (-cut)<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 512) = 512<br>
&gt;&gt;&gt; dup2(4, 4)                              = 4<br>
&gt;&gt;&gt; fstat(4, {st_mode=S_IFREG|0600, st_size=4194304, ...}) = 0<br>
&gt;&gt;&gt; utimensat(4, NULL, {{1489935825, 0}, {1489935444, 0}}, 0) = 0<br>
&gt;&gt;&gt; fchown(4, 0, 0)                         = 0<br>
&gt;&gt;&gt; fchmod(4, 0644)                         = 0<br>
&gt;&gt;&gt; close(4)                                = 0<br>
&gt;&gt;&gt; write(1, &quot;scratch/3/\n&quot;, 11scratch/3/<br>
&gt;&gt;&gt; )            = 11<br>
&gt;&gt;&gt; newfstatat(AT_FDCWD, &quot;scratch/4&quot;, {st_mode=S_IFDIR|0700, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; utimensat(AT_FDCWD, &quot;scratch/4&quot;, {{1489935825, 0}, {1489935444, 0}}, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; fchownat(AT_FDCWD, &quot;scratch/4&quot;, 0, 0, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; fchmodat(AT_FDCWD, &quot;scratch/4&quot;, 0755)   = 0<br>
&gt;&gt;&gt; mkdirat(AT_FDCWD, &quot;scratch/3&quot;, 0700)    = 0<br>
&gt;&gt;&gt; write(1, &quot;scratch/3/3.dd\n&quot;, 15scratch/3/3.dd<br>
&gt;&gt;&gt; )        = 15<br>
&gt;&gt;&gt; openat(AT_FDCWD, &quot;scratch/3/3.dd&quot;, O_WRONLY|O_CREAT|O_EXCL|O_<wbr>NOCTTY|O_NONBLOCK|O_CLOEXEC, 0600) = 4<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 6656) = 6656<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; (-cut - pick up with last file...)<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; d(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2476, si_status=0, si_utime=7, si_stime=0} ---<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; read(3, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 10240) = 10240<br>
&gt;&gt;&gt; write(4, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\<wbr>0\0\0&quot;..., 7680) = 7680<br>
&gt;&gt;&gt; dup2(4, 4)                              = 4<br>
&gt;&gt;&gt; fstat(4, {st_mode=S_IFREG|0600, st_size=4194304, ...}) = 0<br>
&gt;&gt;&gt; utimensat(4, NULL, {{1489935825, 0}, {1489935432, 0}}, 0) = 0<br>
&gt;&gt;&gt; fchown(4, 0, 0)                         = 0<br>
&gt;&gt;&gt; fchmod(4, 0644)                         = 0<br>
&gt;&gt;&gt; close(4)                                = 0<br>
&gt;&gt;&gt; clock_gettime(CLOCK_REALTIME, {1489935825, 628399394}) = 0<br>
&gt;&gt;&gt; clock_gettime(CLOCK_REALTIME, {1489935825, 628414336}) = 0<br>
&gt;&gt;&gt; close(3)                                = 0<br>
&gt;&gt;&gt; wait4(2476, [{WIFEXITED(s) &amp;&amp; WEXITSTATUS(s) == 0}], 0, NULL) = 2476<br>
&gt;&gt;&gt; newfstatat(AT_FDCWD, &quot;scratch/2&quot;, {st_mode=S_IFDIR|0700, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; utimensat(AT_FDCWD, &quot;scratch/2&quot;, {{1489935825, 0}, {1489935432, 0}}, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; fchownat(AT_FDCWD, &quot;scratch/2&quot;, 0, 0, AT_SYMLINK_NOFOLLOW) = 0<br>
&gt;&gt;&gt; fchmodat(AT_FDCWD, &quot;scratch/2&quot;, 0755)   = 0<br>
&gt;&gt;&gt; newfstatat(AT_FDCWD, &quot;scratch&quot;, {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0<br>
&gt;&gt;&gt; utimensat(AT_FDCWD, &quot;scratch&quot;, {{1489934977, 0}, {1489935261, 0}}, 0) = 0<br>
&gt;&gt;&gt; fchownat(AT_FDCWD, &quot;scratch&quot;, 0, 0, 0)  = 0<br>
&gt;&gt;&gt; close(1)                                = 0<br>
&gt;&gt;&gt; munmap(0x7f4a63d9f000, 4096)            = 0<br>
&gt;&gt;&gt; close(2)                                = 0<br>
&gt;&gt;&gt; exit_group(0)                           = ?<br>
&gt;&gt;&gt; +++ exited with 0 +++<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brett<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Protect Yourself Against Cybercrime<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; PDS Software Solutions LLC<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="https://www.TrustPDS.com" rel="noreferrer" target="_blank">https://www.TrustPDS.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Sun, Mar 19, 2017 at 7:39 AM, Dilger, Andreas &lt;<a href="mailto:andreas.dilger@intel.com">andreas.dilger@intel.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I ran a test locally with RHEL 6.8 and the included tar 1.26 using strace, and tar is properly using mknod+setxattr to restore the &quot;lov&quot; xattr, and the stripe count and stripe size to be preserved.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The OST index is not preserved with the xattr restore, since that may cause imbalance if the  files were backed up in a different filesystem (e.g. one with fewer OSTs).  The MDS will balance OST allocation as needed for the current OST usage.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Could you please run your tar on RHEL 7 with strace to see if it is doing this correctly?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Andreas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mar 18, 2017, at 21:51, Brett Lee &lt;<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Andreas, I expected that to be the case, but found out it was not.  Instead, the restore restores everything - unless directed otherwise.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Backup == cmd + add xattrs.<br>
&gt;&gt;&gt; Restore == cmd + exclude xattrs.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brett<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Protect Yourself Against Cybercrime<br>
&gt;&gt;&gt; PDS Software Solutions LLC<br>
&gt;&gt;&gt; <a href="https://www.TrustPDS.com" rel="noreferrer" target="_blank">https://www.TrustPDS.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mar 18, 2017 9:28 PM, &quot;Dilger, Andreas&quot; &lt;<a href="mailto:andreas.dilger@intel.com">andreas.dilger@intel.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Do you need to specify --xattrs (or similar) during the restore phase as well?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Andreas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mar 17, 2017, at 15:12, Brett Lee &lt;<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi.  In what I thought was a valid test, I was unable to confirm that a backup and restore retained the layouts.  Perhaps my expectation or process was incorrect?  The process was:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 1.  Create 4 files, each with different stripe sizes and stripe counts (verified with getstripe).<br>
&gt;&gt;&gt; 2.  Back up the files using tar-1.26-31.el7.x86_64.<br>
&gt;&gt;&gt; 3.  Recreate a file system and restore the files.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Backup command:  tar --xattrs -zcvf /scratch.tgz /scratch<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Restore command:  tar zxvf /scratch.tgz<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; After restoration, getstripe showed that each file had the default stripe count (1) and stripe size (1MB).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; FWIW:  After restoring, getfattr produced the same result for each file:<br>
&gt;&gt;&gt; # getfattr -d -m - -R &lt;file&gt;<br>
&gt;&gt;&gt; lustre.lov=<wbr>0s0AvRCwEAAAAdAAAAAAAAAAAEAAAC<wbr>AAAAAAAQAAEAAAAFAAAAAAAAAAAAAA<wbr>AAAAAAAAAAAAAAAAA=<br>
&gt;&gt;&gt; trusted.link=0s3/<wbr>HqEQEAAAAuAAAAAAAAAAAAAAAAAAAA<wbr>ABYAAAACAAAEAAAAAAUAAAAAMS5kZA<wbr>==<br>
&gt;&gt;&gt; trusted.lma=<wbr>0sAAAAAAAAAAAABAAAAgAAAB0AAAAA<wbr>AAAA<br>
&gt;&gt;&gt; trusted.lov=<wbr>0s0AvRCwEAAAAdAAAAAAAAAAAEAAAC<wbr>AAAAAAAQAAEAAAAFAAAAAAAAAAAAAA<wbr>AAAAAAAAAAAAAAAAA=<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brett<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Protect Yourself Against Cybercrime<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; PDS Software Solutions LLC<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="https://www.TrustPDS.com" rel="noreferrer" target="_blank">https://www.TrustPDS.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Mar 15, 2017 at 5:03 AM, Dilger, Andreas &lt;<a href="mailto:andreas.dilger@intel.com">andreas.dilger@intel.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I believe Zmanda is already using GNU tar (or RHEL tar) for the actual backup storage?  I that case it should already work, since we fixed tar long ago to backup and restore xattrs in a way that preserves Lustre layouts.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Andreas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mar 14, 2017, at 15:47, Brett Lee &lt;<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks for the details, Andreas!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Maybe OpenSFS can fund Zmanda so that their backup software can include the Lustre metadata... :)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brett<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Protect Yourself Against Cybercrime<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; PDS Software Solutions LLC<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="https://www.TrustPDS.com" rel="noreferrer" target="_blank">https://www.TrustPDS.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Mar 14, 2017 at 3:13 PM, Dilger, Andreas &lt;<a href="mailto:andreas.dilger@intel.com">andreas.dilger@intel.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; To reply to this old thread, there are two different kinds of Lustre backup solutions:<br>
&gt;&gt;&gt; - file level backups that traverse the client POSIX filesystem, for which any number of<br>
&gt;&gt;&gt;  commercial solutions exist.  Making these solutions &quot;capable of saving Lustre metadata&quot;<br>
&gt;&gt;&gt;  boils down to two simple things - save the &quot;lustre.lov&quot; xattr during backup (at a minimum,<br>
&gt;&gt;&gt;  other xattrs also should be backed up), and then using mknod(2) + setxattr() to restore<br>
&gt;&gt;&gt;  the &quot;lustre.lov&quot; xattr before opening the file and restoring the data.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; - device level backups (e.g. &quot;dd&quot; for ldiskfs, and &quot;zfs send/recv&quot; for ZFS).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Using the file level backups allows backup/restore of subsets of the filesystem, since many<br>
&gt;&gt;&gt; HPC sites have Lustre filesystems that are too large to backup completely.  I typically do<br>
&gt;&gt;&gt; not recommend to use device-level backups for the OSTs, unless doing an OST hardware migration,<br>
&gt;&gt;&gt; and even then it is probably less disruptive to do Lustre-level file migration off the OST<br>
&gt;&gt;&gt; before swapping it out.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Whether file level backups are used or not, I would recommend sites always make periodic<br>
&gt;&gt;&gt; device level backups of the MDT(s).  The amount of space needed for an MDT backup is small<br>
&gt;&gt;&gt; compared to the rest of the filesystem (e.g. a few TB at most), and can avoid the need for<br>
&gt;&gt;&gt; a full filesystem restore (e.g. multi-PB of data, if a full backup exists at all) even<br>
&gt;&gt;&gt; though all the data is still available on the OSTs.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The MDT device-level backup can use relatively slow SATA drives, since they will mostly be<br>
&gt;&gt;&gt; used for linear writes (or occasionally linear reads for restore), so a few multi-TB SATA III<br>
&gt;&gt;&gt; drives is sufficient for storing a rotating set of MDT device backups.  At 150MB/s for even<br>
&gt;&gt;&gt; a single SATA drive, this is about 2h/TB, which is reasonable to do once a week (or more often<br>
&gt;&gt;&gt; for smaller MDTs).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; While using an LVM snapshot of the ldiskfs MDT for the backup source is desirable for consistency<br>
&gt;&gt;&gt; reasons, having even an MDT backup from a mounted and in-use MDT is better than nothing at<br>
&gt;&gt;&gt; all when a problem is hit, since e2fsck can repair the in-use inconsistencies fairly easily,<br>
&gt;&gt;&gt; and Lustre can deal with inconsistencies between the MDT and OST reasonably (at most returning<br>
&gt;&gt;&gt; an -ENOENT error to the client for files that were deleted).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers, Andreas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Feb 7, 2017, at 12:32, Andrew Holway &lt;<a href="mailto:andrew.holway@gmail.com">andrew.holway@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Would it be difficult to suspend IO and snapshot all the nodes (assuming ZFS). Could you be sure that your MDS and OSS are synchronised?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On 7 February 2017 at 19:52, Mike Selway &lt;<a href="mailto:mselway@cray.com">mselway@cray.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt; Hello Brett,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;               Actually, looking for someone who uses a commercialized approach (that retains user metadata and Lustre extended metadata) and not specifically the manual approaches of Chapter 17.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thanks!<br>
&gt;&gt;&gt;&gt;&gt; Mike<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Mike Selway | Sr. Tiered Storage Architect | Cray Inc.<br>
&gt;&gt;&gt;&gt;&gt; Work <a href="tel:%2B1-301-332-4116" value="+13013324116">+1-301-332-4116</a> | <a href="mailto:mselway@cray.com">mselway@cray.com</a><br>
&gt;&gt;&gt;&gt;&gt; 146 Castlemaine Ct,   Castle Rock,  CO  80104 | <a href="http://www.cray.com" rel="noreferrer" target="_blank">www.cray.com</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; From: Brett Lee [mailto:<a href="mailto:brettlee.lustre@gmail.com">brettlee.lustre@gmail.<wbr>com</a>]<br>
&gt;&gt;&gt;&gt;&gt;&gt; Sent: Monday, February 06, 2017 11:45 AM<br>
&gt;&gt;&gt;&gt;&gt;&gt; To: Mike Selway &lt;<a href="mailto:mselway@cray.com">mselway@cray.com</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Cc: <a href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.<wbr>org</a><br>
&gt;&gt;&gt;&gt;&gt;&gt; Subject: Re: [lustre-discuss] Backup software for Lustre<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Hey Mike,<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; &quot;Chapter 17&quot; and<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://www.intel.com/content/www/us/en/lustre/backup-and-restore-training.html" rel="noreferrer" target="_blank">http://www.intel.com/content/<wbr>www/us/en/lustre/backup-and-<wbr>restore-training.html</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; both contain methods to backup &amp; restore the entire Lustre file system.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Are you looking for a solution that backs up only the (user) data files and their associated metadata (e.g. xattrs)?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Brett<br>
&gt;&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt;&gt; Protect Yourself From Cybercrime<br>
&gt;&gt;&gt;&gt;&gt;&gt; PDS Software Solutions LLC<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="https://www.TrustPDS.com" rel="noreferrer" target="_blank">https://www.TrustPDS.com</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On Mon, Feb 6, 2017 at 11:12 AM, Mike Selway &lt;<a href="mailto:mselway@cray.com">mselway@cray.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hello,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;         Anyone aware of and/or using a Backup software package to protect their LFS environment (not referring to the tools/scripts suggested in Chapter 17).<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Mike<br>
<br>
Cheers, Andreas<br>
--<br>
Andreas Dilger<br>
Lustre Principal Architect<br>
Intel Corporation<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>