1 .TH ldev 8 Lustre ldev ldev
3 ldev \- lustre device utility
9 can be used to query information about lustre devices configured in
10 /etc/ldev.conf. It is used by the lustre init script.
13 accepts the following options:
18 .I "-c, --config FILE"
19 Set path to config file.
21 .I "-H, --hostname NAME"
22 Use NAME instead of local hostname for queries.
25 Print hostname of failover partner.
28 Print labels for local devices.
31 Print labels for foreign devices.
34 Print labels for local and foreign devices.
36 .I "-F, --filesys NAME"
37 Print labels for file system NAME.
40 Sanity check config on this node.
41 If any expected local or foreign devices are not present, print an error.
42 If devices do not contain the expected labels, print an error.
44 .I "-d, --device LABEL"
45 Print storage device of label.
47 .I "-j, --journal LABEL"
48 Print journal device corresponding to label if defined.
50 .I "-r, --raidtab LABEL"
51 Print Linux software raid configuration file or ZFS cache file associated with
52 LABEL, if any. Using non-default names for these files may help prevent arrays
53 from being automatically started by the system. This is important in failover
54 configurations where the timing of device initialization must be strictly
58 Print device type of LABEL, i.e. "zfs" or "md".
60 .I "-z, --zpool LABEL"
61 Print zpool containing LABEL.
64 Filter output based on role, i.e. mdt, ost, mgs.
67 Run one instance of \fICMD [ARGS]\fR for each label in parallel.
68 Only the local labels are used by default, but foreign, all, or file system
69 labels may be selected by adding the \fI--foreign\fR, \fI--all\fR, or
70 \fI--filesys\fR options.
71 The following substitutions are made:
72 %f=fsname, %d=device, %j=journal, %i=index, %I=hex-index, %t=type, %l=label,
73 %n=nid, %N=failnid, %m=mgsnid, %H=hostname, %b=backing-fs. On failure of
74 any child processes, \fBldev\fR will return a non-zero exit code.
76 It is an error if %n, %N, or %m is used in a command and /etc/nids does not
77 contain appropriate host to NID mappings.
79 To run a preen check on all devices in a cluster in parallel:
82 pdsh -S -g ost ldev fsck.ldiskfs -p %d
85 To re-format an entire file system:
92 pdsh -S -g mds service lustre stop
93 pdsh -S -g mds ldev "yes \\| mkfs.ldiskfs -q -b4096 \\
95 pdsh -S -g mds ldev dd if=/dev/zero of=%d count=8
96 pdsh -S -g mds ldev mkfs.lustre --mdt --mgs --fsname=%f \\
97 --index=%i --mkfsoptions=-Jdevice=%j \\
98 --mkfsoptions=-i2048 \\
99 --mountfsoptions=errors=panic,iopen_nopriv,user_xattr,\\
100 maxdirsize=20000000 %d
101 pdsh -S -g mds ldev tune.ldiskfs -i0 -m0 -c0 %d
104 mgs=172.16.2.200@tcp0
105 pdsh -S -g ost service heartbeat stop
106 pdsh -S -g ost service lustre stop
107 pdsh -S -g ost ldev dd if=/dev/zero of=%d count=8
108 pdsh -S -g ost ldev mkfs.lustre --ost --mgsnode=$mgs --fsname=%f \\
109 --index=%i --param=lov.stripecount=2 --failnode=%N \\
110 --mountfsoptions=errors=panic,extents,mballoc %d
111 pdsh -S -g ost ldev tune.ldiskfs -epanic -i0 -m0 -c0 %d