LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2003, 04:17 AM   #1
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Rep: Reputation: 15
Second Hard Drive Mounting Problems


I formatted a second hard drive (hdb1) as ext2. I can mount it but my problem is that under /etc/fstab, I can't find hdb1 even after mounting the 2nd hard drive. What am I doing wrong?

Also, is there a way to know the hdd space available for the hard drives and partitions under Linux like in Windows Explorer?

Finally, I'm wary on storing my backups on the 2nd hard drive because I'm not sure if it's really detected. I might resort to Windows just to check if my files are really getting stored. What format is read/writable under both Linux and Windows?
 
Old 07-10-2003, 04:48 AM   #2
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
Under X-Windows, there is a system tool named "harddisk information", or something like that.
Under console, try fdisk -l

Qu Chen
 
Old 07-10-2003, 04:50 AM   #3
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
Thanks. What type of hard disk format is read/writable for both Linux and Windows?
 
Old 07-10-2003, 04:54 AM   #4
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 31
The role, from my experience, is:

Under windows, you have no way to read or write files (except for the partition magic or some equivalent software).

Under Linux9, you can get the access to ext2, ext3, FAT16 and FAT32.

Qu Chen
 
Old 07-10-2003, 07:20 AM   #5
tefal
Member
 
Registered: Jul 2003
Location: S. Wales
Distribution: Fedora Core 5, SuSE 9.1 Pro
Posts: 30

Rep: Reputation: 15
Also, for finding out how much space is left, you could type "df -h" This produces a human readable format of space available including % used.

As for the second hard disk. Just installing it in the machine doesn't make it automatically appear 'fstab'. Once mounted it should appear in 'mtab' though. To make it Windows readable, format it as FAT16/32 (32 best), and mount it somewhere where to read and write to.

Also, if you have a network installed, using Samba you can then share the folder over the network. (This works for both ext2 and FAT32).

-Tefal
 
Old 07-10-2003, 07:40 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Rep: Reputation: Disabled
Quote:
Originally posted by JC404
Thanks. What type of hard disk format is read/writable for both Linux and Windows?
All FAT-types.
 
Old 07-10-2003, 08:12 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Rep: Reputation: Disabled
Re: Second Hard Drive Mounting Problems

Quote:
Originally posted by JC404
I formatted a second hard drive (hdb1) as ext2. I can mount it but my problem is that under /etc/fstab, I can't find hdb1 even after mounting the 2nd hard drive. What am I doing wrong?
You expect too much . You have only one partition on hdb? you can do that, but make sure you don't waste disk space. Now. Edit /etc/fstab manually. Copy the line for your first disk's first partition (hda1) and just change hda1 to hdb1 and the file type part (NTFS?) to ext2. Then reboot and you should see hdb1. You can test it beforehand with manually mounting hdb1.

Quote:
Originally posted by JC404
Also, is there a way to know the hdd space available for the hard drives and partitions under Linux like in Windows Explorer?
Type du at the command prompt (man du). KDE and Gnome have pretty graphical tools.

Quote:
Originally posted by JC404
Finally, I'm wary on storing my backups on the 2nd hard drive because I'm not sure if it's really detected. I might resort to Windows just to check if my files are really getting stored. What format is read/writable under both Linux and Windows?
See my previous post.
 
Old 07-10-2003, 07:53 PM   #8
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
Thanks for the replies.

I'm now having problems with the disk space on the 80gb hard drive. I partitioned this hard drive with Partition Magic as ext2. Now it seems that the 80gb hard drive is now recognized as 70gb. I know that the 80gb is actually just 76 or 78gb but it's still a lot of wasted space.

[root@localhost root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 4.9G 2.3G 2.4G 49% /
/dev/hda1 99M 9.1M 85M 10% /boot
none 251M 0 251M 0% /dev/shm
/dev/hdb1 70G 8.1G 58G 13% /mnt/hdd
[root@localhost root]#

hdb1 is the supposedly 80g. Help.
 
Old 07-10-2003, 11:40 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
This is most likely due to the 10% reserves. It's something you can use tune2fs for, see man tune2fs and look for:
-m reserved-blocks-percentage
Change that to less, something like 2 or 1 (1 is probably too little, 2 is sufficient).

Cool
 
Old 07-11-2003, 02:24 AM   #10
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
How can I look for the reserved blocks?
 
Old 07-11-2003, 02:41 AM   #11
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
In man mke2fs it says:
Quote:
-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks
reserved for the super-user. This value defaults
to 5%.
So my 10% was only slightly off
Also, if you haven't changed it, then it's likely that's where it's at.

Cool
 
Old 07-11-2003, 04:00 AM   #12
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
[root@localhost hdd]# mke2fs -m 2 /mnt/hdd
mke2fs 1.32 (09-Nov-2002)
/mnt/hdd is not a block special device.
Proceed anyway? (y,n) mke2fs -m 2/dev/hdb1
[root@localhost hdd]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 4.9G 2.3G 2.4G 49% /
/dev/hda1 99M 9.1M 85M 10% /boot
none 251M 0 251M 0% /dev/shm
/dev/hdb1 70G 8.1G 58G 13% /mnt/hdd

It's still the same amount before I tried mke2fs. What am I doing wrong?



This is what shows up on hdb when I fdisk -l

Disk /dev/hdb: 80.0 GB, 80054059008 bytes
255 heads, 63 sectors/track, 9732 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 9731 78164226 83 Linux
[root@localhost hdd]#
 
Old 07-11-2003, 05:43 AM   #13
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637

Rep: Reputation: Disabled
Why do you try to repair something you wont use anyhow?

You have to reformat the drive for a FAT file system, if you want to access it from windows (or to repartition and to format the partitions).

fdisk lets you set the last cylinder manually. Try that.
 
Old 07-11-2003, 05:53 AM   #14
JC404
Member
 
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123

Original Poster
Rep: Reputation: 15
I wouldn't use it anymore for Windows. I just want to recover the lost disk space while still using ext2 or ext3.
 
Old 07-11-2003, 06:08 AM   #15
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
I think what they were trying to suggest is to use linux fdisk to remove create a new partition.
fdisk /dev/hdd
And then go from there. Use 'm' to read the help, but here's basically the keys you'll look for:
p to list the current partitions
n to create new one(s)
d to delete the current/old ones
And finally, if you are satisfied:
w to save changes.
If you aren't happy with the change:
q to quit without saving.

Then you'll need to create a filesystem on it, at which point you can also specify how much reserve space you want used
mke2fs -j /dev/hddX
Where X is probably 1, but it's the partition(s) you created during fdisk.

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting hard drive thug_poet22 Linux - Hardware 14 01-04-2005 02:11 AM
Mounting a Hard Drive Bill413 Linux - Newbie 6 11-15-2004 05:19 PM
Hard drive mounting problems in Suse 8.2 njdevilsd Linux - Hardware 3 08-29-2003 06:12 AM
having problems when mounting an iso on the hard drive k0ljat Linux - Software 2 05-17-2003 01:08 AM
Mounting hard drive Runt888 Linux - Newbie 1 08-29-2001 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02: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