Help - Search - Members - Calendar
Full Version: 2nd hard drive..... how to use?
The Planet Forums > Control Panels > Plesk
Realist
Hi Guys,

I have a 2nd hard drive installed and so far not used it once. This is because I dont know how to?

Can someone explain to me how can I use it along side my main drive as if they were as one.

or
How can I use it to host sites on

or
How can I use it to backup the main drive?

Thanks Guys,

Brian
icon_wink.gif
jtace
Good question, I just got my 40 GB installed an hour ago and I don't have a clue how to mount it or verify that it's even there. heh..

I've read some posts on the official plesk forum and it seems you'll probalby have to mount the 40 for the sites and use the old sites partition for something else, maybe I'll use it for mysql and backups... I'm just talking off my head because I really don't know much about this yet.

Help anyone?
Realist
Reading the drive is not a problem, just FTP into the server as admin and go to /home2

/home is the main drive

and

/home2 is the 2nd drive.

Ok,

Brian
Swamper
I was told the '2nd' drive was set for mirroring when I sent in a ticket asking about it...

Since all I see is this:

# df -a
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda6 38361968 8415256 27998032 24% /
none 0 0 0 - /proc
usbdevfs 0 0 0 - /proc/bus/usb
/dev/hda1 497829 3485 468642 1% /boot
none 0 0 0 - /dev/pts
automount(pid666) 0 0 0 - /misc


...am I to understand that not all WBL with 2x40 GB drives are set up the same? or what?
jtace
I don't know exactly how the drive was setup when I asked for it to be installed. It was installed with partitions identical to my original 20 GB drive. But if it was meant for "mirroring" a raid controller is needed, which I don't have.

What I ended up doing was repartitioning the 40 GB to one big partition, formatting it and then mounting it as /home2. I then copied over all my sites from /usr/local/psa/home/vhosts to /home2/sites and then setup a symbolic link to replace the original vhosts directory. So in effect I now have 40 GB's to host sites on. Plesk didn't mind at all either when I created a new site after the change.

That suited my needs, as I needed the hard drive for more space. I dunno if that helps anyone on how or what to do with the 2nd drive.
Realist
How did you do the smbolic link?

and what is it?

Brian


QUOTE
Originally posted by jtace I then copied over all my sites  from /usr/local/psa/home/vhosts to /home2/sites and then setup a symbolic link to replace the original vhosts directory.  So in effect I now have 40 GB's to host sites on.
jtace
in the shell, via telnet or SSH, you need to do a

ln -s /directory/path /target/path

or maybe it's reversed.. I had to do a couple tests to figure out which order they should be. icon_biggrin.gif 'man ln' will give you some more indepth info.

It's basically analagous to a shortcut in windows, go into it and it takes you to a completely different place on the directory tree, but it's a transparent operation. Most programs usually don't have any problems dealing with them, and it using one also didn't change the basedir for the scripts on the websites, which was another plus.
Danimal
A symbolic link is created in the form:

ln -s

Thus, if you want to move all your content from /usr/local/psa/vhosts to /home2/sites (where /home2 is mounted on the 2nd drive) and create a symlink, you'd do this:

mv /usr/local/psa/vhosts /home2/sites
ln -s /home2/sites /usr/local/psa/vhosts


The first command moves the vhosts directory (and consequently all subdirectories & content) to /home2 and calls it sites. The second command creates a symbolic link to /home2/sites and calls that link /usr/local/psa/vhosts. Thus, if you go to /usr/local/psa/vhosts, you are actually going to /home2/sites.

One recommendation: if it were me, I'd use /home2/vhosts instead of /home2/sites just to keep it consistent. YMMV, so do whatever works best (or makes sense) for you.

One other recommendation: if your content under /usr/local/psa/vhosts is more than a few megs or 10s of megs, I would recommend copying it first, then checking the copied files to be sure it all copied correctly, then removing the original content and then create the symlink. That way, if the copy screws up, you haven't lost the original.

-Danimal
jtace
Thanks Danimal icon_smile.gif

I was in a hurry and didn't have time to look it up exactly at that time.
Realist
If I move all my files to my 2nd drive and keep the original drive as it is and not delete the vhosts files just yet.

Can I still do the symbolic link to the 2nd drive to test all is fine, if it does not work............... how do I re do the symbolic link so it points back to the 1st main drive?

Thanks,

Brian
Realist
You state below:

/usr/local/psa/vhosts but mine is /usr/local/psa/home/vhosts

Do I just add home to the command?

Regards

Brian

QUOTE
Originally posted by Danimal
[B]mv /usr/local/psa/vhosts    /home2/sites
ln -s /home2/sites   /usr/local/psa/vhosts

-Danimal [/B]
jtace
Yup. icon_smile.gif set the paths according to your servers setup..
dominiosenlinea
Worked great!

Now: how do i get it to work so i can do the following...

I need to set up domain backups pointed to a folder which has been redirected like explained above to /home2. When i try to access redirected folder to get into the fisical folder via FTP it wont let me.

Anyone got some solution?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.