Author Topic: Moving /var/vmail/ to another partition  (Read 379 times)

wilhelmdup

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Moving /var/vmail/ to another partition
« on: June 06, 2012, 01:20:18 »
Hi,

I am having a problem with /var getting full and all services stopping. var is only 9Gb big

I have found a few post of migrating mail etc.

I have create a folder for vmail under the /home partition, since this has 500Gb of space, with about 5% used at the moment.

I have created a backup,
"tar -czvf vmail.tar.gz /var/vmai"l

Now I want to copy all the current mail using, trying to keep the permissions
"cp -prv /var/vmail/ /home/vmail/"

And the create symbolic link,
"ln -s /var/vmail /home/vmail"

Should this work? I am using zentyal 2.

Thanks.

wilhelmdup

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #1 on: June 06, 2012, 04:06:01 »
In the meantime any idea on cleaning up the var partition?

wilhelmdup

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #2 on: June 06, 2012, 09:29:43 »
well it didn't work, keep getting errors on not able to connect to IMAP server.

Jun  6 12:41:28 mail dovecot: dovecot: Fatal: chdir(/var/vmail/dhps-windhoek.com/w.duplessis/) failed: Permission denied (euid=107(ebox) egid=113(ebox) stat(/var/vmail/dhps-windhoek.com/w.duplessis/) failed: Permission denied missing +w perm: /var/vmail/dhps-windhoek.com/w.duplessis/)


wilhelmdup

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #3 on: June 14, 2012, 11:00:44 »
anyone ? anything?

Can i expand the LVM on a live system?

Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1190
  • Karma: +10/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #4 on: June 19, 2012, 12:58:28 »
I think it is a problem of the permissions check that /home/vmail permissions are equivalents to /var/vmail and that /home has equivlaent permission to /var

A more  clean approach would be to have a parition only for /var or /var/vmail and mount it.

wilhelmdup

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #5 on: June 19, 2012, 10:58:27 »
Hi,

Thanks for the reply. The permissions might have been the problem.
But the better option would be to create the separate partition for /var/vmail/ as you mentioned.

It should be able to add a partition with a LVM that has some extra space left. Any precautions I should take?

Thanks


Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1190
  • Karma: +10/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #6 on: June 20, 2012, 09:44:22 »
I think that with the backup of /var/mail will be enough

wilhelmdup

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Moving /var/vmail/ to another partition
« Reply #7 on: June 20, 2012, 10:16:03 »
ok thanks, I will give it a go and update later.