Portal Home > Knowledgebase > Articles Database > Mounting a HDD..first time
Mounting a HDD..first time
Posted by shippuuden, 07-14-2007, 10:03 PM |
I read a few threads and it seems as simple as fdisking the drive and then mounting it, but im a little scared..
so if someone has a proper step by step guide to do this can they please help me..
at the moment i have a 40GB ( ide, i think ) hdd and a secondary 250GB IDE hdd, i also have servercp installed and i think im on fedora 6..
Now i dont want to just type fdisk dev/hdb incase that is my first 40gb hdd, i dont mind losing the extra data on it i just dont want to format the OS and stuff was im on an un-managed server and will cost me time / money for them to re-install it all..
is there a ssh command to list all the hdd's connected to the server and to tell me what size they are, and where they are on the server before i start formatting, fdisking and mounting them?
|
Posted by Orien, 07-14-2007, 10:29 PM |
fdisk -l
Run that and it'll tell you information about your disks.
|
Posted by shippuuden, 07-14-2007, 10:33 PM |
Hmm ok i fdisked the drive and gave it a number and stuff.
but i get this error when i try to mount. Im trying to mount it in "/home/ani/wwwroot/username/hdd2"
Wich is the directory where my first HDD is, so, will this work? i just made a folder in there called hdd2, i asumed it will mount it in there so when i finished using my first hdd i can upload into hdd2 wich will be the 2nd hdd, is this correct?
|
Posted by AttackerNET, 07-14-2007, 11:19 PM |
Hello,
I will assume the new mounting point as "backup"
1. Copy any data you want to save to another drive.
Don't proceed until you get this done.
2. Unmount /backup by entering "umount /backup"
3. Invoke fdisk.(fdisk /dev/hdd)
4. Delete the partitions. (d command in fdisk)
5. Create the partitions as you want. (n command, answer the prompts. Specify the size of the partition in megs with
+sizeM) (Ex: +80000M = 80GB)
6. Write the new partition table out. (w)
7. Format the new partitions (mkfs.ext3)
8. Label the partitions with e2label. (e2label partition fslabel)
8. Edit /etc/fstab to mount them where you want them.
Thanks,
|
Posted by shippuuden, 07-14-2007, 11:37 PM |
Thanks sys admin i will give this a try. I didnt know i had to format the partition AFTER creating it and stuff.
Also, i get an error when i hit W that sais the kernal is still using the old table untill the server reboots, so i will try reboot the server and do it again.
Also, this new hdd is not going to be used for backup, it is just needed for more space ( its bassicaly a file server that i run ).
I only have 1 person on this server, and he is on the 40GB hdd, and almost used it all up, i want him to be able to use this HDD as well...
So, for example if his acount was in "home/username/www/FILES/"
and if i wanted the new hdd to mount there would i be able to or does it need to be in a complete different place?
|
Posted by Jcink, 07-14-2007, 11:45 PM |
You can do that, yes. You can mount the disk to that folder. Backup was just an example.
|
Posted by shippuuden, 07-14-2007, 11:51 PM |
Ok cool, Will atempt soon.
On a side note, i typed "reboot" into ssh and it sais it was gonna reboot the server, but the server simply died. So ive emailed support lol.
|
Posted by hbhb, 07-15-2007, 12:43 AM |
mkfs.ext3 /dev/sdb
mount -t ext3 /dev/sdb1 /drive2
Does it matter if I don't label the drive?
|
Posted by shippuuden, 07-15-2007, 09:54 AM |
YAY!!! its done and it works!...
to mount it i didnt edit the etc/fstab i just typed "mount /dev/hdb1 /home/user/www/hdd2"
and it simply worked.
This was actually easier to do than i though, but not without the help of people on this forum, thanks to every one that helped!.
|
Add to Favourites Print this Article
Also Read