Announcement

Collapse
No announcement yet.

How to move Plesk folders to different mountpoint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to move Plesk folders to different mountpoint

    hi,

    Not too sure if this is the correct place to put it.

    Ive created an Amazon EC2 with cloudlinux 5.5 and plesk 9.5.2.
    As you can see have plenty of space:

    > [root@ip-10-128-71-10 ~]# df -h
    > Filesystem Size Used Avail Use% Mounted on
    > /dev/sda1 10G 2.6G 6.9G 28% /
    > /dev/sdb 414G 199M 393G 1% /mnt
    > none 3.8G 0 3.8G 0% /dev/shm
    > tmpfs 3.8G 0 3.8G 0% /usr/local/psa/handlers/before-local
    > tmpfs 3.8G 0 3.8G 0% /usr/local/psa/handlers/before-queue
    > tmpfs 3.8G 0 3.8G 0% /usr/local/psa/handlers/before-remote
    > tmpfs 3.8G 0 3.8G 0% /usr/local/psa/handlers/info
    > tmpfs 3.8G 0 3.8G 0% /usr/local/psa/handlers/spool

    But all Plesk dirs like /var/qmail and /var/www are stored in /, which has only 10GB

    > [root@ip-10-128-71-10 ~]# cd /var/qmail/
    > [root@ip-10-128-71-10 qmail]# ls -l
    > total 36
    > drwxr-sr-x 2 alias qmail 4096 Oct 8 11:10 alias
    > drwxr-xr-x 2 root qmail 4096 Oct 8 11:10 bin
    > drwxr-xr-x 2 root qmail 4096 Oct 8 11:10 boot
    > drwxr-xr-x 2 root qmail 4096 Oct 8 11:10 control
    > drwxr-xr-x 2 root root 4096 May 4 03:38 mailnames
    > drwxr-xr-x 2 root qmail 4096 Oct 8 11:10 plugins
    > drwxr-xr-x 2 popuser popuser 4096 May 4 03:28 popuser
    > drwxr-x--- 11 qmailq qmail 4096 Oct 8 11:10 queue
    > drwxr-xr-x 2 root qmail 4096 Oct 8 11:10 users

    How can i make it so that both /var/qmail and /var/www are going to be in /dev/sdb ?

    thanks, Patrick

  • #2
    Patrick,

    If you were able to resolve it -- could you provide information here in case someone will be looking for the solution.

    Than you

    Comment


    • #3
      OK, so when I started the EC2 Instance I got some EBS space first and mounted it to /dev/sdf.

      As Plesk writes most info into /var, I mounted this device to /var/

      What I basically have done is the following.

      cp -pr /var /var2 I copied all info in /var to /var2. Using -p to preserve all info like permissions.
      mount /dev/sdf /var Then I mounted /dev/sdb to /var, but now /var/ is empty.
      cp -pr /var2/* /var/. So I copy back the /var2 into /var. All info is now present but as part of the mounted drive.

      Do note that the original /var still exists. So in case the mount fails, the instance should still be able to start up.

      However I did update /etc/fstab
      vi /etc/fstab and modified the original line into:
      /dev/sdf /var ext3 defaults 0 0

      It seems to work. If someone has comments and tips about it, do share with us.
      You can make a snapshot of the EBS storage for backup reasons.

      Patrick

      Comment

      Working...
      X