From 92425dbe9376b5f969b2a499634090635de9450a Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Mon, 18 Jun 2012 10:52:27 +0400 Subject: [PATCH] LU-1581 utils: mkfs's usage to show zfs support now everyone is aware of zfs support Signed-off-by: Alex Zhuravlev Change-Id: Ie03aa55360e61b7db1e45a27ea9f0c040827c4d2 Reviewed-on: http://review.whamcloud.com/3229 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Li Wei Reviewed-by: Andreas Dilger --- lustre/utils/mkfs_lustre.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 35f222c..bd90059 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -88,12 +88,47 @@ int verbose = 1; static int print_only = 0; static int upgrade_to_18 = 0; +#define FSLIST_LDISKFS "ldiskfs" +#define HAVE_FSLIST +#ifdef HAVE_ZFS_OSD + #ifdef HAVE_FSLIST + #define FSLIST_ZFS "|zfs" + #else + #define FSLIST_ZFS "zfs" + #define HAVE_FSLIST + #endif +#else + #define FSLIST_ZFS "" +#endif /* HAVE_ZFS_OSD */ + +#ifndef HAVE_FSLIST + #error "no backing OSD types (ldiskfs or ZFS) are configured" +#endif + +#define FSLIST FSLIST_LDISKFS FSLIST_ZFS + void usage(FILE *out) { fprintf(out, "%s v"LUSTRE_VERSION_STRING"\n", progname); - fprintf(out, "usage: %s [options] \n", progname); +#ifdef HAVE_ZFS_OSD + fprintf(out, "usage: %s [--backfstype=zfs] [options] " + "/ [[] " + "[ ...] [[vdev type>] ...]]\n", progname); +#endif + + fprintf(out, "usage: %s --backfstype="FSLIST" " + "[options] \n", progname); fprintf(out, "\t:block device or file (e.g /dev/sda or /tmp/ost1)\n" +#ifdef HAVE_ZFS_OSD + "\t: name of the ZFS pool where to create the " + "target (e.g. tank)\n" + "\t: name of the new dataset (e.g. ost1). The " + "dataset name must be unique within the ZFS pool\n" + "\t: type of vdev (mirror, raidz, raidz2, spare, " + "cache, log)\n" +#endif + "\n" "\ttarget types:\n" "\t\t--ost: object storage, mutually exclusive with mdt,mgs\n" "\t\t--mdt: metadata storage, mutually exclusive with ost\n" -- 1.8.3.1