LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2006, 05:34 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
New HDD, mounting trouble


I tried to put a new hdd in my Debian machine today, and even though I thought I did everything correctly it's not mounting properly. Can anyone point out my mistake(s)?

I created two partitions as showing here

Quote:
nix:/dev# fdisk -l /dev/hdc

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 5000 40162468+ 83 Linux
/dev/hdc2 5001 19457 116125852+ 83 Linux
I ran mke2fs -j on them both, and both are showing as ext3 filesystem (matches the rest of my server). If I go into parted it shows both of them

Quote:
(parted) select /dev/hdc
Using /dev/hdc
(parted) print
Disk geometry for /dev/hdc: 0.000-152627.835 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 39221.191 primary ext3
2 39221.191 152625.344 primary ext3
and when I check /etc/fstab I see the following

Quote:
/dev/hdc1 /backup ext3 defaults 0 0
/dev/hdc2 /ftp ext3 defaults,usrquota,grpquota 0 2
but when I try and cd to either /backup or /ftp I get the following errors

Quote:
nix:/dev# cd /ftp
bash: cd: /ftp: No such file or directory
nix:/dev# cd /backup
bash: cd: /backup: No such file or directory
What did I do wrong?
 
Old 01-17-2006, 06:18 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Now that you have created the partitions, you have to mount them before you can cd into them.

You also should make sure you created the mount points. I.e.: cd to /, then su to root. Then mkdir /ftp and mkdir /backup to create the mount points named in /etc/fstab.

Last edited by bigrigdriver; 01-17-2006 at 06:21 PM.
 
Old 01-17-2006, 06:22 PM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
mount /dev/hdc1
mount /dev/hdc2

Also make sure that the mount points are created (/ftp and /backup)
 
Old 01-17-2006, 06:40 PM   #4
steve@ez.net
LQ Newbie
 
Registered: Dec 2005
Distribution: redhat
Posts: 13

Rep: Reputation: 0
If you added a new hard drive then you will have a new device name. You only told us about one device, /dev/hdc.Please send me what are the results if 'df' and 'sfdisk -l' at the command line.
 
Old 01-17-2006, 06:41 PM   #5
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
That's where I screwed up. I didn't realize I had to mkdir /ftp and /backup before fstab would mount them.

Is it usual to have a large amount of overhead with a large drive? Now that I've got them mounted I'm seeing

Quote:
/dev/hdc1 16G 129M 15G 1% /backup
/dev/hdc2 128G 129M 122G 1% /ftp
Combined that's 144gb total, on a 160GB drive. Is it normal to lose 10% under linux?
 
Old 01-17-2006, 09:57 PM   #6
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Remember, 160GB = 160,000,000,000 bytes. Exept the computer reads 1k as 1024, so it's not the full 160.

Stupid naming conventions
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HDD mounting chandu Linux - Newbie 5 08-13-2005 08:12 AM
Mounting HDD HELP!!! westverg Ubuntu 3 07-05-2005 06:12 PM
Mounting hdd linuxmandrake Linux - Newbie 2 11-19-2004 04:20 AM
Mounting Secondary HDD nairnie Linux - Newbie 7 11-17-2003 07:00 AM
Mounting HDD vs. Mounting Filesystem snailophone Linux - Hardware 4 08-12-2003 11:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration