LDEV(8)
π LDEV(8) β the lustre device utility, bestie edition π
okay so this is ldev, and it lives in the Lustre Configuration Utilities section of the manual (that's section 8, for the admins in the chat π«Ά).
β¨ NAME β¨
ldev β the lustre device utility. that's it, that's the girl π
πΈ SYNOPSIS πΈ
ldev [OPTIONS]
π¦ DESCRIPTION π¦
so here's the vibe: ldev is what you use to query information about lustre devices that are configured in /etc/ldev.conf. that's the config file, she's the blueprint, she holds the lore β¨
and who uses her? the lustre init script. so like, she's not just cute, she's essential. main character energy fr fr π
π OPTIONS π
ldev accepts the following options, and no we are not skipping any of them, every single one gets her moment:
-h,--helpβ display the help message. she's helping π₯°-c,--config FILEβ set the path to the config file.-H,--hostname NAMEβ useNAMEinstead of the local hostname when doing queries. like, pretend to be someone else for a sec π-p,--partnerβ print the hostname of the failover partner.-l,--localβ print labels for local devices.-f,--foreignβ print labels for foreign devices.-a,--allβ print labels for local and foreign devices. all of them. the whole roster π-F,--filesys NAMEβ print labels for file systemNAME.-s,--sanityβ sanity check the config on this node. if any expected local or foreign devices are not present, print an error. if devices do not contain the expected labels, print an error. so basically she's doing a vibe check and reporting back π€β¨-d,--device LABELβ print the storage device ofLABEL.-j,--journal LABELβ print the journal device corresponding toLABEL, if defined.-r,--raidtab LABELβ print the Linux software raid configuration file, or the ZFS cache file, associated withLABEL, if there is any.
real talk: using non-default names for these files may help prevent arrays from being automatically started by the system. this is important in failover configurations, where the timing of device initialization must be strictly controlled. like, do not freestyle this one bestie π¨
-t,--type LABELβ print the device type ofLABEL, i.e."zfs"or"md".-z,--zpool LABELβ print the zpool containingLABEL.-R,--role ROLEβ filter the output based on role, i.e.mdt,ost,mgs.CMD [ARGS...]β run one instance ofCMD [ARGS]for each label, in parallel. only the local labels are used by default, but foreign, all, or file system labels may be selected by adding the--foreign,--all, or--filesysoptions. the following substitutions get made:%f=fsname%d=device%j=journal%i=index%I=hex-index%t=type%l=label%n=nid%N=failnid%m=mgsnid%H=hostname%b=backing-fs
on failure of any child processes, ldev will return a non-zero exit code. noted π
it is an error if %n, %N, or %m is used in a command and /etc/nids does not contain appropriate host to NID mappings. so don't do that unless /etc/nids has the receipts π§Ύ
π FILES π
/etc/ldev.conf/etc/nids
β EXAMPLES β
to run a preen check on all devices in a cluster in parallel:
pdsh -S -g ost ldev fsck.ldiskfs -p %d
to re-format an entire file system:
#!/usr/bin/bash -xe
export FANOUT=64
# MDTs
# pdsh -S -g mds service lustre stop
# pdsh -S -g mds ldev yes \| mkfs.ldiskfs -q -b4096 -Ojournal_dev %j
# pdsh -S -g mds ldev dd if=/dev/zero of=%d count=8
# pdsh -S -g mds ldev mkfs.lustre --mdt --mgs --fsname=%f \
--index=%i --mkfsoptions=-Jdevice=%j --mkfsoptions=-i2048 \
--mountfsoptions=errors=panic,iopen_nopriv,user_xattr,\
maxdirsize=20000000 %d
# pdsh -S -g mds ldev tune.ldiskfs -i0 -m0 -c0 %d
# OSTs
mgs=172.16.2.200@tcp0
# pdsh -S -g ost service heartbeat stop
# pdsh -S -g ost service lustre stop
# pdsh -S -g ost ldev dd if=/dev/zero of=%d count=8
# pdsh -S -g ost ldev mkfs.lustre --ost --mgsnode=$mgs --fsname=%f \
--index=%i --param=lov.stripecount=2 --failnode=%N \
--mountfsoptions=errors=panic,extents,mballoc %d
# pdsh -S -g ost ldev tune.ldiskfs -epanic -i0 -m0 -c0 %d
(it's giving absolute cinema, do not run this casually π)
π AVAILABILITY π
ldev is part of the lustre(7) filesystem package since release 0.8.0. she's been iconic since day one, no cap π
π₯ SEE ALSO π₯
and that's the whole page, bestie!! π this one's from the Lustre crew, dated 2024-08-29 β go forth and query your devices responsibly π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms