1

Topic: Unable to extend, SWAP filesystem shows as Unknown in GParted only

Hello!

I was trying to increase a drive this morning and came across something ive never seen before. In GParted, it is showing my swap part as "Unknown." Normally, it will show up as linux swap and I can increase the size on there and then move the swap to the end and then expand sda1, etc. However, since it is not recognizing the swap properly, I do not get an option to extend the swap in to the unallocated space.

Do any of yall have any ideas on this? The swap FS shows up properly in the CentOS box (ID: 82 Linux swap / Solaris) and the main FS is just an ID 83 regular linux FS. See below for full output. Also, I've attached a screenshot of the GParted screen.

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00069ccb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   134219775    67108864   83  Linux
/dev/sda2       134219776   135682047      731136   82  Linux swap / Solaris

http://imgur.com/a/hpsuy  <--- a link to the screenshot of what GParted was showing


Thank you guys in advance for your consideration! smile This is a production server so im a little hesitant to make any uncertain changes on it. Have a good day!

2

Re: Unable to extend, SWAP filesystem shows as Unknown in GParted only

In fact, there is no "swap filesystem", in the same manner as ext2/3/4 or FATxx etc. There is no data structure involving folders, files, file tables etc. It is just a disk space where the o.s. transfers pages of the memory when needed. You can find a description of the Linux swap management in this link, of you are interested more in detail.

You can easily recreate the swap partition in the new size after deleting it, using GParted, fdisk or other software. Please be sure to disable the swap before doing so.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: Unable to extend, SWAP filesystem shows as Unknown in GParted only

Oh, I see!!! The link you sent make sense but is hard for me to understand such detail on some of that. Regardless, I think I should be in good shape. Im going to remove the the "unknown" swap partition and then expand the drive. Ill make sure to leave a gig or so at the end and then just recreate the linux-swap once it completes the other resizing.  Does that sound about right? It seems there is really only one option for the swap and that's linux-swap.

Im going to test it on a clone of the machine and see if it works out properly. Thanks a ton for the assist! smile Most appreciated!

4 (edited by captnfluff 2017-03-22 00:48:55)

Re: Unable to extend, SWAP filesystem shows as Unknown in GParted only

class413 wrote:

...Please be sure to disable the swap before doing so.

Do I need to turn off swap if I am booting in to the GParted Live CD to extend the partition? I went through the program looking for a way to disable it but had no luck find it. I see stuff online that says to use "swapoff" but I don't see that as an option in the GParted Live CD anywhere... only CLI.  Im thinking that I am OK without turning it off im im going through the Live CD and do not have anything actually mounted. Am I right or wrongo?

Thanks!

EDIT: Ah -- since the original partition was shown as Unknown, it did not give me an option to disable or enable the swap. On the test system that I just ran through this on, now that I reset it back to linux-swap, it gives me the option to swapon/swapoff. I guess since there was no swap partition there was no way of disabling it.

5

Re: Unable to extend, SWAP filesystem shows as Unknown in GParted only

The GParted Live CD doesn't mount any partition, by default. In case you proceed from any installed distribution, you have to turn the swap off. It is easy to find the terminal commands in the web (swapoff, swapon). GParted doesn't modify mounted partitions.

It's right that you can use GParted to arrange the remaining partitions so that you make the free space for the new swap.

Concerning the swap format and related details, it's really very specific topic. I don't think you have to know about, unless you are involved in kernel development. Just remember that the "swap" content is copies of RAM segments, that can change all the time. There is no "permanent" data storage as in a system or data partition.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

6

Re: Unable to extend, SWAP filesystem shows as Unknown in GParted only

Awesome man -- thanks for the assist! I made the changes yesterday late afternoon and everything has been running smoothly since then.  Most appreciated! smile

7

Re: Unable to extend, SWAP filesystem shows as Unknown in GParted only

Glad to hear. smile
So, if the issue is fixed you can add [SOLVED] in the topic title by editing your starting post, to help other people looking for assistance in the same or similar problem.

*** It is highly recommended to backup any important files before doing resize/move operations. ***