From 6410e051e490b93354f7239ae556585e336bb114 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 26 Jun 2006 18:08:16 +0000 Subject: [PATCH] Branch b1_5 b=8007 enforce OST exclusivity with MDT,MGS --- lustre/utils/mkfs_lustre.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 7972fc6..99345b1 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -77,7 +77,7 @@ void usage(FILE *out) fprintf(out, "\t:block device or file (e.g /dev/sda or /tmp/ost1)\n" "\ttarget types:\n" - "\t\t--ost: object storage, mutually exclusive with mdt\n" + "\t\t--ost: object storage, mutually exclusive with mdt,mgs\n" "\t\t--mdt: metadata storage, mutually exclusive with ost\n" "\t\t--mgs: configuration management service - one per site\n" "\toptions (in order of popularity):\n" @@ -1160,9 +1160,17 @@ int main(int argc, char *const argv[]) ldd = &mop.mo_ldd; if (!(IS_MDT(ldd) || IS_OST(ldd) || IS_MGS(ldd))) { fatal(); - fprintf(stderr, "must set target type :{mdt,ost,mgs}\n"); + fprintf(stderr, "must set target type: MDT,OST,MGS\n"); usage(stderr); - ret = 1; + ret = EINVAL; + goto out; + } + + if (((IS_MDT(ldd) || IS_MGS(ldd))) && IS_OST(ldd)) { + fatal(); + fprintf(stderr, "OST type is exclusive with MDT,MGS\n"); + usage(stderr); + ret = EINVAL; goto out; } -- 1.8.3.1