From b6061f411141485c742ccefdedecf243a9ac0782 Mon Sep 17 00:00:00 2001 From: pschwan Date: Mon, 23 Dec 2002 23:47:25 +0000 Subject: [PATCH] lconf now aborts with a helpful message if the dd fails, instead of waiting until it can't create the filesystem --- lustre/utils/lconf.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/utils/lconf.in b/lustre/utils/lconf.in index c4cb3c8..4647c9d 100755 --- a/lustre/utils/lconf.in +++ b/lustre/utils/lconf.in @@ -588,7 +588,11 @@ def init_loop(file, size, fstype): if config.reformat() or not os.access(file, os.R_OK | os.W_OK): if size < 8000: error(file, "size must be larger than 8MB") - run("dd if=/dev/zero bs=1k count=0 seek=%d of=%s" %(size, file)) + (ret, out) = run("dd if=/dev/zero bs=1k count=0 seek=%d of=%s" %(size, + file)) + if ret: + panic("Unable to create backing store:", file) + loop = loop_base() # find next free loop for n in xrange(0, MAX_LOOP_DEVICES): -- 1.8.3.1