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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-17-2006, 06:34 PM
|
#1
|
Member
Registered: Mar 2005
Posts: 141
Rep:
|
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?
|
|
|
01-17-2006, 07:18 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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 07:21 PM.
|
|
|
01-17-2006, 07:22 PM
|
#3
|
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181
Rep:
|
mount /dev/hdc1
mount /dev/hdc2
Also make sure that the mount points are created (/ftp and /backup)
|
|
|
01-17-2006, 07:40 PM
|
#4
|
LQ Newbie
Registered: Dec 2005
Distribution: redhat
Posts: 13
Rep:
|
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.
|
|
|
01-17-2006, 07:41 PM
|
#5
|
Member
Registered: Mar 2005
Posts: 141
Original Poster
Rep:
|
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?
|
|
|
01-17-2006, 10:57 PM
|
#6
|
Senior Member
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181
Rep:
|
Remember, 160GB = 160,000,000,000 bytes. Exept the computer reads 1k as 1024, so it's not the full 160.
Stupid naming conventions
|
|
|
All times are GMT -5. The time now is 05:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|