Whamcloud - gitweb
LU-12624 lod: alloc dir stripes by QoS
[fs/lustre-release.git] / lustre / doc / ll_decode_linkea.8
1 .TH ll_decode_linkea 1 "May 25, 2016" Lustre "utilities"
2 .SH NAME
3 ll_decode_linkea \- display parent FIDs and name of a Lustre file
4 .SH SYNOPSIS
5 .B ll_decode_linkea
6 .I file
7 .RI [ "file ..." ]
8 .br
9 .SH DESCRIPTION
10 .B ll_decode_linkea
11 decodes and prints the Lustre parent FIDs and name of a Lustre file, which
12 are stored in the "trusted.link" attribute on MDT. This is accessible to
13 .B ll_decode_linkea
14 not only through Lustre client, but also when the MDT filesystem is mounted
15 locally as type ldiskfs for maintenance.
16 .PP
17 The "trusted.link" extended attribute is saved when file/directory is created,
18 and modified when renaming or hard link happens.
19 .PP
20 The parent FID is useful in case of MDT corruption. The fsck of ldiskfs can
21 recover most of the ldiskfs hierarchy, but it might leave some files or
22 directories under lost+found. The parent FIDs can be used to determine the
23 right Lustre paths to move them to.
24 .SH EXAMPLE
25 .fi
26 root@mdt1# cd /mnt/mdt/lost+found
27 .fi
28 root@mdt1# ll_decode_linkea \#123451 \#123452
29 .fi
30 #123451: count 2
31 .fi
32     0: [0x200034021:0x2:0x0], name "file1"
33 .fi
34     1: [0x200034021:0x1:0x0], name "file1_link"
35 .fi
36 #123452: count 1
37 .fi
38     0: [0x200000007:0x1:0x0], name "file2"
39 .PP
40 This shows that the 2 files in lost+found. ll_decode_linkea prints all of the
41 parent FIDs of these files. file1 has two hard links, that is why it has two
42 parent directories. Command
43 .B lfs fid2path
44 could be used to extract the paths of the parents.
45 .PP
46 Since "trusted.link" xattr is accessible on Lustre client too,
47 .B ll_decode_linkea
48 could also be used on Lustre client.
49 .PP
50 .SH SEE ALSO
51 .BR lfs (1),
52 .BR lustre (7)