How to move Plesk folders to different mountpoint
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and Plesk
  1. Patrick van Hout
  2. Saturday, 09 October 2010
  3.  Subscribe via email
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:

[[email protected] ~]# 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
[[email protected] ~]# cd /var/qmail/
[[email protected] 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
Rate this post:
  1. 27.10.2010 10:10:45
  2. # 1
Igor Seletskiy Accepted Answer
Posts: 1200
Joined: 09.02.2010
0
Votes
Undo
Patrick,

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

Than you
  1. 28.10.2010 03:10:51
  2. # 2
Patrick van Hout Accepted Answer
Posts: 8
Joined: 09.10.2010
0
Votes
Undo
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
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.