Whamcloud - gitweb
b=9578
authorgreen <green>
Mon, 13 Feb 2006 18:36:28 +0000 (18:36 +0000)
committergreen <green>
Mon, 13 Feb 2006 18:36:28 +0000 (18:36 +0000)
r=adilger

Properly deal with <none> as journal UUID that means no journal

lustre/utils/lconf

index 7ad57a3..53586ee 100755 (executable)
@@ -811,13 +811,15 @@ def def_mount_options(fstype, target, blkdev):
                 if lst[0] == 'Journal UUID':
                     if len(lst[1]) < 3:
                         panic("cannot retrieve journal UUID for ", blkdev)
-                    journal_UUID = string.split(lst[1])[0]
-                    debug(blkdev, 'has journal UUID', journal_UUID)
+                    if string.split(lst[1])[0] != '<none>':
+                        journal_UUID = string.split(lst[1])[0]
+                        debug(blkdev, 'has journal UUID', journal_UUID)
                 if lst[0] == 'Journal device':
                     if len(lst[1]) < 3:
-                        panic("cannot retrieve journal UUID for ", blkdev)
-                    journal_DEV = string.split(lst[1])[0]
-                    debug(blkdev, 'has journal device', journal_DEV)
+                        panic("cannot retrieve journal device for ", blkdev)
+                    if string.split(lst[1])[0] != '0x0000':
+                        journal_DEV = string.split(lst[1])[0]
+                        debug(blkdev, 'has journal device', journal_DEV)
                     break
 
             if len(journal_UUID) == 0 or len(journal_DEV) == 0:
@@ -826,7 +828,7 @@ def def_mount_options(fstype, target, blkdev):
                 return mountfsoptions
         
             # run blkid
-            blkid = "blkid -o device -t UUID=%s" % (journal_UUID)
+            blkid = "blkid -o device -t UUID='%s'" % (journal_UUID)
             (ret, devname) = run(blkid)
             if ret or len(devname) == 0:
                 panic("cannot find external journal for ", blkdev)