• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Change size of /Var mount using command line

K

Keith Jordan

Guest
I have a 100GB disc and my /Var folder is only set to use 4GB and I need to increase this. I have tried using the command lvextend -L +10G /dev/mapper/vg00-var to try to increase the size allocated to the parition Var but when I run the df command again to see if the size has changed (after restarting the server) it does not change.

Does anybody know how I go about changing the size of the Var partition? Any help would be much appreciated.


[root@xxxxxxxxxxxx ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 3850292 704916 3145376 19% /
/dev/mapper/vg00-usr 4184064 1331480 2852584 32% /usr
/dev/mapper/vg00-var 4184064 1058000 3126064 26% /var
/dev/mapper/vg00-home
4184064 4260 4179804 1% /home
none 1048576 4 1048572 1% /tmp
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/before-local
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/before-queue
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/before-remote
tmpfs 1048576 136 1048440 1% /usr/local/psa/handlers/info
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/spool
 
Use command

lvextend -L +3G /dev/vg00/var

instead

lvextend -L +10G /dev/mapper/vg00-var
 
Thank you for your suggestion, Igor. However, it has not made any difference to the size of the partition. Is there something that has to be done in order to make the system recognise the new size of the partition?

I am very new to Linux command line as you can tell! Any hele would be much appreciated.



[root@xxxxxxxxxxxx ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 3850292 704956 3145336 19% /
/dev/mapper/vg00-usr 4184064 1221984 2962080 30% /usr
/dev/mapper/vg00-var 4184064 1192228 2991836 29% /var
/dev/mapper/vg00-home
4184064 4260 4179804 1% /home
none 1048576 4 1048572 1% /tmp
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/before-local
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/before-queue
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/before-remote
tmpfs 1048576 136 1048440 1% /usr/local/psa/handlers/info
tmpfs 1048576 0 1048576 0% /usr/local/psa/handlers/spool
 
Anybody else got any ideas on how to increase the partition size of VAR??
 
My webs host gave me the links below to resolve this problem which I shall try at the weekend I think. I shall let you know how I get on. I thought I would share this here in case anyone else has this same issue.


The following FAQ below will be of help in increasing the hard drive space for your servers partitions.

How do I assign additional disk space on a Linux DCS?
http://faq.1and1.co.uk/server/dynamic_cloud_server/linux_dcs/1.html

What if my physical volume size has not changed after increasing disk space?
http://faq.1and1.co.uk/server/dynamic_cloud_server/linux_dcs/2.html
 
Back
Top