---
name: "lfs"
section: "8"
platform: "linux"
package: "lustre-utils"
version: "1.8.3-4"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/lfs"
---

# lfs(8)

helper utility to administrate lustre clusters

## NAME

lfs - helper utility to administrate lustre clusters

## SYNOPSIS

**lfs** \<options\> \[values\]\

## DESCRIPTION

**lfs** lfs is used to administrate a lustre filesystem, you'll need it to get or set  various informations concerning the filesystem usage (e.g. striping, quota, osts, ..)

**lfs** can be invoked in interactive and non-interative mode. In order to use it interactive call lfs without arguments. The available commands in lfs are: **setstripe** , **getstripe** , **find** , **check** , **catinfo** , **join** , **osts** , **df** , **quotachown** , **quotacheck** , **quotaon** , **quotaoff** , **setquota** , **quota** , **help** , **exit** , **quit**

In order to get help type *lfs help*\
 If you want more specific help on a command type *lfs help $command*\
 where $command is one of the ones in the list above.

## OPTIONS

- **setstripe:**

  Create a new file with a specific striping pattern or set the default striping pattern on an existing directory or delete the default striping pattern from an existing directory\
   usage: setstripe \<filename\|dirname\> \<stripe\_size\> \<stripe\_index\> \<stripe\_count\>\
          or \
          setstripe \<filename\|dirname\> \[--size\|-s stripe\_size\]\
                                       \[--index\|-i stripe\_index\]\
                                       \[--count\|-c stripe\_count\]\
          or \
  \
           setstripe -d \<dirname\>   (to delete default striping)

          stripe\_size:  Number of bytes on each OST (0 filesystem default)\
                   Can be specified with k, m or g (in KB, MB and GB respectively)\
           stripe\_index: OST index of first stripe (-1 filesystem default)\
           stripe\_count: Number of OSTs to stripe over (0 default, -1 all)

- **getstripe:**

  To list the striping info for a given filename or files in a directory or recursively for all files in a directory tree.

  usage: getstripe \[--obd\|-O \<uuid\>\] \[--quiet \| -q\] \[--verbose \| -v\]\
                    \[--recursive \| -r\] \<dir\|file\> ...

- **find:**

  To find files that match given parameters recursively in a directory tree.

  usage: find \<dir/file\> ... \
           \[\[!\] --atime\|-A \[+-\]N\] \[\[!\] --mtime\|-M \[+-\]N\] \[\[!\] --ctime\|-C \[+-\]N\]\
           \[--maxdepth\|-D N\] \[\[!\] --name\|-n \<pattern\>\] \[--print0\|-P\]\
           \[--print\|-p\] \[--obd\|-O \<uuid\>\] \[\[!\] --type\|-t \<filetype\>\]\
                   !: used before an option indicates 'NOT' the requested attribute\
                   \-: used before an value indicates 'AT MOST' the requested value\
                   \+: used before an option indicates 'AT LEAST' the requested value

- **check:**

  Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs).

  usage: check \<osts\|mds\|servers\>

- **catinfo:**

  Show information of specified type logs.

  usage: catinfo {keyword} \[node name\]\
           keywords are one of followings: config, deletions.\
           node name must be provided when use keyword config.

- **join:**

  join two lustre files into one - join A, B, will be like cat B \>\> A & del B

  usage: join \<filename\_A\> \<filename\_B\>

- **osts:**

  osts FIXME

- **df:**

  report filesystem disk space usage or inodes usageof each MDS/OSD.

  usage: df \[-i\] \[-h\] \[path\]

- **quotachown:**

  Change files' owner or group on the specified filesystem.

  usage: quotachown \[-i\] \<filesystem\>\
           \-i: ignore error if file is not exist

- **quotacheck:**

  Scan the specified filesystem for disk usage, and create, or update quota files.

  usage: quotacheck \[ -ug \] \<filesystem\>

- **quotaon:**

  Turn filesystem quotas on.

  usage: quotaon \[ -ugf \] \<filesystem\>

- **quotaoff:**

  Turn filesystem quotas off.

  usage: quotaoff \[ -ug \] \<filesystem\>

- **setquota:**

  Set filesystem quotas.

  usage:  setquota \[ -u \| -g \] \<name\> \<block-softlimit\> \<block-hardlimit\> \<inode-softlimit\> \<inode-hardlimit\> \<filesystem\>\
           setquota -t \[ -u \| -g \] \<block-grace\> \<inode-grace\> \<filesystem\>

- **quota:**

  Display disk usage and limits.

  usage: quota \[ -o obd\_uuid \] \[{-u\|-g  \<name\>}\|-t\] \<filesystem\>

- **help:**

  help

- **exit:**

  quit

- **quit:**

  quit

## EXAMPLES

- **$ lfs setstripe /mnt/lustre/file1 131072 -1 2**

  This creats a file striped on two OSTs with 128kB on each stripe.

- **$ lfs setstripe -d /mnt/lustre/dir**

  This deletes a default stripe pattern on dir. New files will use the default striping pattern created therein.

- **$ lfs find /mnt/lustre/file1**

  Lists the object allocation of a given file

- **$ lfs find /mnt/lustre/**

  Lists the object allocationss of all files in a given directory

- **$ lfs find -r /mnt/lustre/**

  Recursively list the objects of all files in a given directory tree

- **$ lfs find -r --obd OST2-UUID /mnt/lustre/**

  Recursively list all files in a given directory that have objects on OST2-UUID.

- **$ lfs quotachown -i /mnt/lustre**

  Change file owner and group

- **$ lfs quotacheck -ug /mnt/lustre**

  Quotacheck for user and group - will turn on quotas after making the check.

- **$ lfs quotaon -ug /mnt/lustre**

  Turn quotas of user and group on

- **$ lfs quotaoff -ug /mnt/lustre**

  Turn quotas of user and group off

- **$ lfs setquota -u bob 0 1000000 0 10000 /mnt/lustre**

  Set quotas of user \`bob': 1GB block quota and 10,000 file quota

- **$ lfs quota -u bob /mnt/lustre**

  List quotas of user \`bob'

- **$ lfs check servers**

  Check the status of all servers (MDT, OST)

- **$ lfs osts**

  List all the OSTs **$ lfs df -i** Lists inode consumpton per OST and MDT

## SEE ALSO

**[lustre(7)](/lustre/7.md)** **Lustre**(7), [**mount**(8)](/mount/8.md), [**mkfs.lustre**(8)](/mkfs.lustre/8.md), [**tunefs.lustre**(8)](/tunefs.lustre/8.md), **lctl**(8),

## AUTHOR

lustre was written by ClusterFileSystems \<info@clusterfs.com\>

This manpage was written by Patrick Winnertz \<patrick.winnertz@credativ.de\> for the Debian GNU/Linux system (but may be used by others).

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License version 2 or any later version published by the Free Software Foundation.
