Please help increase the size disk

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
alexkg11
Posts: 3
Joined: Thu Aug 03, 2017 11:27 am

Please help increase the size disk

Postby alexkg11 » Thu Aug 03, 2017 11:46 am

I have a VM (vmware) ubuntu with the zimbra server installed.
Please help increase the size of the disk.
When installing, ubuntu automatically partitioned the partitions. I did not calculate with the size of the disk.


message:
Aug 3 16:30:00 mail zimbramon[3219]: 3219:crit: Disk warning: mail.gik.kg: / on device /dev/mapper/mail--vg-root at 95%

Please help increase the size /dev/mapper/mail--vg-root

root@mail:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2,0G 4,0K 2,0G 1%
/dev tmpfs 396M 700K 395M 1% /run
/dev/mapper/mail--vg-root 123G 111G 6,1G 95% /
none 4,0K 0 4,0K 0% /sys/fs/cgroup
none 5,0M 0 5,0M 0% /run/lock
none 2,0G 0 2,0G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 39M 186M 18% /boot
root@mail:~#

Is there an instruction for expanding the disk partition?
sorry my english


User avatar
pup_seba
Outstanding Member
Outstanding Member
Posts: 687
Joined: Sat Sep 13, 2014 2:43 am
Location: Tarragona - Spain
Contact:

Re: Please help increase the size disk

Postby pup_seba » Mon Aug 07, 2017 9:01 am

Hi,

Basically, what you need to do is to add a new virtual disk, create a partition either with fdisk or gdisk (depending on size of disk), and then play with lvm commands, so you configure that disk as a physical volume, add it to the corresponding volume group and finally extending the logical volume you want to extend which in your case I assume is "/dev/mapper/mail--vg-root".

There are several guides on-line about how to do it. I suggest you try it yourself in a lab enviroment first (you could easily clone that zimbra VM and power on the cloned vm without network connectivity).

Here is the first result google search provide...try it in a lab.

https://www.tecmint.com/extend-and-redu ... -in-linux/

good luck
Seb
milauria
Advanced member
Advanced member
Posts: 70
Joined: Mon Aug 15, 2016 12:32 pm

Re: Please help increase the size disk

Postby milauria » Thu Oct 04, 2018 11:02 am

Hello I am in a similar situation ... I am running out of space on "root" while I have a large "home" partition from a Centos7 clean install
can I just delete the home partition and resize the root partition to use that space ?
It's a simple single server installation for 10 users with Zimbra 8.8

Code: Select all

[root@mail ~]# df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/cl_mail2-root   50G   42G  8.3G  84% /
devtmpfs                   1.9G     0  1.9G   0% /dev
tmpfs                      1.9G     0  1.9G   0% /dev/shm
tmpfs                      1.9G  191M  1.7G  11% /run
tmpfs                      1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1                 1014M  218M  797M  22% /boot
/dev/mapper/cl_mail2-home  147G   33M  147G   1% /home
tmpfs                      380M     0  380M   0% /run/user/996
tmpfs                      380M     0  380M   0% /run/user/0
phoenix
Ambassador
Ambassador
Posts: 26779
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Please help increase the size disk

Postby phoenix » Thu Oct 04, 2018 11:15 am

You need a home partition for any users that you need on your system, I'd suggest you remove the current home partition (if there's no defined users) then create a new home partition with a sensible size such as 5-10GB. When you've done that create a new partition of the required size then shutdown ZCS (also disable it from starting on boot) and copy the /opt subdirectory to the new partition (make sure you copy it with rsync to keep the same permissions, users etc.) and mount it there. You'll find plenty of 'How To's' on the internet that tell you how to do that. When the directory is copied I'd suggest a reboot to mount the partitions correctly and try starting ZCS, if you've done it correctly it should start OK.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
milauria
Advanced member
Advanced member
Posts: 70
Joined: Mon Aug 15, 2016 12:32 pm

Re: Please help increase the size disk

Postby milauria » Thu Oct 04, 2018 11:36 am

Thanks for the prompt reply
But why creating a new partition? can't just resize the existing root partition using the space made available after reducing the home partition ?
phoenix
Ambassador
Ambassador
Posts: 26779
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Please help increase the size disk

Postby phoenix » Thu Oct 04, 2018 11:40 am

milauria wrote:Thanks for the prompt reply
But why creating a new partition? can't just resize the existing root partition using the space made available after reducing the home partition ?
You can do whatever you like but I prefer applications, such as ZCS, to be on a separate HD and not the root partition. I'm assuming you've only got one drive from the information you've shown so I've suggested a new partition.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
milauria
Advanced member
Advanced member
Posts: 70
Joined: Mon Aug 15, 2016 12:32 pm

Re: Please help increase the size disk

Postby milauria » Sat Oct 06, 2018 11:13 am

Ok I understood the importance of leaving the root partition for the operating system separate from the application partition, I also decided that I don't need a /home partition therefore I have taken the below steps without touching the stock partition scheme (yes, it's single disk):

- created a VM snapshot as safety measure
- rebooted in Centos rescue mode
- stopped zimbra with zmcontrol stop
- rsync -axHAWXS /opt/zimbra /home (note the "S" option to maintain the data.mdb sparse file as sparse)
- once rsync has completed I have done "rm -rf /opt" to delete the original opt directory
- edited the /etc/fstab to automount the /dev/mapper/cl_mail2-home as "/opt" (was mounted as "/home")
- fixed zimbra permissions just in case (/opt/zimbra/libexec/zmfixperms -extended)
- rebooted as normal

now my partitions usage look like this and hopefully there will be space for zimbra for some time

Code: Select all

[root@mail ~]# df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/cl_mail2-root   50G  2.6G   48G   6% /
devtmpfs                   1.9G     0  1.9G   0% /dev
tmpfs                      1.9G     0  1.9G   0% /dev/shm
tmpfs                      1.9G  8.9M  1.9G   1% /run
tmpfs                      1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1                 1014M  229M  786M  23% /boot
/dev/mapper/cl_mail2-home  147G   39G  109G  27% /opt
tmpfs                      380M     0  380M   0% /run/user/996
tmpfs                      380M     0  380M   0% /run/user/0


I will see in the next day or so if it's all working good before removing the VM snapshot ...

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot] and 20 guests