Results 1 to 9 of 9

Thread: Moving /opt/zimbra to another partition.

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Salt Lake City, Utah
    Posts
    31
    Rep Power
    7

    Default Moving /opt/zimbra to another partition.

    I need to move /opt/zimbra/ to a larger partition to avoid having to reinstall for more space. I obviously underestimated space.

    What is the most efficient way to do this and in the future during upgrading is there anything special I am going to need to do other than edit the install script to reflect the different directory?

    Thanks!
    vīdī, vīcī, vēnī

  2. #2
    Join Date
    Jul 2008
    Posts
    1
    Rep Power
    7

    Default

    +1
    I ran out of space on / and had to add a seperate iscsi partition. The backup/restore seems like overkill is there an easier way?

  3. #3
    Join Date
    Oct 2007
    Location
    North East England
    Posts
    167
    Rep Power
    8

    Default

    If I understand the way Linux handles filesystems correctly; I think you can do this:


    • Add your new disk
    • Create filesystem and format with appropriate filesystem (eg ext3)
    • Create temporary mount point for new disk (eg /mnt/newdisk), and mount
    • Rysnc (to retain permissions) your /opt/zimbra to /mnt/newdisk
    • Modify your /etc/fstab to mount the new disk as /opt/zimbra


    Quick HOWTO : Ch27 : Expanding Disk Capacity - Linux Home Networking

    Add or Attach New Hard disk to Linux Machine
    Craig Rodway » Flickr | Last.fm | Del.icio.us | Twitter

  4. #4
    Join Date
    Aug 2007
    Location
    Anchorage, AK
    Posts
    376
    Rep Power
    8

    Default

    webman's description would do it. The mv command would do it fine though without permission loss.

    Shutdown Zimbra first before moving files or remounting. Also make a backup if you can.

    mkdir /tempdir
    mount /dev/sdx# here /tempdir
    mv -R /opt/zimbra/* /tempdir
    umount /tempdir
    mount /dev/sdx# /opt/zimbra
    View mounted drives and available space.
    mount
    df -h

    If all looks good and the data is where it should be, restart Zimbra at this point and all should be well.
    Culley
    Mail | Dell 2950III | 2x Quad Core 5420 | 8gb RAM | 6x 146gb SAS RAID 0+1 | Red Hat 5.3 | Zimbra 6.0.10 Network Edition
    Test | VMware ESXi Whitebox | Phenom II Black 3.2ghz | 12gb RAM | 6x 1tb SATA RAID 0+1 | CentOS 5.4 | FOSS, Not in use now

  5. #5
    Join Date
    Mar 2007
    Location
    Austin
    Posts
    441
    Rep Power
    8

    Default

    Personally, I would 'cp -a' instead of 'mv -R', then delete the old install after I was sure the system was functioning properly. I normally assume there will be no problems with a mv command, but I like to be extra cautious with something I can get yelled at for.

  6. #6
    Join Date
    Aug 2007
    Location
    Anchorage, AK
    Posts
    376
    Rep Power
    8

    Default

    Yeah, that would be a good idea. I'm paranoid about running backups and I can destroy all the data I want, but copy rather than move works prefectly.
    Culley
    Mail | Dell 2950III | 2x Quad Core 5420 | 8gb RAM | 6x 146gb SAS RAID 0+1 | Red Hat 5.3 | Zimbra 6.0.10 Network Edition
    Test | VMware ESXi Whitebox | Phenom II Black 3.2ghz | 12gb RAM | 6x 1tb SATA RAID 0+1 | CentOS 5.4 | FOSS, Not in use now

  7. #7
    Join Date
    Jul 2006
    Location
    Brisbane
    Posts
    19
    Rep Power
    9

    Default Lessons...

    Use lvm and these sort of problems rarely if ever happen. All good linux distro's even allow you to install onto lvm so you can even have your root filesystem, swap and opt as part of an lvm volume group.

  8. #8
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by bards1888 View Post
    Use lvm and these sort of problems rarely if ever happen. All good linux distro's even allow you to install onto lvm so you can even have your root filesystem, swap and opt as part of an lvm volume group.
    A How-To in the wiki would be a welcome addition, all community contributions gladly received.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. Replies: 27
    Last Post: 05-15-2012, 02:30 AM
  2. Replies: 3
    Last Post: 01-21-2008, 03:47 PM
  3. Replies: 5
    Last Post: 08-02-2007, 05:55 PM
  4. ZIMBRA!!!!! Error zmcontrol status and others
    By orison in forum Installation
    Replies: 8
    Last Post: 02-03-2007, 07:52 PM
  5. where to store /opt/zimbra
    By Artturi in forum Installation
    Replies: 5
    Last Post: 01-25-2007, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •