Your Hard-Disk has no more space left

Discussion in 'Installation/Configuration' started by Matty B, Dec 21, 2009.

  1. Matty B

    Matty B New Member


    I have just recently installed a new server running CentOS 5 & ISPConfig

    Today I received an error saying disc full when trying to upload some files via FTP, when looking into the situation I have realised that all of my files seem to be uploading to the wrong area on the web server itself.

    The drive which is full is /dev/sda3, which only has a capacity of 4.8G, however drive /dev/sda2 has a capacity of 440G and is currently empty.

    How do I switch my websites over to use the bigger partition which they are supposed to run on & will I need to re-upload all of my websites and databases's? or is their an easy way to move them across to the correct location?

  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    At first I'd copy the files or the most recent directory recursively to the other drive.
    Then rename (to have a copy left in case of errors) this most recent dir on the source.
    Mount the new dir appropriate dir from the new drive and you are done.

    Just don't forget to remount this at each reboot (e.g. confugring this to the fstab) before a service accessing files from there starts.
    If you do not have direct access to the server (physically) or no remote console carefully edit the fstab, as the server may not fully reboot in case of errors...

    Assume the directories causing your problems for web are stored below /var/www, and /dev/sda2 is mounted to /mnt/sda2 I'd do the following steps:

    1.) Stop apache and ftp server
    2.) cp -r /var/www /mnt/sda2
    3.) mv /var/www /var/www.bak
    4.) mount /dev/sda2/www /var/www
    5.) Restart apache + ftp server

    if everything works take care of automatic mounting....

  3. sjau

    sjau Local Meanie Moderator

    don't use cp -r but cp -a instead. It preserves the rights on the files.

Share This Page