Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Linux Partitions and How

First off, I have an intel server running Redhat Linux. It's designated to be used for hosting, so it's running Plesk 7. At this time, it has little activity / usage.

I noticed something alarming about the way the server is set up.

The server has a 70 gig (or close) hard drive, but the files from the hosting "stuff" are going to the wrong partition. Instead of going to the partition with the 68 gigs of free space, they are filling up the section with only 2 gigs space. Obviously, it won't be long before this drives things to a halt.

Here is the DF info...
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda3              2522076    401676   1992284  17% /
/dev/hda1               101089      9321     86549  10% /boot
none                    514940         0    514940   0% /dev/shm
/dev/hda7               396623      8246    367896   3% /tmp
/dev/hda2             70557084    694392  66278592   2% /usr
/dev/hda5              1510032    121060   1312264   9% /var

Here is what plesk reports:
Filesystem Total Used Available Capacity
/dev/hda2 68 903.40 MB 678.14 MB 64 725.16 MB 0.98%    
 
Directories /usr/local/psa
/dev/hda5 1 474.64 MB 118.22 MB 1 281.51 MB 8.02%    
 
Directories /var/lib/mysql
/var/qmail/mailnames
/var/named/run-root

/dev/hda3 2 462.96 MB 392.26 MB 1 945.59 MB 15.93%    
Directories /home/httpd/vhosts


So it looks like all the client files are being stored on hda3, instead of hda2. Is there any way to fix this or work around it? I am not only new to plesk, but new to linux in general. This server is being stored in a rented rack - which is in a new york data center. So - I'm out of luck if the solution requires physical access to the server.


Thanks in advance for any help,

Sincerely,
Desperate and Confused
0
epaschal
Asked:
epaschal
  • 3
1 Solution
 
wesly_chenCommented:
Hi,

   The workaround is simple (as root):
1. Create a directory /usr/home/httpd
# mkdir -p /usr/home/httpd
2. Turn off Plesk 7
3. Copy the /home/httpd/vhosts to /usr/home/httpd
# cd /home/httpd ; tar cvf - vhosts | ( cd /usr/home/httpd; tar xvf - )
(tar will preserve all the symbolic link , charactor device, blcok device...)
4. Renme /home/httpd/vhosts
# mv /home/httpd/vhosts  /home/httpd/vhosts.bak
5. Make a symbolic link from /home/httpd/vhosts to /usr/home/httpd/vhosts
# ln -s /usr/home/httpd/vhosts /home/httpd/vhosts

Then restart Plesk 7.

Wesly
0
 
wesly_chenCommented:
First, make sure the client files are under /home/httpd/vhosts.
Then you can make a shell script from what I mentioned:
--- movement.sh --
#!/bin/bash
mkdir -p /usr/home/httpd
cd /home/httpd ; tar cvf - vhosts | ( cd /usr/home/httpd; tar xvf - )
mv /home/httpd/vhosts  /home/httpd/vhosts.bak
ln -s /usr/home/httpd/vhosts /home/httpd/vhosts
--------------
And make the script executable:
# chmod +x movement.sh
Then turn off Plesk 7 and run the script (movement.sh)

Regards,

Wesly
0
 
epaschalAuthor Commented:
Thank you Wesly - this worked perfectly!

Would it be safe to repeat the process for the mysql and qmail directories - currently stored on a small hda5 as opposed to the large hda2?

Again, thank you for saving me! I thought that I would have no choice but to have the server pulled and shipped back.

0
 
wesly_chenCommented:
> Would it be safe to repeat the process for the mysql and qmail directories
Yes, make sure turn off qmail and mysql before the copy over.

Wesly
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now