- Top 6 Partition Managers (CLI + GUI) for Linux
- 1. Fdisk
- 2. GNU Parted
- 3. Gparted
- 4. GNOME Disks a.k.a ( GNOME Disks Utility)
- 5. KDE Partition Manager
- 6. Qtparted
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- The Best Way to Free Create Swap Partition in Linux [Partition Manager]
- Summary :
- Quick Navigation :
- What Is Swap Partition
- Why to Create Swap Partition
- How to Create a Linux Swap Partition
- ABOUT THE AUTHOR
- Partition manager linux swap
- Contents
- Swap space
- Swap partition
- Activation by systemd
- Disabling swap
- Swap file
- Manually
- Swap file creation
- Remove swap file
- Automated
- zram-generator
- systemd-swap
- Swap encryption
- Performance
- Swappiness
- VFS cache pressure
- Priority
- Using zswap or zram
- Striping
Top 6 Partition Managers (CLI + GUI) for Linux
Are you looking to tweak or manage your disks partitions in Linux? In this article, we will review some of the best tools that help Linux users partition and manage their disks. We will see both command line utilities as well as GUI applications for managing disk partitions in Linux.
I favor the command line over GUI (graphical user interface), I will start by describing the text based utilities and then GUI applications as follows.
1. Fdisk
fdisk is a powerful and popular command line tool used for creating and manipulating disk partition tables. It supports multiple partition tables formats, including MS-DOS and GPT. It provides a user-friendly, text based and menu driven interface to display, create, resize, delete, modify, copy and move partitions on disks.
Fdisk Partition Tool
2. GNU Parted
Parted is a popular command line tool for managing hard disk partitions. It supports multiple partition table formats, including MS-DOS, GPT, BSD and many more. With it, you can add, delete, shrink and extend disk partitions along with the file systems located on them.
Parted Partition Program
It can help you create space for installing new operating systems, reorganizing disk usage, and move data to new hard disks.
3. Gparted
GParted is a free, cross platform and advanced graphical disk partition manager that works on Linux operating systems, Mac OS X and Windows.
GParted Partition Manager and Editor
It is used to resize, copy, move, label, check or delete partitions without data loss, enabling you to grow or shrink root partition, create space for new operating systems and attempt data rescue from lost partitions. It can be used to manipulate file systems including EXT2/3/4.
4. GNOME Disks a.k.a ( GNOME Disks Utility)
GNOME Disks is a core system utility used for disk partition management and S.M.A.R.T monitoring. It is used to format and create partition on drives, mount and unmount partitions. It ships in with the well known GNOME desktop environment.
Gnome Disks
Lately, it’s been gaining features for advanced usage. The latest version (at the time of this writing) has a new feature for adding, resizing partitions, checking filesystems for any damages and repairing them.
5. KDE Partition Manager
KDE partition manager is a useful graphical utility for managing disk devices, partitions and file systems on your computer. It comes with the KDE desktop environment.
KDE Partition Manager
Most of its underlying work is performed by programs. It can be used to easily create, copy, move, delete, resize without losing data, backup and restore partitions. It supports various including EXT2/3/4, BTRFS NTFS, FAT16/32, XFS, and more.
6. Qtparted
In addition, you can also use Qtparted, is a Partition Magic (proprietary software for Windows) clone and Qt front-end to GNU Parted. Note that it still in development and you may likely experience any kind of problem with latest release. In that case try to use the CVS version or a previous stable version.
QTParted Partition Magic
It may not be one of the best options now but you can give it a try. More features are yet being added to it.
You might also like to read these following related articles.
These are the best partition managers and editors available for Linux operating systems. Which tool do you use? Let us know via the comment section below. Also let us know of any other partition managers for Linux, missing in the list above.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
The Best Way to Free Create Swap Partition in Linux [Partition Manager]
By Rodin | Follow | Last Updated January 22, 2021
Summary :
A Swap partition is very useful when your Linux is running out of memory. Here MiniTool tells you what a Swap partition is and how to create a Swap partition.
Quick Navigation :
What Is Swap Partition
As you know, swap partition is an important part of Linux. When installing Linux system, you may need to add a swap partition to your Linux. So, what is Swap Partition?
In fact, Linux Swap partition refers to the virtual memory partition under Linux. When physical memory of the system is not enough, the Swap partition can release a part of the hard disk space so that the current running programs can use it. The disk space which is released may come from some procedures that are not used for a long time, and the released disk space is temporarily saved to the swap partition.
When running those procedures, it allows to recover data that is saved to memory from a Swap partition. In other words, when the operating system needs data from the disk, Swap partition exchanges a part of data in main memory with a portion of data on the disk. The virtual memory technique breaks the limitation of physical memory in function, and it enables a computer to execute programs and manipulate data larger than the actual physical memory space. What’s more, it can ensure that each process is not affected by other program.
In Swap partition size, if Swap space is too large, disk space will be wasted, and if Swap space is too small, then the system may go wrong. Therefore, it is recommended to be 2 times larger than the physical memory. In Linux, it is limited to be at most 2 GB.
Why to Create Swap Partition
The above content introduce some important information about Swap partition, and now you may ask why to create a swap partition in Linux. Swap partition has three main advantages:
- It can leave some disk space when the computer memory is filled up completely.
- It can move some rarely-needed application and files away from the memory.
- It allows you to hibernate system. If there is no Swap partition, the computer is impossible to hibernate.
- The Swap partition can improve the performance of computer to some degrees.
Due to those merits, Swap partition is really useful and important in Linux. After installing system, you may want to create Linux partition. Here look at an example from forums.linuxmint:
«I just installed Linux mint 11 yesterday to solve my graphics chipset problem. But I forgot to create a swap partition. So my question is how can I create swap partition without reinstalling Linux mint? Also I have 4 GB ram on my laptop and I don’t use hibernation function on my laptop so do I really need swap? The space I reserved for swap partition is 4 GB & it is shown as unusable space in partition s/w. Thanks in advance.»
When encountering such a case, how to create a Swap partition? Don’t worry. Please read on and you can get a very easy way to achieve this aim.
How to Create a Linux Swap Partition
When searching «create Swap partition» in Google, you can find some methods, but it seems that some ways are a little complex. Fortunately, here is a very simple way introduced to you, that is to using a third-party partition and disk management software.
Thereinto, MiniTool Partition Wizard Free Edition is popular in managing Linux partition and disk for free. And it makes these Linux partitions intuitive on your computers so you can do Linux partition management easily. As a reliable and professional Swap partition manager, it can be used to copy partition, change partition type ID, do surface test, wipe partition and create partition.
Here are the steps about creating a Linux Swap partition.
Firstly you need to free download MiniTool Partition Wizard Free Edition and install it to your computer. Then launch this application to its main interface to do partition creation.
Step 1: Right click the unallocated space and select «Create» or click «Create Partition» from the left «Operations» menu after selecting the target unallocated space.
Step 2: Then you can select «Linux Swap» from the «File System» drop-down menu. Here you can set partition logical or primary and also set partition label. Moreover, during the process, you can change partition size. Here please set partition size as 4 GB by dragging the partition bar or by inputting 4096 in the «Partition Size» textbox.
Step 3: At last, click «Apply» to execute all operations.
In conclusion, with the assistance of MiniTool Partition Wizard Free Edition, you can create Swap partition quickly and easily. Just only with three steps, you are able to achieve your aim. Please try this freeware at once.
ABOUT THE AUTHOR
Position: Columnist
Rodin is an enthusiastic IT writer focusing on Windows trends, disk partition management and data recovery. She loves to write and share her idea about the useful tips and tricks on personal computers’ maintenance.
If you are looking for methods to improve your computer performance, manage hard drives and recover data from different devices, Rodin can provide reliable solutions for data management.
Источник
Partition manager linux swap
This page provides an introduction to swap space and paging on GNU/Linux. It covers creation and activation of swap partitions and swap files.
Linux divides its physical RAM (random access memory) into chunks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.
Support for swap is provided by the Linux kernel and user-space utilities from the util-linux package.
Contents
Swap space
Swap space can take the form of a disk partition or a file. Users may create a swap space during installation or at any later time as desired. Swap space can be used for two purposes, to extend the virtual memory beyond the installed physical memory (RAM), and also for suspend-to-disk support.
If it is beneficial to extend the virtual memory with swap depends on the amount of installed physical memory. If the amount of physical memory is less than the amount of memory required to run all the desired programs, then it may be beneficial to enable swap. This avoids out of memory conditions, where the Linux kernel OOM killer mechanism will automatically attempt to free up memory by killing processes. To increase the amount of virtual memory to the required amount, add the necessary difference (or more) as swap space.
The biggest drawback of enabling swap is its lower performance, see section #Performance. Hence, enabling swap is a matter of personal preference: some prefer programs to be killed over enabling swap and others prefer enabling swap and slower system when the physical memory is exhausted.
To check swap status, use:
Or to show physical memory as well as swap usage:
Swap partition
The factual accuracy of this article or section is disputed.
A swap partition can be created with most GNU/Linux partitioning tools. Swap partitions are typically designated as type 82 . Even though it is possible to use any partition type as swap, it is recommended to use type 82 in most cases since systemd will automatically detect it and mount it (see below).
To set up a partition as Linux swap area, the mkswap(8) command is used. For example:
To enable the device for paging:
To enable this swap partition on boot, add an entry to /etc/fstab :
where the device_UUID is the UUID of the swap space.
See fstab for the file syntax.
Activation by systemd
systemd activates swap partitions based on two different mechanisms. Both are executables in /usr/lib/systemd/system-generators . The generators are run on start-up and create native systemd units for mounts. The first, systemd-fstab-generator , reads the fstab to generate units, including a unit for swap. The second, systemd-gpt-auto-generator inspects the root disk to generate units. It operates on GPT disks only, and can identify swap partitions by their type GUID, see systemd#GPT partition automounting for more information.
Disabling swap
To deactivate specific swap space:
Alternatively use the -a switch to deactivate all swap space.
Since swap is managed by systemd, it will be activated again on the next system startup. To disable the automatic activation of detected swap space permanently, run systemctl —type swap to find the responsible .swap unit and mask it.
Swap file
As an alternative to creating an entire partition, a swap file offers the ability to vary its size on-the-fly, and is more easily removed altogether. This may be especially desirable if disk space is at a premium (e.g. a modestly-sized SSD).
Manually
Swap file creation
Use dd to create a swap file the size of your choosing. For example, creating a 512 MiB swap file:
Set the right permissions (a world-readable swap file is a huge local vulnerability):
After creating the correctly sized file, format it to swap:
Activate the swap file:
Finally, edit the fstab configuration to add an entry for the swap file:
For additional information, see fstab#Usage.
Remove swap file
To remove a swap file, it must be turned off first and then can be removed:
Finally remove the relevant entry from /etc/fstab .
Automated
zram-generator
The aim of this tool is the creation of zram devices. It is written in Rust and resides in systemd’s GitHub. It can be installed with the zram-generator package. Configuration is straightforward and explained in the README.
systemd-swap
systemd-swap is a script for creating hybrid swap space from zram swaps, swap files and swap partitions. It is not affiliated with the systemd project.
Install the systemd-swap package. Uncomment and set swapfc_enabled=1 in the Swap File Chunked section of /etc/systemd/swap.conf . Start/enable the systemd-swap service.
Visit the authors GitHub page for more information and setting up the recommended configuration.
Swap encryption
Performance
Swap operations are usually significantly slower than directly accessing data in RAM. Disabling swap entirely to improve performance can sometimes lead to a degradation, since it decreases the memory available for VFS caches, causing more frequent and costly disk I/O.
Swap values can be adjusted to help performance:
Swappiness
The swappiness sysctl parameter represents the kernel’s preference (or avoidance) of swap space. Swappiness can have a value between 0 and 200 (max 100 if Linux /sys/fs/cgroup/memory/memory.swappiness or /proc/sys/vm/swappiness can be read in order to obtain the raw integer value.
To temporarily set the swappiness value:
To set the swappiness value permanently, create a sysctl.d(5) configuration file. For example:
To test and more on why this may work, take a look at this article.
VFS cache pressure
Another sysctl parameter that affects swap performance is vm.vfs_cache_pressure , which controls the tendency of the kernel to reclaim the memory which is used for caching of VFS caches, versus pagecache and swap. Increasing this value increases the rate at which VFS caches are reclaimed[1]. For more information, see the Linux kernel documentation.
Priority
If you have more than one swap file or swap partition you should consider assigning a priority value (0 to 32767) for each swap area. The system will use swap areas of higher priority before using swap areas of lower priority. For example, if you have a faster disk ( /dev/sda ) and a slower disk ( /dev/sdb ), assign a higher priority to the swap area located on the fastest device. Priorities can be assigned in fstab via the pri parameter:
Or via the —priority parameter of swapon:
If two or more areas have the same priority, and it is the highest priority available, pages are allocated on a round-robin basis between them.
Using zswap or zram
Zswap is a Linux kernel feature providing a compressed write-back cache for swapped pages. This increases the performance and decreases the IO-Operations. ZRAM creates a virtual compressed Swap-file in memory as alternative to a swapfile on disk.
Striping
There is no necessity to use RAID for swap performance reasons. The kernel itself can stripe swapping on several devices, if you just give them the same priority in the /etc/fstab file. Refer to The Software-RAID HOWTO for details.
Источник