|Authentic theme version
|Kernel and CPU
||Linux 4.19.0-17-cloud-amd64 on x86_64
||Intel Core Processor (Haswell, no TSX), 1 cores
||942.69 MiB used / 906.64 MiB cached / 1.9 GiB total
||1023.99 MiB used / 1023.99 MiB total
|Local disk space
||16.26 GiB used / 3.39 GiB free / 19.65 GiB total
||All installed packages are up to date
|OS type and version:
||Debian 10 Buster
I have just updated my disk size from 20Gb to 40Gb. I can see the 40Gb listed but webmin is still limited to the initial 20Gb partition. I am trying to expand the partition to take advantage of the full disk size.
I have added the module LVM and webmin tells me it is installed. However it is still showing in Un-used Modules and not under the Hardware section where I understand it should be.
What do I need to do to get the LVM module working?
Are there any guides on how to enlarge the partition without a complete reinstall using webmin preferably or CLI if necessary?
System told me that vgdisplay was missing so I have installed that and its dependencies then refreshed modules and now the module is under the Hardware section so Q.1 is sorted.
However, I do not know how to use it and it gives a frightening message about deleting all data so I still need Q.2 answered please?
I have managed to create a Volume Group using the spare 20Gb on the disk. However, I cannot find a way to create a group for the entire 40Gb so that I can increase the existing partition to the full size of the disk. I am now stuck and would appreciate any help.
I updated the disk size as my server had a full disk. I was (at the time) unable to access Webmin as there was no space on the server.
I accessed via ssh and deleted a range of back up and temp files to free space and this enabled me to log in but I could not find why the server kept filling up. Hence the upgrade to double its size and buy me time to sort the problem.
As I had no response to my original request for help and the server was again filling up, I removed all desktop packages using desktop* to search. I looked at them and they seemed OK so deleted them. I lost connection to the server over the web interface and was unable to get it back.
All server operations were running fine and the virtual sites were there but I could not access the webmin interface. So I used apt-get install webmin and it reinstalled webmin for me but the Virtualmin access is still not there. I went to reinstall Virtualmin using sh ./install.sh but did not as the notes discussed LAMP v LEMP and that the base install would write config files and I am worried that this action may lose all my virtual servers etc.
Can someone guide me on how to reinstall Virtualmin without losing the existing setup so that I can get back to where I was please?
The first thing you really should be doing is backing up everything, getting a Linode or something, and doing a test reinstall to make sure you can recover your sites. Don’t even consider going further until you have done this.
My honest opinion is you would probably be better off just migrating to a server with a bigger disk. Right now you might be looking at a reinstall anyway, so consider the bigger server if that is what things come to.
That said, there are some ways you could have approached things originally.
LVM has to be initiated at the time you set up the disk partition as it has a specific partition type, btw. If you have data there, the process is destructive.
The extra disk could have been the size you wanted in the end. ie 40GB. You could enable LVM on it for the future, copy everything across, and change the disk mount points onto the new disk. Once you have tested everything is working properly you can then release the old 20GB back to your provider.
The second way is basically a repeat of the first, except you keep both disks. Once you set up LVM and copy everything across, reset the mount points and test everything, you partition the original disk for LVM and add it to the volume group you created. You can then extend your partitions.
Given you posted this in the newbies section, this last one is probably the easiest and most sensible.
- You could also just have a second server. Migrate some sites across to balance usage out a bit.
I found an old post that Joe responded to and he recommended running virtualmin-base. however the result I got was:
root@xerxes:~# apt-get install virtualmin-base
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package virtualmin-base is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
virtualmin-lamp-stack virtualmin-core virtualmin-lemp-stack-minimal
So do I now need to run virtualmin-lamp-stack and virtualmin-core? In any order? I will wait for a response before proceeding.
There is a backup and I can get back to where I was. The provider set the disk up oroginally and LVM was clearly not set up. if I had known at the time I would have asked for it.
This was also not an additional disk but (supposedly) a migration by the provider to a larger disks-ace and I am talking with them to redo it as it was supposed to be all on a single 40Gb disk. I will now ask them to initiate LVM as they do it or migrate to the disk I have set LVM on if it is not a destructive process.
If I copy everything across, what command would I use that would capture every file including hidden and active files? Will it also duplicate the security files etc.? I do not think an image file would be an option as there is not adequate space to expand into once made so it looks like I need a full clone software.
Gnome Disks is no good as it is GUI based. Partimage will not copy the active root partition unless it is unmounted. I do not think Clonezilla will work as I am not physically next to the machine and dd also only produces an image (as I understand it).
Before I do anything I will wait for the provider (OVH and very slow to respond now that I have paid!) to let me know what options are available. Everything is working, it is just the virtualmin interface that is missing and if someone can help me to reinstall it non destructively it would help. I can then follow one of your options above.
You don’t need to be on LVM to resize disk. For this particular situation there is utility called growpart.
(If not found use sudo apt-get install cloud-utils-growpart )
Have you it few times without any data loss and can be used on mounted system.
Thanks Saahib that is helpful. I have now read about it and can see it is probably the easiest way forward.
I have now installed virtualmin-core which brought virtualmin back but it did not recognise the Apache virtual servers. I had to import them into the interface one at a time and the only issue appears to have been the management of the ssl certificate but that is also now resolved.
There is one server that I have not been able to locate which is a server that is not a web based (therefore non-apache) server but a name server. Where would that be stored and how would I import it back into the virtualmin interface?
@GeoffatMM are you gpl or pro user?
Hi Unborn, I am a GPL user.
I have been diverted on other issues on the server and only now got the time to get back to this. I have read and read on google but frankly, most of the tutorials are written in gobbledygook and assume you have a first class degree in Information Technology so I am looking for idiot proof guidance please.
OVH are a waste of space. having recommended me to migrate from 20 GB to 40 GB they have actually just imaged my file into a (I assume) 40 GB drive but only provided the same 20GB that I was originally having problems with. When I chased them their only guidance was to back up the existing drive (where to? how?) then repartition the drives with the risk of losing all my data. So I am looking for a clearer understanding of the process and the risks.
Drive 1 (the original drive) has been cleaned up to reduce its size. I have no idea why it has now grown to 14 GB of files as it is not used that much and only has a Debian OS supporting a Virtualmin installation and (until this week) two tiny, no negligible, servers. I have recently been playing with importing other existing sites to the virtualmin server so have added two new virtual servers that have not really added that much in the way of files.
So the 20GB drive on which everything is mounted is currently running at about 14 GB. The second drive I have installed as a LVM drive but I do not know how to now mount and access it. I have no other disk space available other than my home setup and the thought of downloading then uploading 14 GB is not exciting but I suspect it will be the only way.
Reading some of the comments above I am not sure everyone understood the situation hence this explanation. All I want is to end up with a single 40 GB drive mounted to / on which my existing installation will run. I assume I have to access the second drive, generate a disk image onto that second drive. Copy that image to my home network, clean drive 2 and try to reinstate the downloaded image onto drive 2 and mount it there as the root partition to confirm it can be done. Then I can delete the data on drive 1, set it up as LVM, expand disk 2 into disk1 and if there is any data loss reuse the image file to set up the entire drive again.
Is this right? or is there a simpler process? If it is right, I need to start by mounting the LVM drive 2. How is that done?
I have made a Volume Group called New_Space on the Physical Volume sda2 and the made a Logical Volume called Drive_2. When I edit the Logical Value and try to mount it to a new directory I have made on Drive 1 (/home/drive_2) nothing happens whether I use ext 3 or ext 4 as the file structure. What am I doing wrong?
Then buy a VPS which has a 40GB drive. You are a self-confessed novice and this idea of yours to resize partitions and mount additional drives requires expertise that you do not currently possess. If this is a time-sensitive production system that you must have ready then you will either have to learn very fast or pay a little more to your VPS host and hire a system which is adequate for your current requirements.
On the other hand, if this is not a production system but just a test system on which you wish to learn by doing then that’s a good idea. Keep asking and the community might help as best as it can. Good luck.
Then buy a VPS which has a 40GB drive.
That is what I did which is why I am in this situation.
requires expertise that you do not currently possess.
Please do not make assumptions because I choose to ask naive questions
If this is a time-sensitive production system
No it is not
just a test system on which you wish to learn
Keep asking and the community might help
That is what I am trying to do somewhat unsuccessfully it would seem.
I am making some progress.
I tired using the CLI mount command but kept getting errors so came back to virtualmin.
Virtualmin instructions are not clear in the LVM module but I finally worked out that I first had to create the filesystem by clicking the button (it does say so on this line but not on the following line for mounting). I was then able to avoid the errors I had been getting using the CLI mount command and mount the drive as I wanted through the LVM module.
I now want to compress the live drive as much as possible (if it is possible while it is being used) before copying it across to the new mounted drive. I will research live compression to remove white space and I then intended using dd for the move. however, if anyone wants to suggest something better/easier/quicker to save me reading all night, please feel free.
You’re kinda going about this entirely the wrong way.
Debian doesn’t install on LVM by default so unless you actively chose that during install you are simply running a single partition using ext4.
Your host increased your disk size?
Increase the size of the filesystem using one of the gazillion guides out there. This is not a Virtualmin issue, you have to do this via the providers rescue system/live CD, then grow the filesystem.
Stop mucking around with LVM. Nothing good ever came from LVM.
Edit: and for finding out why your installation grew big, start from /, check the biggest directory and enter into that one, repeat.
Usually it’s logs.
My host tells me to go into the rescue mode and do all sorts of things and I am happy to follow their instructions but there very first instruction is to take a full backup. I am trying to take a disk image and save it (as it will be too large for the current disk) onto the second disk they have given me. Hence the LVM to try to mount a drive to copy to then download to ensure I have a saved disk image.
Just as I thought I had got it done with the second disk mounted on the root at a directory I have made ( /home/disk_2) I rebooted the server and now cannot access either virtualmin or ssh. The server is running because one of the test websites on it is up and running but without ssh I am a bit stuck. I can use the rescue mode on the OVH panel but I do not know what to fix!
BTW, if LVM is so bad why is it in webmin?
I’m sorry for your bad outcome so far. I have no recommendation to mend the current situation, but I thought I’d share with you the procedure I use on a different hosting service. Perhaps you or someone else ll find it useful:
After growing up the disk space,
- Go to Webmin\Hardware\Partitions
- Go to Webmin\Hardware\Logical Volume Management
- On the Physical Volumes page, Click: Add a physical volume to vg
- Do the necessary to add the new partition.
- On the Logical Volumes page, select “lv_root”
- Set Volume size = Use all free VG space
- Save your way out. No reboot necessary.
Well you should have backups no matter what, but offsite, not on the same fricking image.
The absolute easiest solution would be to boot it up using a live CD, use gparted to expand the partition and reboot from the hard drive.
Then, using growfs or whatever to increase the FS.
You won’t be able to convert a running system to LVM anyway, meaning this whole exercise is all for nothing anyway.
LVM isn’t “in” Webmin as such, Webmin has a module for this like many other things.
I would really appreciate some positive and helpful support rather than time wasting criticisms of my failings. Yes, you are right, I got into this mess but this is supposed to be a support forum that I have turned to to help me get out of it.
For whatever reason after mounting the new drive (which virtualmin told me was OK) and rebooting, my server just will not come up. I can get KVM access but I am simply not experienced enough in the nuts and bolts of CLI for Linux to know what to do the find the problem or solve it. Can anyone help me please? Just tell me what needs to be done and I will research it, learn it and do it. I am completely stuck and need some considered guidance please.
Apologies for the harsh words, but I have already made it clear what you need to do.
You are not getting anywhere with LVM, not possible since the system is already installed.
You said you were using OVH…? They have a VNC viewer in the console/panel, use this and follow the steps I mentioned above.
What’s weird is that it should have just worked, given they are using the cloud images which usually picks up these changes automatically.