Results 1 to 9 of 9
Thread: Question about Dual Hard Drives
-
02-14-2003, 03:30 AM #1Aspiring Evangelist
- Join Date
- Oct 2002
- Posts
- 379
Question about Dual Hard Drives
Hey... This might be a dumb question.. If so sorry .
I was wondering with dual hard drives (I have dual 80GB hard drives). Does it work such as say I am coping files via SSH and the main hard drive becomes full, does it start coping it to the other one automaticly or no? If the answer to that is no, then how do I copy data to the second hard drive (say I want to store backups there) when I am logged in via SSH to I have to type a command to get to the second hard drive?
-
02-14-2003, 06:56 AM #2Aspiring Evangelist
- Join Date
- Oct 2002
- Posts
- 379
Anyone know?
-
02-14-2003, 07:16 AM #3Web Hosting Master
- Join Date
- Jul 2002
- Location
- Manchester, UK
- Posts
- 779
It depends how they are partitioned. Unless its setup as RAID, there will most likely be separate partitions on each hard drive (e.g. with some setups, there is a "home1" on one hard drive and "home2" on the other).
Unless you have RAID capabilities, there is no way of automatically making it switch to the other hard drive (at least no way I know of, anyway).
Hope this helps.
-
02-14-2003, 07:48 AM #4Aspiring Evangelist
- Join Date
- Oct 2002
- Posts
- 379
Ok I found out a command such as this works:
cp /dev/hda2 /path/to/file
Now how do I access the second hard drive so I can make folders and browse around. If I type something like /dev/hda2 cd /root/ that doesn't work... Anyone know how to do that?
-
02-14-2003, 09:28 AM #5Aspiring Evangelist
- Join Date
- Oct 2002
- Posts
- 379
Grrr....I keep refershing this waiting for someone to answer. If anyone knows could you please tell me how - thank you!
-
02-14-2003, 09:55 AM #6Hail Eris !
- Join Date
- Oct 2002
- Location
- Canada
- Posts
- 3,103
1. You need to read some newbie guide on linux filesystem
2. first there is a phisycal drive (or 2 drives in your case). Then there are some partitions, then those martitions are MOUNTED in certain MOUNT POINTS.
So if you have 2 IDE drives, they will be /dev/hda and /dev/hdb. Their partitions will be /dev/hda1, /dev/hda2, /dev/hdb2 and so on. Mount points for these partitions will be something like /home, /var and so on. You can see your mount points, partitions and available space on them with "df -h". If you are runing out of space in one partition, and you have lots of spare space somewhere else, chances are you will copy your files over and change the partition that mount point points to. For an example: if your /home which is on /dev/hda3 is 99% full, and you have /dev/hdb3 with more then enough space they you will need to temporaryly mount /dev/hdb3 SOMEWHERE, copy your files from /home to SOMEWHERE , unmount /home, remount /dev/hdb3 as /home.
If this makes no much sense, that is OK. I just wanted to give you soime pointers to what you should be seaching for.
-
02-14-2003, 08:23 PM #7Web Hosting Guru
- Join Date
- Jan 2003
- Posts
- 261
These pages should help you understand the filesystem setup and how to go about mounting... (2nd one in particular)
http://www.slackware.com/config/rootdir.php
http://www.tldp.org/HOWTO/mini/Hard-...ade/mount.html
These man pages may be of interest...
man fstab
man mount
Basically it sounds like you need to check df and see what drive is set to what mount point. Then you can copy from mountpoint to mountpoint via cp /mnt/point/1/* /mnt/point/2
---www.sekure.us---
-
02-14-2003, 08:36 PM #8Disabled
- Join Date
- Feb 2003
- Posts
- 51
Re: Question about Dual Hard Drives
Originally posted by LCHwebHost
Hey... This might be a dumb question.. If so sorry .
I was wondering with dual hard drives (I have dual 80GB hard drives). Does it work such as say I am coping files via SSH and the main hard drive becomes full, does it start coping it to the other one automaticly or no? If the answer to that is no, then how do I copy data to the second hard drive (say I want to store backups there) when I am logged in via SSH to I have to type a command to get to the second hard drive?
-
02-14-2003, 10:34 PM #9Web Hosting Master
- Join Date
- May 2001
- Posts
- 697
It will not auto-copy the files to the new hard drive.
Think of it in the same way as your home PC. If you have 2 hard drives, you call them C: and D: (or others, but we'll just stick to those). So, if you download a file to the C: and it's full, you will have to either move files around to make space, or delete files on the C: so you can download the file. If you want to move files from one hard drive to another, you have to 'drag and drop' the files from the C: to the D:. This is the same as with linux (only you don't drag and drop on a server, you cp /home/file /home2/file )
cp is the command for copy, that's how you copy files from one place on your system to a different place.
Now, if you have RAID, you won't have this problem... but that's another story...
The only difference is with linux you are using /home and /home2 instead of C: and D: . (/home and /home2 don't have to be called that... you can essentially whatever you want to call them when you setup your partitions)
It really is pretty simple once you get the basic idea. Read some of those sites referenced in the previous posts, and I'm sure you'll get it quickly!