Whamcloud - gitweb
lconf now aborts with a helpful message if the dd fails, instead of
authorpschwan <pschwan>
Mon, 23 Dec 2002 23:47:25 +0000 (23:47 +0000)
committerpschwan <pschwan>
Mon, 23 Dec 2002 23:47:25 +0000 (23:47 +0000)
waiting until it can't create the filesystem

lustre/utils/lconf.in

index c4cb3c8..4647c9d 100755 (executable)
@@ -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):