mkfs_lustre实际上是一个用户空间程序,本质上是构成一个mke2fs命令并对磁盘格式化,然后挂载到临时目录,并书写server配置文件。
让我们先看一下mkfs.lustre的命令行:
[root@people ~]# mkfs.lustre mkfs.lustre v2.2.51 usage: mkfs.lustre <target types> [options] <device> <device>:block device or file (e.g /dev/sda or /tmp/ost1) target types: --ost: object storage, mutually exclusive with mdt,mgs --mdt: metadata storage, mutually exclusive with ost --mgs: configuration management service - one per site options (in order of popularity): --mgsnode=<nid>[,<...>] : NID(s) of a remote mgs node required for all targets other than the mgs node --fsname=<filesystem_name> : default is 'lustre' --failnode=<nid>[,<...>] : NID(s) of a failover partner cannot be used with --servicenode --servicenode=<nid>[,<...>] : NID(s) of all service partners treat all nodes as equal service node, cannot be used with --failnode --param <key>=<value> : set a permanent parameter e.g. --param sys.timeout=40 --param lov.stripesize=2M --index=#N : target index (i.e. ost index within lov) --comment=<user comment>: arbitrary string (824 bytes) --mountfsoptions=<opts> : permanent mount options --network=<net>[,<...>] : restrict OST/MDT to network(s) --backfstype=<fstype> : backing fs type (ext3, ldiskfs) --device-size=#N(KB) : device size for loop devices --mkfsoptions=<opts> : format options --reformat: overwrite an existing disk --stripe-count-hint=#N : for optimizing MDT inode size --iam-dir: use IAM directory format, not ext3 compatible --dryrun: just report what we would do; don't write to disk --verbose : e.g. show mkfs progress --quiet |
结构体类型:
结构体struct mkfs_opts,摘自<mkfs_lustre.c>
类型 |
域 |
描述 |
struct lustre_disk_data |