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
Please help increase the size disk
- pup_seba
- Outstanding Member
- Posts: 687
- Joined: Sat Sep 13, 2014 2:43 am
- Location: Tarragona - Spain
- Contact:
Re: Please help increase the size disk
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
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
Re: Please help increase the size disk
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
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
Re: Please help increase the size disk
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.
Re: Please help increase the size disk
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 ?
But why creating a new partition? can't just resize the existing root partition using the space made available after reducing the home partition ?
Re: Please help increase the size disk
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.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 ?
Re: Please help increase the size disk
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
I will see in the next day or so if it's all working good before removing the VM snapshot ...
- 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