• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Change primary disk via Plesk?

Pierluigi Tosto

New Pleskian
Hi everybody, noob questions here, I hope you can help me :)

Recently I was entrusted with the management of a dedicated server where Plesk is installed. I'm actually a neophyte about dedicated servers and plesk and now I'm starting to use SSH.

Operating System Ubuntu 14.04.4 LTS
Plesk version 5.12.30

After a few days of work on server and plesk (awesome) I started to have some problems that I believe are due to disk space. Performing some operations, especially on MySql, often Plesk crashed becoming inaccessible for several hours, showing this error message:

ERROR: Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine (Pdo.php:234)

Via SSH, using the command df -h here is what I saw:

Filesystem Size Used Avail Use% Mounted on
udev 834M 8.0K 834M 1% /dev
tmpfs 168M 460K 168M 1% /run
/dev/sda1 29G 29G 0 100% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 839M 0 839M 0% /run/shm
none 100M 0 100M 0% /run/user
none 64K 0 64K 0% /etc/network/interfaces.dynamic.d
/dev/sdb1 69G 52M 66G 1% /mnt

Apparently the sda1 disk (on which reside the operating system and plesk) filled very quickly and it's the same on which new sites are listed.

As you can see I have available a second disk /dev/sdb1 with 69g available.

I would like to understand how to do, via plesk or SSH to put new website into sdb1.

And second, if it were possible to transfer sda1 websistes on sdb1.

Please help! Thanks!

Pier
 
Hi Pierluigi Tosto,

basically, Plesk is configured to use the settings from "/etc/psa/psa.conf" ( if you don't have a "psa.conf", please copy "psa.conf.default" to "psa.conf" ).

You will see, that the location for your website directories at "psa.conf" is defined as:
Code:
# Virtual hosts directory
HTTPD_VHOSTS_D /var/www/vhosts

If you desire to change this, please use for example:

As user root over SSH:
  1. Create a desired directory on your server: mkdir /your/path/where/ever/you/want/vhosts
  2. Copy the old content to the new location: cp -Rp /var/www/vhosts/* /your/path/where/ever/you/want/vhosts/
  3. Change the setting at "/etc/psa/psa.conf":
    1. Code:
      # Virtual hosts directory
      HTTPD_VHOSTS_D /your/path/where/ever/you/want/vhosts
  4. Use the "transvhosts utility" to transfer and to correct scripts:
    /usr/local/psa/bin/transvhosts.pl --dest-dir /your/path/where/ever/you/want/vhosts --correct-scripts
  5. Rebuild webserver configuration files:
    /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
  6. Check your log - files for ( rare, but nevertheless possible ) errors to solve issue(s)/problem(s)/failure(s).

If all went as expected and the new location ist setup as desired, consider to create a new test - subdomain over the Plesk Control Panel, to see the new results. Only if the test - results are o.k, you can now safely delete the content from your old location "/var/www/vhosts". Consider as well to check FTP and permissions, before deleting the previous location.
 
Hello, I have the same problem and when I execute the procedure
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

gives the following error:

Details: [2018-02-13 10:12:26] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1]
[2018-02-13 10:12:29] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1]
[2018-02-13 10:12:30] ERR [panel] Apache config (15185239450.77565700) generation failed: Template_Exception: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/dracristinalopes.com.br.conf: Permission denied

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/dracristinalopes.com.br.conf: Permission denied


need help
 
Make sure that you have correct permissions for this file and corresponding symlink. For example, on my test server:

# ll /etc/httpd/conf/plesk.conf.d/vhosts/
total 4
lrwxrwxrwx 1 root root 63 Feb 24 2016 ppu12-5.demo.pp.plesk.ru.conf -> /var/www/vhosts/system/ppu12-5.demo.pp.plesk.ru/conf/httpd.conf
 
Back
Top