Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mounting a new hard drive 4

Status
Not open for further replies.
Aug 12, 2004
949
US
All

I am a LINUX newbie and I have added a 80 GIG hard drive in a Linux box (redhat 8 server) and have used fdisk and formatted it in ext3 file system.

I want to use it for file storage with SAMBA and would like to know how to create a mount point /dev/hdb (my new drive). Once I get this, I should be able to create a share in Samba to point to this drive, correct?

Thanks,

Erik
 
Make a new directory to mount your disk to :

Code:
mkdir /new_disk

The edit /etc/fstab

There should be an entry for /dev/hda1

Copy this line, and change "hda1" to "hdb1"

Then mount it on a different directory (ie not "/" like for the primary disk).

Something like this :

Code:
/dev/sda1       /new_disk               ext3    defaults,errors=remount-ro 0

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Rather, more like this :

Code:
/dev/hdb1       /new_disk               ext3    defaults,errors=remount-ro 0

Then reboot

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I have this:

My share I want to be called net-progs, so this is what I have in the fstab file.

/dev/hdb /net-progs ext3 defaults 0,0

(This is what my swap was except is was hda7

But, it still doesn't work after reboot.

When I try mounting I get this:

/mount /dev/hdb

mount: mount point /net-progs does not exist

Any ideas as to what I am doing wrong?

Erik
 
Is it not /dev/hdb1 rather than /dev/hdb ? (I may not be ofcourse).

Are you sure you have made the directory /net-progs ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I have made the directory b/c if I try again it says the /mnt/net-progs File exists.

??

 
Yes, but that is '/mnt/net-progs' - not '/net-progs' - which are surely not different directories ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
That's true, OK, I did the mkdir /net-progs and in the fstab file I tried hdb1 and I am rebooting. I will let you know.

Erik
 
So if I try mount /net-progs now it says:

can't find /net-progs in /etc/fstab or /etc/mtab

But, I have it in there as:

dev/hdb1 /net-progs ext3 defaults 0,0

Is this wrong, what's the issue?
 
I am sorry, I had a typo:

I have /dev/hdb1 in my fstab

Any other direction/ideas?

Erik
 
You shouldn't have a comma between 0,0, just a space.

What does it say if you tune2fs -l /dev/hdb1?

Annihilannic.
 
erikhertzel,

this is a lot of confusion for a very straight forward task.


First I have a feeling that you confuse your samba share with the label name in fstab.

assuming that you have correctly done your partitioning formati it as follows

Code:
mkfs.ext3 -L /myOtherDisk /dev/hdb1

this will format it ext3 and label it MyOtherDIsk.
This has nothing to do with your samba share.

now let's assume you want to mount it on

/disk2

NOw in fstab add

Code:
LABEL=/myOtherDisk   /disk2    ext3   defaults  1 2

Now you have a new disk called myOtherDIsk formatted ext3 mounted on /disk2.

Still nothing to do with samba.

now edit your /etc/samba.smb.conf file and add the following

Code:
[net-progs]
   path = /disk2
   comment = network projects share
   public = yes
   writable = yes
   browseable = yes


Now you have a windoz network share called net-progs public with no restriction to anyone.


Cheers

QatQat





Life is what happens when you are making other plans.
 
QatQat said:
this is a lot of confusion for a very straight forward task.
[/code]

I have to say I resent that comment slightly.
There is not a lot to confuse about doing a single 'mkdir' command, and then editing fstab.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Hi sedj,

apoplogies if it came out bad. I did not mean to be derogatory at any point, I was referring at a very high number of postings for a quick task.


Sincere apologies.

QatQat

Life is what happens when you are making other plans.
 
OK,

I did everything that was indicated here (sorry about the confusion). I knew this wasn't hard, but I have never done it before.

So, at this point I rebooted and get a message saying "Couldn't find matching filesystem: LABEL=/myOtherDisk FAILED

It drops me into a shell. I made sure that formatted the drive like you said with this command:

mkfs.ext3 -L /myOtherDisk /dev/hdb1

Then, I went into fstab and made the changes you indicated. Finally, I edited my smb.conf with the appropriate changes.

I thought I might need to mount disk2 and tried this but it sayd "no such partition found"

What did I do wrong here? I am a LINUX newbie, so I apologize in advance if I am missing something simple. Am I in trouble not that I can't boot?

Thanks

Erik
 
BTW: Thanks for all the help so far guys, I really appreciate you hanging with me here...stars in order, esp. for all the confusion. Just need to fix this last little issue, I think.

Cheers,

Erik
 
can you try to execute


mount /dev/hdb1 /disk2


QatQat

Life is what happens when you are making other plans.
 
That command worked and then I rebooted, but I am still getting the couldn't find matching filesystem: LABEL=myOtherDisk

***An error occured during tyhe file system check
***Dropping you to a shell.

??
 
Is there anything else I can do at this point, or do I have to start over on rebuilding the server?

Thanks,

Erik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top