Disable Swap and Regain Storage Space on Linux
Hello Post4VPS Community
A few days ago I won the brand new VPS 16 in the December VPS giveaway. Due to lack of time because of my real life job I have only been able to do the basic setup of my new server. One of the first things I did was to upgrade Debian 9 to Debian 10 about which you can read here. After that I did a bit of security tweaking and as the last step so far I did what the subject of this thread is about.
VPS 16 comes with a big 200 GB storage space and KVM as its virtualization. I noticed that a big chunk was missing. What was using it? Well, it was Swap. With 12 GB of RAM the amount of automatic configured Swap was also set to 12 GB during the setup (out of my control!). With proper virtualization Swap is generated by using the disk space like on a real machine. 12 GB by todays standards is a decent amount of RAM and at this point Swap can be disabled to actually better utilize the amount of RAM instead of swapping to a disk *. The goal of this tutorial is to teach you how can disable unwanted Swap space and regain the disk space that it used as normal storage space for your system partition or any other partition.
* You could argue about whether to disable Swap or not. I will not at this point. I'm not going running anything that will fully utilize all 12 GB of RAM. Hence why I don't need any Swap. So keep in mind that you should question yourself and whether you really need Swap or not. Don't make the rash judgement that you don't "need" swap. Think about it. I have done this and made my decision and this is why I'm posting this tutorial.
Requirements
For the purpose of this tutorial I used a Debian "Buster" 10 Hyper-V VM hosted on my computer with a 25 GB VHD, 4 GB RAM (thus also 4 GB Swap) and 2 CPU cores.
Warning: You are doing this at your own risk! I highly recommend to take backups of your system before trying this on any production ready system. Try this on several test systems until you can do it blind (basically at the point where you no longer have to read this or any other guide). And even after that carefully plan any maintenance when you want to do this on a production ready server. I'm NOT responsible for data loss, failed systems or other issues caused/related by or to this procedure.
Let's get started!
Step 1
Login into your server as root or with a user that has administrative access through sudo. Create backups if needed and check if you meet all requirements (is cfdisk available? etc...). Keep your system up to date and fix requirements if necessary.
Step 2
Figure out the disk on which the Swap partition is located by using the command "fdisk -l" in administrative context (without administrative context fdisk won't work properly). The Swap partition will basically be easy to detect as its filesystem/type is usually always "Linux Swap".
Screenshot:
![[Image: UmkeF9e.png]](https://i.imgur.com/UmkeF9e.png)
As you can see the Swap partition is located on the /dev/sda3 partition and has a size of 4 GB. In my case as describe before this Swap has been created by the Debian 10 installer through the guided partition installation process.
Write down the following information somewhere: device name (/dev/sda3) and partition size (4G
of the Swap partition to have this info on quick access in the next step.
Step 3
The next necessary step is to disable Swap and verify that it is disabled. To disable Swap run the following command in administrative context:
Command: swapoff -a
Screenshot
![[Image: 5cEZMjz.png]](https://i.imgur.com/5cEZMjz.png)
Check whether Swap has really been disable with the "free -h" command. The Swap value should be 0.
Screenshot
![[Image: qD0m6Ie.png]](https://i.imgur.com/qD0m6Ie.png)
As you can see Swap is now disabled. However this is only temporary! Swap is a partition and thus it gets mounted everytime your server starts. In the next step we will disable it permanently by preventing the mounting of the Swap partition.
Step 4
To prevent the mount process of the Swap partition you have to modify the fstab file where all automatic mount points are configured. In order to do so you simply have to open fstab with a text editor like nano, vi or vim. Remember to do this within administrative context.
Screenshot
![[Image: 1DHK9q7.png]](https://i.imgur.com/1DHK9q7.png)
Once the file is open you have to identify the configuration line at which the Swap partition is mounted. It is also fairly easy to identify the Swap partition as its declared type is "swap". You might also see a comment that tells you which partition is the Swap partition.
Screenshot
![[Image: VNZP0od.png]](https://i.imgur.com/VNZP0od.png)
Move the cursor to the beginning of this line and add a hashtag at the beginning to comment this line. By commenting this line you disable the mount of the Swap partition because comments are simply ignored and not executed.
Screenshot
![[Image: vltYHKw.png]](https://i.imgur.com/vltYHKw.png)
Save the file and close the text editor. You can verify whether what you've done is working by rebooting your server. After the reboot there should be no Swap when running the "free -h" command. Everything good so far? Great. Let's continue.
Step 5
Now it's time to delete the disabled Swap partition with the command line tool to manage disks and partitions called "cfdisk". Start cfdisk in administrative context and specify the drive you want to edit. The drive you want to edit is the device name from step two without the partition number. In this case it's simply "/dev/sda".
You would open this drive in cfdisk with this command: cfdisk /dev/sda.
Screenshot
![[Image: fkIaO6g.png]](https://i.imgur.com/fkIaO6g.png)
Now select the Swap partition by using the up/down arrows. After that select "DELETE" at the bottom by using the left/right arrows. Press ENTER and type in yes to confirm. The partition will be deleted and you will see free space available at the point where the partition was.
Screenshots
![[Image: k1KXkTu.png]](https://i.imgur.com/k1KXkTu.png)
![[Image: bBJZP5B.png]](https://i.imgur.com/bBJZP5B.png)
The Swap partition is gone now.
Step 6
At this point you are ready to expand your system partition or a different partition. Select your desired partition (I will select /dev/sda2 which is my system partition). Select the "Resize" option at the bottom and hit ENTER. Set the desired size (hint: if you leave it as shown it will simply add the free space to the selected partition) and hit ENTER again.
Screenshots
![[Image: zkzAj3j.png]](https://i.imgur.com/zkzAj3j.png)
![[Image: sqpXFeJ.png]](https://i.imgur.com/sqpXFeJ.png)
Now you see that the selected partition has grown and there is no more available free space on the disk.
To finalize this change you have to select "Write" at the bottom options and hit ENTER. This will actually write all changes to the disk that you have performed! If asked confirm that you want to write the changes by writing yes. After that exit cfdisk by selecting "Quit" and hitting ENTER again.
Screenshot
![[Image: uzW894s.png]](https://i.imgur.com/uzW894s.png)
Step 7
If you run "fdisk -l" again now you will see the change. The Swap partition will be gone and the system partition or your desired partition will be bigger than before by the amount of free space that you got from removing the Swap space.
Execute the "df -h" command and you will notice that the root partition / is still at the old size. The reason for this is that the filesystem inside the partition has not been resized, yet. You can resize the filesystem to use all its space with the "resize2fs" command and the device name of the partition.
Command: resize2fs /dev/sda2
Screenshot
![[Image: UZHrVpr.png]](https://i.imgur.com/UZHrVpr.png)
Run "df -h" again and you will see that the filesystem is now bigger.
Screenshot
![[Image: t7WHJZn.png]](https://i.imgur.com/t7WHJZn.png)
That's all of it and about it. The Swap is gone and you have regained its disk space as storage space of your desired partition. The goal of this tutorial has been achieved. If you have any questions or need help feel free to post below.
I would like to thank everyone for taking their time and reading this tutorial. Hopefully you can make use of it, learn new things and adopt your new knowledge for further projects and advancements in your journey through the server world and Linux
.
P.S.: Sorry for the screenshot format. I just used the Windows snipping tool and only it. The only useful feature to highlight things was the text marker which is kind of hard to use with a mouse. I didn't have much time to fiddle around with Paint.NET. I basically used my only free time (the evening) to write this guide including installing Hyper-V and creating the Debian 10 VM. Also I can't post more than 10 images.
A few days ago I won the brand new VPS 16 in the December VPS giveaway. Due to lack of time because of my real life job I have only been able to do the basic setup of my new server. One of the first things I did was to upgrade Debian 9 to Debian 10 about which you can read here. After that I did a bit of security tweaking and as the last step so far I did what the subject of this thread is about.
VPS 16 comes with a big 200 GB storage space and KVM as its virtualization. I noticed that a big chunk was missing. What was using it? Well, it was Swap. With 12 GB of RAM the amount of automatic configured Swap was also set to 12 GB during the setup (out of my control!). With proper virtualization Swap is generated by using the disk space like on a real machine. 12 GB by todays standards is a decent amount of RAM and at this point Swap can be disabled to actually better utilize the amount of RAM instead of swapping to a disk *. The goal of this tutorial is to teach you how can disable unwanted Swap space and regain the disk space that it used as normal storage space for your system partition or any other partition.
* You could argue about whether to disable Swap or not. I will not at this point. I'm not going running anything that will fully utilize all 12 GB of RAM. Hence why I don't need any Swap. So keep in mind that you should question yourself and whether you really need Swap or not. Don't make the rash judgement that you don't "need" swap. Think about it. I have done this and made my decision and this is why I'm posting this tutorial.
Requirements
- A server with Linux on it
- root access or other administrative access (sudo)
- cfdisk disk and partition management software
- basic Linux knowledge
For the purpose of this tutorial I used a Debian "Buster" 10 Hyper-V VM hosted on my computer with a 25 GB VHD, 4 GB RAM (thus also 4 GB Swap) and 2 CPU cores.
Warning: You are doing this at your own risk! I highly recommend to take backups of your system before trying this on any production ready system. Try this on several test systems until you can do it blind (basically at the point where you no longer have to read this or any other guide). And even after that carefully plan any maintenance when you want to do this on a production ready server. I'm NOT responsible for data loss, failed systems or other issues caused/related by or to this procedure.
Let's get started!
Step 1
Login into your server as root or with a user that has administrative access through sudo. Create backups if needed and check if you meet all requirements (is cfdisk available? etc...). Keep your system up to date and fix requirements if necessary.
Step 2
Figure out the disk on which the Swap partition is located by using the command "fdisk -l" in administrative context (without administrative context fdisk won't work properly). The Swap partition will basically be easy to detect as its filesystem/type is usually always "Linux Swap".
Screenshot:
![[Image: UmkeF9e.png]](https://i.imgur.com/UmkeF9e.png)
As you can see the Swap partition is located on the /dev/sda3 partition and has a size of 4 GB. In my case as describe before this Swap has been created by the Debian 10 installer through the guided partition installation process.
Write down the following information somewhere: device name (/dev/sda3) and partition size (4G
of the Swap partition to have this info on quick access in the next step.Step 3
The next necessary step is to disable Swap and verify that it is disabled. To disable Swap run the following command in administrative context:
Command: swapoff -a
Screenshot
![[Image: 5cEZMjz.png]](https://i.imgur.com/5cEZMjz.png)
Check whether Swap has really been disable with the "free -h" command. The Swap value should be 0.
Screenshot
![[Image: qD0m6Ie.png]](https://i.imgur.com/qD0m6Ie.png)
As you can see Swap is now disabled. However this is only temporary! Swap is a partition and thus it gets mounted everytime your server starts. In the next step we will disable it permanently by preventing the mounting of the Swap partition.
Step 4
To prevent the mount process of the Swap partition you have to modify the fstab file where all automatic mount points are configured. In order to do so you simply have to open fstab with a text editor like nano, vi or vim. Remember to do this within administrative context.
Screenshot
![[Image: 1DHK9q7.png]](https://i.imgur.com/1DHK9q7.png)
Once the file is open you have to identify the configuration line at which the Swap partition is mounted. It is also fairly easy to identify the Swap partition as its declared type is "swap". You might also see a comment that tells you which partition is the Swap partition.
Screenshot
![[Image: VNZP0od.png]](https://i.imgur.com/VNZP0od.png)
Move the cursor to the beginning of this line and add a hashtag at the beginning to comment this line. By commenting this line you disable the mount of the Swap partition because comments are simply ignored and not executed.
Screenshot
![[Image: vltYHKw.png]](https://i.imgur.com/vltYHKw.png)
Save the file and close the text editor. You can verify whether what you've done is working by rebooting your server. After the reboot there should be no Swap when running the "free -h" command. Everything good so far? Great. Let's continue.
Step 5
Now it's time to delete the disabled Swap partition with the command line tool to manage disks and partitions called "cfdisk". Start cfdisk in administrative context and specify the drive you want to edit. The drive you want to edit is the device name from step two without the partition number. In this case it's simply "/dev/sda".
You would open this drive in cfdisk with this command: cfdisk /dev/sda.
Screenshot
![[Image: fkIaO6g.png]](https://i.imgur.com/fkIaO6g.png)
Now select the Swap partition by using the up/down arrows. After that select "DELETE" at the bottom by using the left/right arrows. Press ENTER and type in yes to confirm. The partition will be deleted and you will see free space available at the point where the partition was.
Screenshots
![[Image: k1KXkTu.png]](https://i.imgur.com/k1KXkTu.png)
![[Image: bBJZP5B.png]](https://i.imgur.com/bBJZP5B.png)
The Swap partition is gone now.
Step 6
At this point you are ready to expand your system partition or a different partition. Select your desired partition (I will select /dev/sda2 which is my system partition). Select the "Resize" option at the bottom and hit ENTER. Set the desired size (hint: if you leave it as shown it will simply add the free space to the selected partition) and hit ENTER again.
Screenshots
![[Image: zkzAj3j.png]](https://i.imgur.com/zkzAj3j.png)
![[Image: sqpXFeJ.png]](https://i.imgur.com/sqpXFeJ.png)
Now you see that the selected partition has grown and there is no more available free space on the disk.
To finalize this change you have to select "Write" at the bottom options and hit ENTER. This will actually write all changes to the disk that you have performed! If asked confirm that you want to write the changes by writing yes. After that exit cfdisk by selecting "Quit" and hitting ENTER again.
Screenshot
![[Image: uzW894s.png]](https://i.imgur.com/uzW894s.png)
Step 7
If you run "fdisk -l" again now you will see the change. The Swap partition will be gone and the system partition or your desired partition will be bigger than before by the amount of free space that you got from removing the Swap space.
Execute the "df -h" command and you will notice that the root partition / is still at the old size. The reason for this is that the filesystem inside the partition has not been resized, yet. You can resize the filesystem to use all its space with the "resize2fs" command and the device name of the partition.
Command: resize2fs /dev/sda2
Screenshot
![[Image: UZHrVpr.png]](https://i.imgur.com/UZHrVpr.png)
Run "df -h" again and you will see that the filesystem is now bigger.
Screenshot
![[Image: t7WHJZn.png]](https://i.imgur.com/t7WHJZn.png)
That's all of it and about it. The Swap is gone and you have regained its disk space as storage space of your desired partition. The goal of this tutorial has been achieved. If you have any questions or need help feel free to post below.
I would like to thank everyone for taking their time and reading this tutorial. Hopefully you can make use of it, learn new things and adopt your new knowledge for further projects and advancements in your journey through the server world and Linux
.P.S.: Sorry for the screenshot format. I just used the Windows snipping tool and only it. The only useful feature to highlight things was the text marker which is kind of hard to use with a mouse. I didn't have much time to fiddle around with Paint.NET. I basically used my only free time (the evening) to write this guide including installing Hyper-V and creating the Debian 10 VM. Also I can't post more than 10 images.
You can use this guide to learn how to generally modify partitions using cfdisk. This can and should be a part of your basic knowledge to manage servers using CLI tools.
Hello Everyone,
I am looking for a music app for my iphone. i cant find one that is not buggy or full with annoying ads. i just want a simple app that i can listen to it (i do not care about the ads. but not every 5 seconds i will see one.) and by the way, do you know an app that can download for me posts on instagram? thanks for whoever replying to me
I am looking for a music app for my iphone. i cant find one that is not buggy or full with annoying ads. i just want a simple app that i can listen to it (i do not care about the ads. but not every 5 seconds i will see one.) and by the way, do you know an app that can download for me posts on instagram? thanks for whoever replying to me
Hello everyone,
today i would like to ask you a question, what is the best game you ever played? im talking about game experience like story mode interesting or fun multiplayer or any category you like. im soon going be a lot more active then now and i want some new games to play on. i am more fan of survival and multiplayer games. but i have played any game i know. so i want to get some suggestions and ask you guys, what is the best game you ever played and why you recommend it to me?
today i would like to ask you a question, what is the best game you ever played? im talking about game experience like story mode interesting or fun multiplayer or any category you like. im soon going be a lot more active then now and i want some new games to play on. i am more fan of survival and multiplayer games. but i have played any game i know. so i want to get some suggestions and ask you guys, what is the best game you ever played and why you recommend it to me?
Posted by: Sn1F3rt - 12-10-2019, 10:05 AM - Forum: VPS Support
- No Replies
Hello guys,
So this is my troubleshooting thread for the new KVM upgraded VPS 9 (CentOS users), for the users who hold these VPSes and might need help. I'll be posting the problems as well as fixes in this thread itself.
So this is the first one - Package Download Error.
When you're downloading any package you're likely to face this error. It'll say something like:
Thus it'll basically deny all the mirrors for the file, although that'll work perfectly alright when you type that into your browser. The problem is that the nameservers are missing in /etc/resolv.conf
So here's the fix for this -
And that's all. You should now be able to install any package without hassle. Hope this works for you. I'll be posting further problems and sharing the solutions, not only for the VPS 9 CentOS users, but also for others who might find it helpful.
Regards,
So this is my troubleshooting thread for the new KVM upgraded VPS 9 (CentOS users), for the users who hold these VPSes and might need help. I'll be posting the problems as well as fixes in this thread itself.
So this is the first one - Package Download Error.
When you're downloading any package you're likely to face this error. It'll say something like:
Code:
[font=monospace][root@sohamb03 ~]# yum install wget[/font]
[font=monospace]Downloading packages:[/font]
[font=monospace]Delta RPMs disabled because /usr/bin/applydeltarpm not installed.[/font]
[font=monospace]wget-1.14-10.el7_0.1.x86_64.rp FAILED[/font]
[font=monospace]http://repo.dimenoc.com/pub/centos/7.1.1503/os/x86_64/Packages/wget-1.14-10.el7_0.1.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.dimenoc.com; Unknown error"[/font]
[font=monospace]Trying other mirror.[/font]Thus it'll basically deny all the mirrors for the file, although that'll work perfectly alright when you type that into your browser. The problem is that the nameservers are missing in /etc/resolv.conf
So here's the fix for this -
- Get into the file causing the trouble. Code:
vi /etc/resolv.conf - Press the 'Insert' key and insert this line anywhere in the file. Code:
nameserver 8.8.8.8 - Press the 'Esc' key and then type in ':wq' to save the file.
- After saving the file, restart the network. Code:
systemctl restart network
And that's all. You should now be able to install any package without hassle. Hope this works for you. I'll be posting further problems and sharing the solutions, not only for the VPS 9 CentOS users, but also for others who might find it helpful.

Regards,
OK, so I've now fired up my VPS 9 Phoenix again. I thought I'd be smart and go for an older version of CentOS - CentOS 6.5. And guess what, I couldn't get access to the network with SSH with CentOS 6.5. I then re-installed CentOS 7 and I was able to get access to the network again. So guess Virmach has the upgraded VPS 9 Phoenix configured in such a way that it can't work with CentOS 6.5. Or who knows, maybe it was a fluke.
OK - we're now ready to disable SELinux. But before I do it I'd like to understand why I need to do it and what the consequences are going to be for the VPS.
Like why is it not needed in the case of VPS 9 Seattle, which as we know was one of the first VPSs to go through the Virmach KVM upgrade process. Like what happened in the later upgrades to cause the need for disabling SELinux?
Also, if disabled, exactly what will the consequences be for the VPS?
I tried to Google this, but can't completely wrap my brain cells around it. What I do understand now is that SELinux stands for security enhanced Linux. So immediately when it is disabled, the VPS has less protection than before it was enabled. So why would Virmach recommend this on a massive scale for all of the upgraded VPSs? Like we can't use Ubuntu, basically we are limited to CentOS, and now it would seem a CentOS that doesn't come with the protection that it has been designed for with SELinux?
Also, it would be nice if someone could create a simplified fool-proof tutorial for disabling SELinux that all of the VPS 9 users with issues can use. The tutorial below is what I sourced with Google, but I'd like our experts here to have a look at it before I start down this road.
First challenge I may have is that when I last used my VPS Phoenix after the KVM upgrade - loaded with CentOS 7.0, it had yum issues. Should I ignore all of that first, and then just go straight in disabling SELinux as follows?
It should come with an output like this one:
There is a temporary and permanent way that SELinux can be disabled. Which is the better one - temporary or permanent?
Temporary Disabling of SELinux
Permanent Disabling of SELinux
Change SELINUX to disabled. Output should be:
Save the file and reboot with:
Then check the status of SELinux again:
Output should then look like this:
OK now if the above is successful, what should our next steps be to get CentOS 7.0 to operate perfectly? I.e. to take care of all of the shortcomings that caused the need for SELinux to be disabled in the first place?
OK - we're now ready to disable SELinux. But before I do it I'd like to understand why I need to do it and what the consequences are going to be for the VPS.
Like why is it not needed in the case of VPS 9 Seattle, which as we know was one of the first VPSs to go through the Virmach KVM upgrade process. Like what happened in the later upgrades to cause the need for disabling SELinux?
Also, if disabled, exactly what will the consequences be for the VPS?
I tried to Google this, but can't completely wrap my brain cells around it. What I do understand now is that SELinux stands for security enhanced Linux. So immediately when it is disabled, the VPS has less protection than before it was enabled. So why would Virmach recommend this on a massive scale for all of the upgraded VPSs? Like we can't use Ubuntu, basically we are limited to CentOS, and now it would seem a CentOS that doesn't come with the protection that it has been designed for with SELinux?
Also, it would be nice if someone could create a simplified fool-proof tutorial for disabling SELinux that all of the VPS 9 users with issues can use. The tutorial below is what I sourced with Google, but I'd like our experts here to have a look at it before I start down this road.
First challenge I may have is that when I last used my VPS Phoenix after the KVM upgrade - loaded with CentOS 7.0, it had yum issues. Should I ignore all of that first, and then just go straight in disabling SELinux as follows?
Code:
sestatusIt should come with an output like this one:
Code:
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31There is a temporary and permanent way that SELinux can be disabled. Which is the better one - temporary or permanent?
Temporary Disabling of SELinux
Code:
setenforce 0Permanent Disabling of SELinux
Code:
/etc/selinux/configChange SELINUX to disabled. Output should be:
Code:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targetedSave the file and reboot with:
Code:
shutdown -r nowThen check the status of SELinux again:
Code:
sestatusOutput should then look like this:
Code:
SELinux status: disabledOK now if the above is successful, what should our next steps be to get CentOS 7.0 to operate perfectly? I.e. to take care of all of the shortcomings that caused the need for SELinux to be disabled in the first place?
hi,
i don't think i have asked this before. I am looking for an Android app that will let me scan for say 3g/2g/4g cell signals and list them with all the relevant info, like dB strength etc.
i could scan from manual network selection. but that doesn't show network strength. So an app with graphing or logging would be nicer.
It will be good for logging, availability research etc.
i don't mind if it requires root permission.
please post below if you know any such app.
thanks
i don't think i have asked this before. I am looking for an Android app that will let me scan for say 3g/2g/4g cell signals and list them with all the relevant info, like dB strength etc.
i could scan from manual network selection. but that doesn't show network strength. So an app with graphing or logging would be nicer.
It will be good for logging, availability research etc.
i don't mind if it requires root permission.
please post below if you know any such app.
thanks
@"Hidden Refuge"
Following your remedy for fixing VPS 18 CentOS 7 Selinux issues, I can't help but wonder whether my VPS 9 issues after the upgrade to KVM are the same?
If you check the suggestion by Virmach, they ask one to disable Selinux (after the upgrade) for CentOS. I was unaware it was for CentOS 7 specifically, but that was the OS I had loaded anyway. I had to reload it 5 times while I was trying to change the port number, but got kicked out time and time again. Yum also didn't look as though it loaded properly.
Following your remedy for fixing VPS 18 CentOS 7 Selinux issues, I can't help but wonder whether my VPS 9 issues after the upgrade to KVM are the same?
If you check the suggestion by Virmach, they ask one to disable Selinux (after the upgrade) for CentOS. I was unaware it was for CentOS 7 specifically, but that was the OS I had loaded anyway. I had to reload it 5 times while I was trying to change the port number, but got kicked out time and time again. Yum also didn't look as though it loaded properly.
Virmach Upgrade to KVM Admin Wrote:For CentOS, please check to ensure SELinux is disabled. Check out this guide here. This should fix any issues you are having with polkit service as well as others.
https://access.redhat.com/documentation/...ng_selinux
Check your firewall rules. For example, there may be new rules set blocking port 80/443. Here is a good guide.
https://wiki.centos.org/HowTos/Network/IPTables
Attempt to start all your packages. For example, if your website is not working, ensure you attempt to start apache/nginx, MySQL, PHP, and any other related services. For most services, the command would be systemctl start or /etc/init.d/ start where is the service name. If there are any errors, it will usually be because of an incompatibility and you can install or update the appropriate services or contact us for assistance. If you contact us, please let us know exactly the services you are running and their configuration.
For web panels, first make sure you disable SELinux as instructed above. Then, check iptables as instructed above. cPanel needs /usr/local/cpanel/scripts/upcp to be ran afterward. For other panels we are investigating, but there is an issue with /etc/init.d files missing. Please restore this from your own backups or contact us to copy it over for you.
Hi, Finally get settle little bit in life Alhamdulillah (Thank God) These days mostly i'm active at night time which i think good for P4V at this time any other P4V staff ain't online.
I don't have words to say, So yeah i'm back. I'll be active and try to get active as i used to be.
I don't have words to say, So yeah i'm back. I'll be active and try to get active as i used to be.
Hello Post4VPS Community
I would like to share the follow account of experience and a brief guide about how to upgrade Debian 9 to Debian 10 in a few easy steps. First I'd like to explain why I'm posting this. I have been taking part in the December giveaway and won a VPS. In my applicaton I requested the OS Debian 10 to be installed on the VPS and noted that Debian 9 can be installed if Debian 10 is not available. So it looks like Debian 10 was not available but thankfully Debian 9 was installed for me. I decided to upgrade Debian 9 to Debian 10 myself. Here is how I did i in a few steps.
Warning: Debian might be generally a very stable OS but distribution upgrades are something that can be rated as dangerous and should be handled with care. I don't recommend to dist upgrade a long running server with applications and other things already running on it. Even if you decide to do so take backups! Things could go wrong and the server could be rendered unusable! Therefore I would like to explain that I'm not responsible for any damage that might happen to any server when performing a distribution upgrade. I recommend only to do this on a fresh installed Debian 9 VPS where you have nothing to lose!
Let's get started with the guide.
1. Login into your Debian 9 VPS as root or a user that can use sudo via SSH or any other different way (direct TTY, emergency SSH, VNC or whatever else you have available).
2. First you have to get the current system up to date. To do so run the commands below in the order given.
(Don't forget to apply sudo before the commands if you use a non root user!)
- The first command will update the package database on your machine which in return will compose a list of packages that can be updated.
- The second command will actually update the packages that have updates available for them.
- The third command will update some packages that have been hold back like the kernel and firmware.
Everything on the current system has to be up to date to avoid possible issues with package version mismatch and other things that can happen when you skip ahead package versions during updates.
3. Take a backup of your sources.list by using the command below.
(Don't forget to apply sudo before the commands if you use a non root user!)
4. Open the /etc/apt/sources.list file, wipe all the content in it and paste the following Debian 10 package sources into the file using a text editor like nano, vi or vim. When opening the file don't forget to use sudo if you use a non root user account.
Debian 10 package sources:
5. Update the package database again and finally upgrade all packages and kernel to Debian 10 level by using the commands below.
(Don't forget to apply sudo before the commands if you use a non root user!)
You might notice that this are the commands as from a few steps ago. So it's really that simple to perform the upgrade after changing the package sources.
You will be asked if you want to restart system services automatically or manually. Simply choose to restart all necessary services automatically. This will simply save you some work and steps.
6. After all packages have been upgraded to Debian 10 you can do a little clean up. To clean up no longer needed packages and files run the command below.
(Don't forget to apply sudo before the commands if you use a non root user!)
7. Finally restart your server to boot into the new Debian 10 kernel and you are done with the upgrade.
This has worked flawless for me. I'm not running Debian 10 on my VPS 16. In the paste I upgraded Debian 8 to Debian 9 to Debian 10 on a NanoKVM VPS without any issues.
This is one way to get the latest Debian version if your provider doesn't provide it or you don't want to reinstall your OS again.
I would like to share the follow account of experience and a brief guide about how to upgrade Debian 9 to Debian 10 in a few easy steps. First I'd like to explain why I'm posting this. I have been taking part in the December giveaway and won a VPS. In my applicaton I requested the OS Debian 10 to be installed on the VPS and noted that Debian 9 can be installed if Debian 10 is not available. So it looks like Debian 10 was not available but thankfully Debian 9 was installed for me. I decided to upgrade Debian 9 to Debian 10 myself. Here is how I did i in a few steps.
Warning: Debian might be generally a very stable OS but distribution upgrades are something that can be rated as dangerous and should be handled with care. I don't recommend to dist upgrade a long running server with applications and other things already running on it. Even if you decide to do so take backups! Things could go wrong and the server could be rendered unusable! Therefore I would like to explain that I'm not responsible for any damage that might happen to any server when performing a distribution upgrade. I recommend only to do this on a fresh installed Debian 9 VPS where you have nothing to lose!
Let's get started with the guide.
1. Login into your Debian 9 VPS as root or a user that can use sudo via SSH or any other different way (direct TTY, emergency SSH, VNC or whatever else you have available).
2. First you have to get the current system up to date. To do so run the commands below in the order given.
Code:
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y- The first command will update the package database on your machine which in return will compose a list of packages that can be updated.
- The second command will actually update the packages that have updates available for them.
- The third command will update some packages that have been hold back like the kernel and firmware.
Everything on the current system has to be up to date to avoid possible issues with package version mismatch and other things that can happen when you skip ahead package versions during updates.
3. Take a backup of your sources.list by using the command below.
Code:
cp /etc/apt/sources.list /etc/apt/sources.list.backup4. Open the /etc/apt/sources.list file, wipe all the content in it and paste the following Debian 10 package sources into the file using a text editor like nano, vi or vim. When opening the file don't forget to use sudo if you use a non root user account.
Debian 10 package sources:
Code:
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main5. Update the package database again and finally upgrade all packages and kernel to Debian 10 level by using the commands below.
Code:
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -yYou might notice that this are the commands as from a few steps ago. So it's really that simple to perform the upgrade after changing the package sources.
You will be asked if you want to restart system services automatically or manually. Simply choose to restart all necessary services automatically. This will simply save you some work and steps.
6. After all packages have been upgraded to Debian 10 you can do a little clean up. To clean up no longer needed packages and files run the command below.
Code:
apt-get --purge autoremove -y7. Finally restart your server to boot into the new Debian 10 kernel and you are done with the upgrade.
This has worked flawless for me. I'm not running Debian 10 on my VPS 16. In the paste I upgraded Debian 8 to Debian 9 to Debian 10 on a NanoKVM VPS without any issues.
This is one way to get the latest Debian version if your provider doesn't provide it or you don't want to reinstall your OS again.
Hello guys
While setting the hostname, i.e., on issuing:
it says:
and on running:
I got this in the logs:
which I feel is basically 'Permission denied'.
Never experienced this when my VPS was on OVZ...Could anyone help me? Thanks in advance.
Regards,
While setting the hostname, i.e., on issuing:
Code:
hostnamectl set-hostname example.com it says:
Code:
Could not set property: Message recipient disconnected from message bus without replyingand on running:
Code:
systemctl status systemd-hostnamedI got this in the logs:
Code:
Dec 07 05:56:04 kvm-Post4VPS-Atlanta systemd-hostnamed[16352]: Failed to read hostname and machine information: Permi...niedNever experienced this when my VPS was on OVZ...Could anyone help me? Thanks in advance.
Regards,
| Welcome, Guest |
|
You have to register before you can post on our site. |
| Search Forums |
|
(Advanced Search) |
| Forum Statistics |
|
» Members: 2,271 » Latest member: orzpainter » Forum threads: 3,100 » Forum posts: 34,783 Full Statistics |
| Online Users |
|
There are currently 295 online users. » 0 Member(s) | 291 Guest(s) Bing, Applebot, Google, Yandex |
| Latest Threads |
|
⚡ EnjoyVPS.Com : 35+ Glob...
Forum: Others Last Post: RIYAD 01-06-2026, 01:21 AM » Replies: 0 » Views: 539 |
|
Get LLHOST Netherlands Fe...
Forum: Others Last Post: LLHOST 09-29-2025, 03:02 AM » Replies: 0 » Views: 984 |
|
Super Fast LLHOST Netherl...
Forum: Value VPS Providers Last Post: LLHOST 09-16-2025, 05:01 AM » Replies: 0 » Views: 687 |
|
Get LLHOST Netherlands Fe...
Forum: Cheap Providers Last Post: LLHOST 09-08-2025, 01:33 PM » Replies: 0 » Views: 814 |
|
Windows VPS @ $31.5/Year ...
Forum: Cheap Providers Last Post: DewlanceHosting 08-16-2025, 03:12 AM » Replies: 0 » Views: 949 |
|
Buy DemoTiger Videos on c...
Forum: Others Last Post: DewlanceHosting 08-16-2025, 03:10 AM » Replies: 8 » Views: 6,539 |
|
Budget Dedicated Servers ...
Forum: Others Last Post: HostNamaste 08-13-2025, 04:54 AM » Replies: 2 » Views: 1,980 |
|
☁️ How to Use VCCPRO Virt...
Forum: Cheap Providers Last Post: bestadvisor 07-13-2025, 09:36 AM » Replies: 0 » Views: 1,419 |
|
[Promo] 30% Discount – VP...
Forum: Cheap Providers Last Post: LLHOST 07-11-2025, 12:56 PM » Replies: 0 » Views: 1,006 |
|
✅ Affordable VPS Hosting ...
Forum: Cheap VPS Providers Last Post: RIYAD 07-02-2025, 03:02 AM » Replies: 0 » Views: 2,246 |