ISPConfig 3 - replace /var/vmail Hard Disk Drive

Discussion in 'Server Operation' started by Gonzalo Azofeifa, May 9, 2017.

  1. Gonzalo Azofeifa

    Gonzalo Azofeifa New Member

    I'm running out of space on the hard disk drive in which resides /var/vmail. The system is using lvm but there is no physical space on the server to place a new drive an expand the lvm volume. My question is, if a take a new HDD with more available space and back-up the info with rsync can I replace the drive with the new HDD without ISPConfig have some issues with the new one?

    Thanks in advance for your help.
  2. Tekati

    Tekati ISPConfig Developer ISPConfig Developer

    In short Yes.
    You can simply move everything as long as you move EVERYTHING and the permission under /var/vmail

    You would need to make a script to set all the file permission bits unless you rsync -p those over correctly. But we move mail like this all the time without issue. We have even fubared the permissions and a script easily fixed that.

    If your server has USB3.0 (easiest) or USB2.0 if you don''t have too much mail or not in a time crunch.
    Simply get a USB to ??? hard drive interface and move the files over via USB then replace and mount the new drive partition.
  3. sjau

    sjau Local Meanie Moderator

    well, I'd first add new harddrive, then you use rsync -ap to sync the files. Once initial sync is down, do another sync with the same parameters.

    Then power down dovecot/courier/postfix [whatever mta/pop3/imap servers you use].

    Redo the same sync (as new mails could have arrived meanwhile or new mails written), that should now be rather short.

    Now you have all suff synced to new disk. Then you could renmae the /var/vmail to maybe /var/vmail_old and mount the new drive at /var/vmail. AFterwards stard mta/pop3/imap servers again.
  4. Tekati

    Tekati ISPConfig Developer ISPConfig Developer

    In his original post he mentions there is no physical room in the server.


Share This Page