Author Topic: Step-by-step : How to resize Zentyal default root LVM Partition Safely  (Read 8178 times)

aryana.haribawa

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +5/-0
    • View Profile
Zentyal is a powerful system useful for developing server for various purposes such as Domain Controller, Firewall, Router, E-mail, VPN, etc. And even better it is free !!!

However, Zentyal has a serious  problem with its default LVM partition configuration in which the root LVM Partition is set by default to be so small, hence at some point of time, especially if backup feature of the Zentyal Box is enabled, the system will runs out of root system partition space, causing the Zentyal Box to crash. This problem is very common.

I have written a doc on how to resize Zentyal Root LVM Partition safely. Hope this can help

Andre

robb

  • Guest
Fortunately with the Zentyal 2.04 installer, the partitioning has been changed with enough(?) space on root. But still thanks for the effort taking the time to write this guide.

nachico

  • Zentyal Staff
  • Zen Samurai
  • *****
  • Posts: 338
  • Karma: +31/-1
    • View Profile
    • Learning To Fly
Hi aryana.haribawa,

thanks for the doc. is it ok if we add this to the community documentation? Are you comfortable with the terms?

Thanks. Regards,
CEO at Zentyal

aryana.haribawa

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +5/-0
    • View Profile
@Robb : I am running Zentyal core 2.0.7, and the problem still exists. I have helped several friends who run into similar problems and they are running even newer version than the one I am running. So far the steps that I wrote always solve this problem safely. Anyway, I am hoping the document I wrote can be somewhat useful to others in need to resize their zentyal and/or Ubuntu box root LVM partition.

@Nachico : You are very welcome. You guys have developed such a great applications for many of us. Glad to be able to contribute a little :)

robb

  • Guest
The installer is not the same as the core package. The installer is the version of the install image.

nachico

  • Zentyal Staff
  • Zen Samurai
  • *****
  • Posts: 338
  • Karma: +31/-1
    • View Profile
    • Learning To Fly
Thanks Aryana,

I have added your howto to the community repository and have linked it from the community documentation. I have also added your name in the Special thanks section :)

You should be able to modify it if needed.

Thanks!
CEO at Zentyal

marvinray.reyes

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
  • Noob
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #6 on: September 23, 2011, 07:44:55 pm »
Sir,

Is this safe?

Marvin Reyes

mithamopolycap

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #7 on: September 29, 2011, 11:11:13 am »
let me try it out will give you feed back!
great things

marvinray.reyes

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
  • Noob
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #8 on: September 29, 2011, 11:16:57 am »
let me try it out will give you feed back!

Ill be waiting for your feedback sir! thanks

marvinray.reyes

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
  • Noob
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #9 on: October 25, 2011, 04:39:32 pm »
this really works...

jgggr

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #10 on: March 31, 2012, 02:55:13 am »
Hello!!

I am trying to follow the how-to but I'm stuck!

In my zentyal box, I've ran df -kh and got:
/dev/mapper/lvml-filesystem
/dev/mapper/lvml-home

BUT, when I run the live rescue cd, the following command doesn't work:

e2fsck –f /dev/mapper/lvml-home

It says: "no such file or directory"

The only thing inside /dev/mapper is something called "control"

I hace no idea what I am doing wrong. I hope it is something stupid. Please help me. I am running zentyal on a produce enviroment and need this solved by sunday.

Thank you!

(I am running Zentyal on 2 500GB HDs on RAID 1)

jgggr

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #11 on: March 31, 2012, 03:36:29 am »
Also, I've notice that
pvdisplay
returns *nothing* (and so does vgdisplay and lvdisplay).

I have also tried a different live cd (knoppix) with same results...

Could this be something with raid? I've tried dmraid -ay but got "no raid disks" message.

Pleeease help!! :)

marvinray.reyes

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
  • Noob
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #12 on: March 31, 2012, 05:37:10 am »
What version of live cd are you using?
Thats weird cause I've just partitioned my 2 zental boxes and it's working..

aryana.haribawa

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +5/-0
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #13 on: April 01, 2012, 12:39:31 pm »
Hi there,

I am quite sure your problem is due to the live rescue cd cannot identify the right driver for your server RAID. If Zentyal is installed okay in your server, a rescue CD which is based on Ubuntu and/or debian Linux should also work theoretically.

Try getting the latest version of the Linux Live Rescue CD or other version of rescue CD such as RIPLinux which also has Gparted already integrated inside

Rgds
Aryana

jgggr

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Step-by-step : How to resize Zentyal default root LVM Partition Safely
« Reply #14 on: April 02, 2012, 08:01:28 pm »
Ok I've done it!  :)

My solution was based upon this:
http://www.howtoforge.com/how-to-resize-lvm-software-raid1-partitions-shrink-and-grow
and
http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/active_mount_ex3.html

I had to "activate" my RAID before I could see the lvm. Here it goes:

1 - Run how to steps 1 to 10.

2 - Activate all needed modules:

modprobe md
** I've got an error message when trying to load this, but i just kept going on and everything was ok.
modprobe linear
modprobe multipath
modprobe raid0
modprobe raid1
modprobe raid5
modprobe raid6
modprobe raid10


3 - Activate your RAID arrays

cp /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf_orig
mdadm --examine --scan >> /etc/mdadm/mdadm.conf

mdadm -A --scan


4 - start LVM:

/etc/init.d/lvm start

5 - lvdisplay showed my LVs were inacative. Activate them:

lvchange -ay /dev/your-lvm-path

6 - Continue from step 11 on the how-to.

And voilá, it is done!  8)

I hope they have changed the installation deafults, because this really sucks!
« Last Edit: April 02, 2012, 08:30:58 pm by jgggr »