[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Force mkswap to do it's job.



Mwa, but still ack.

On 11/25/2009 11:55 PM, David Lehman wrote:
There's some broken hueristic in mkswap that leads it to sometimes
mistake a logical volume for a disk and hence refuse to format it,
citing something about bootblocks. Nonsense.
---
  storage/devicelibs/swap.py |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/storage/devicelibs/swap.py b/storage/devicelibs/swap.py
index 1afd209..bd07f19 100644
--- a/storage/devicelibs/swap.py
+++ b/storage/devicelibs/swap.py
@@ -32,7 +32,9 @@ _ = lambda x: gettext.ldgettext("anaconda", x)


  def mkswap(device, label=''):
-    argv = []
+    # We use -f to force since mkswap tends to refuse creation on lvs with
+    # a message about erasing bootbits sectors on whole disks. Bah.
+    argv = ["-f"]
      if label:
          argv.extend(["-L", label])
      argv.append(device)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]