Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Changing Drives, how to change to another drive
andy1974
post Apr 10 2004, 06:29 PM
Post #1


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



ok ......i am in the console and i want to be able to change to drive /hdd1
when i type
# /dev/hdd1

it says permission denied

i am still working on getting a new drive i installed to mount and share :S blink.gif unsure.gif
Go to the top of the page
 
+Quote Post
andy1974
post Apr 10 2004, 06:31 PM
Post #2


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



IAM GOING NUTS HERE....lol.....ANYONE LIVE IN DAYTON OHIO???,.,, COME TO MY HOUSE AND HELP ME oi dry.gif
Go to the top of the page
 
+Quote Post
Jim
post Apr 10 2004, 07:30 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Not how linux works buddy. Sorry, I don't live in Dayton so let me try to help you.

Linux uses a single structure drive system. Everything starts at / and goes down. You can't "change drives." To get to the data thats on hda1 you have to mount it into a folder in the structure. This is usally done in the mnt folder.

Depending on what distro you are using, this may actually already be done. Do this...
# cd /mnt
# ls


I don't know what you are trying to get at since hdd is usally the cd-rom drive on most systems and thus there wouldn't be a 1 at the end. But if its a hard drive, there will probably be a folder called hdd1 you can cd into it and see if your stuff is there. If its not, come back and tell me whats on hdd1 and what format its in and I will tell you how to mount it.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
andy1974
post Apr 10 2004, 07:51 PM
Post #4


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



Ok thanks SO much....ok heres what i am trying to do .....i have a linux fedora file server....i added a 12gb hard drive that i want to share in samba with a directory /Samba
what i was able to do was install the drive to the system fdisk the drive make the filesystem.
no the prob that i am haveing is mounting and then shareing. here are the inscruction someone gave me...any help would be great.... btw the drive id is /hdd it is on the sec ide slave channel.... do i need to move it??
You can add the drive to the computer...

If it is Primary slave, it will be hdb ... If secondary master, it will be hdc ... if it is secondary slave, it will be hdd.

With the new drive installed, boot linux.

Issue the command:

fdisk /dev/hdb <--(or hdc, hdd as appropriate ... make sure NOT to do /dev/hda {your current linux drive})

you will now be at the fdisk prompt ... commands are followed by pressing the enter key (just like at the command prompt).

You can see a list of all commands by pressing m

OK, fisrt thing to do is remove any old partitions (I assume you want to erase this drive and use all the space ... if not, we'll do something else).

Use the command p to print the current partition table.

Now use the command d to remove all partitions (one at a time).

when d no longer works (all partitions are deleted), use the command n to create a new partition...pick primary partiton and if it asks, pick number 1, then accept the defaults for starting and stopping sectors (1 to the end of the drive).

now print the partition table using p ... it should have 1 type 83 (Linux) partition and nothing else. If that is what you want, press w to write these changes (if something isn't right, you can use q to exit without writing changes ... so until you specify w for write, no changes have been made).

Now do fdisk -l ... {that is a lower case l}. You should see 2 drives (once with three partitions ... your boot drive ... once with 1 partition, the new drive).

OK ... we are ready to make a file system on the new drive ... I recommend ext3 for FedoraCore1:

the command to make a new ext3 file system is:

mke2fs -j /dev/hdb1 <--(use hdc1 or hdd1 ... whichever new partition you created)

then change the checks so there are no mounting scans:

tune2fs -c0 -i0 /dev/hdb1
(those are zero's and not O's after -c and -i)

Now you can mount the new drive ... I always mount drives in mount. First, you need to make a directory to mount it in ... I'll call it hdb (if it is /dev/hdc or hdd, you can substitute hdc or hdd)

so ...

mkdir /mnt/hdb

now we want to mount the new drive:

mount -t ext3 /dev/hdb /mnt/hdb

now the command:

df -h

should show a new drive at /mnt/hdb
---------------
To make the drive mount at boot time automatically, do this:

edit /etc/fstab and add this line (I would put it under the other mounts like / and /boot, but above any /proc or usb mounts....)

/dev/hdb1 /mnt/hdb ext3 defaults,user 1 1

(you would substitute hdc or hdd as applicable)

reboot and see if it mounts...

do df -h after logging in...

If it is mounted, you can setup a share and point it to /mnt/hdb ...

when you want to put stuff in there, you put it in /mnt/hdb
Go to the top of the page
 
+Quote Post
Jim
post Apr 10 2004, 08:11 PM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



If you followed those intructions (especially the part about editing the fstab, that the drive is in mnt/hdb and you can access the files there. If you want to mount them into a directory called /samba than you need to make a directory called samba in the file tree. Issue the command mkdir /samba than change the line in your fstab file from
CODE
/dev/hdb1 /mnt/hdb ext3 defaults,user 1 1

to
CODE
/dev/hdb1 /samba ext3 defaults,user 1 1


That will automatically mount the drive into the samba folder. From there you will have to set up your samba server to share the folder. If that doesn't work, than there is a problem with the RAID (I assume the drive is on a RAID system since thats the only way to have more than two harddrives).

If there is a problem you will need to tell us weather its onboard on PCI RAID.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
andy1974
post Apr 10 2004, 08:14 PM
Post #6


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



ok to make the dirctory from console

mkdir /dev/hdd /samba


like that?
Go to the top of the page
 
+Quote Post
andy1974
post Apr 10 2004, 08:15 PM
Post #7


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



its not on a raid controller its on the sec ide slave
Go to the top of the page
 
+Quote Post
Jim
post Apr 10 2004, 08:32 PM
Post #8


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



No, you need to make the samba folder on the drive you have linux installed on. Your than going to mound the hdd into the samba folder on the drive your system is.

Thats how you access the files on any other drive but your install.

Type in the command mount at the command line and that will list everything that is mounted in. If you see hdb in the list it will tell you where its mounted. If you don't understand the list post it and I will explain it to you.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
andy1974
post Apr 10 2004, 08:47 PM
Post #9


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



ok i think it just that i really understand the way the filesystems work ...but i am learning everyday
Go to the top of the page
 
+Quote Post
Jim
post Apr 10 2004, 09:12 PM
Post #10


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



The way linux files systems is very different from the way windows does. Windows has a separate drive tree for each physical drive. A for floppy, C for the center drive D for CD and so on. Linux keeps everything under the /. That’s the top of the tree. Everything goes down from there.

Everything on the same partition as the install will show up naturally. Everything else has to be “mounted” into the file tree. That is you have to create a folder that “points” to that drive. Than when you change to that direction you are essentially changing to the disk or partition. So by creating the folder samba on your installation drive and than mounting hdd into that folder, everything on hdd will show up in samba.

What you are doing by adding that line to the fstab file, you are mounting hdd into /samba automatically. Starting to get it?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
andy1974
post Apr 10 2004, 09:35 PM
Post #11


./configure
***

Group: Members
Posts: 133
Joined: 24-February 04
Member No.: 2,454



yea i think so ....getting clearer
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th December 2017 - 05:12 AM