Swap partition

Hi all,

i am trying to create swap partition from UI i can create but swap partition stays in unused partitions.

I am using:

MAAS version: 2.6.0 (7802-g59416a869-0ubuntu1~18.04.1)

Best,
Stefan

1 Like

I put swap in cloud-config at the moment but i want to manage swap from UI

#Swap file siez 8GB
swap:
  filename: /var/swapfile
  size: 8589934592
  maxsize: 8589934592

Best,
Stefan

This still seems to be an issue – when creating swap via the web interface (or the official python library) swap does not actually activate in the OS and is completely left out of /etc/fstab

For reference, I am using maas 3.0

Any workarounds / fixes to this?

Hi @brian,

What I do is simple. You need to create the partition using web UI, set Unformated filesystem. After the partition is show in UI edit and change filesystem to swap. And you will see swap partition will go to the other partitions and will be show in OS.

FYI this is old bug in web UI still not fixed :slight_smile:

BR,
Stefan

@tension183
Thanks a lot for replying to me about that. I was a bit surprised to see you still following this thread two years later :slight_smile:

Unfortunately, I tried your solution, but it didn’t seem to work for me. Maybe I misunderstood your instructions, but I recorded a short video demonstrating the issue.

I am not sure if you are still using version 2.6.0, or have upgraded to 3.0.0, but as far as I can tell, the workaround doesn’t seem to work in 3.0.0.

Hi @brian,

I am not following this thread disscourse send me notification when some one write to the threads where I am in. So I see the video can you try to create others partitions and the final one to be swap partition.

I am using MaaS version-2.9.6

BR,
Stefan

Hi @tension183,

Thanks for the suggestion. I made all my other partitions first (1GB /boot, 395GB /, remaining space swap), but unfortunately, I am getting the same results.

I tried leaving the swap partition unformatted and changing it to swap afterwards (just as I did in the video). I also tried setting the partition to swap upon creation, but that resulted in the same thing as well.

For further information, I did try deploying the machine to Centos 7 just to make sure its not a visual bug in the web ui, but yea, still no swap in the OS.

Hi @brian,
you can always try my first approach its working for me for two years adding swap in cloud-config file.

BR,
Stefan

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.