[blivet][PATCH] Do not limit swap size to 10 % of disk space for hibernation

Vratislav Podzimek vpodzime at redhat.com
Wed Oct 9 12:29:52 UTC 2013


If --hibernation is used there should be enough space on the disks to create
large enough swap for hibernation.

Related: rhbz#1016673

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 blivet/devicelibs/swap.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/devicelibs/swap.py b/blivet/devicelibs/swap.py
index 0fb2c69..99ca3ca 100644
--- a/blivet/devicelibs/swap.py
+++ b/blivet/devicelibs/swap.py
@@ -157,7 +157,7 @@ def swapSuggestion(quiet=False, hibernation=False, disk_space=None):
         else:
             log.info("Ignoring --hibernation option on systems with 64 GB of RAM or more")
 
-    if disk_space is not None:
+    if disk_space is not None and not hibernation:
         max_swap = int(disk_space * MAX_SWAP_DISK_RATIO)
         if swap > max_swap:
             log.info("Suggested swap size (%(swap)d M) exceeds %(percent)d %% of "
-- 
1.7.11.7



More information about the anaconda-patches mailing list