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 |
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.
|
|
|
07-10-2003, 04:17 AM
|
#1
|
Member
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123
Rep:
|
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?
|
|
|
07-10-2003, 04:48 AM
|
#2
|
Member
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261
Rep:
|
Under X-Windows, there is a system tool named "harddisk information", or something like that.
Under console, try fdisk -l
Qu Chen
|
|
|
07-10-2003, 04:50 AM
|
#3
|
Member
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123
Original Poster
Rep:
|
Thanks. What type of hard disk format is read/writable for both Linux and Windows?
|
|
|
07-10-2003, 04:54 AM
|
#4
|
Member
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261
Rep:
|
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
|
|
|
07-10-2003, 07:20 AM
|
#5
|
Member
Registered: Jul 2003
Location: S. Wales
Distribution: Fedora Core 5, SuSE 9.1 Pro
Posts: 30
Rep:
|
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
|
|
|
07-10-2003, 07:40 AM
|
#6
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep:
|
Quote:
Originally posted by JC404
Thanks. What type of hard disk format is read/writable for both Linux and Windows?
|
All FAT-types.
|
|
|
07-10-2003, 08:12 AM
|
#7
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep:
|
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 hd a1 to hd b1 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.
|
|
|
07-10-2003, 07:53 PM
|
#8
|
Member
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123
Original Poster
Rep:
|
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.
|
|
|
07-10-2003, 11:40 PM
|
#9
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
07-11-2003, 02:24 AM
|
#10
|
Member
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123
Original Poster
Rep:
|
How can I look for the reserved blocks?
|
|
|
07-11-2003, 02:41 AM
|
#11
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
07-11-2003, 04:00 AM
|
#12
|
Member
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123
Original Poster
Rep:
|
[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]#
|
|
|
07-11-2003, 05:43 AM
|
#13
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,637
Rep:
|
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.
|
|
|
07-11-2003, 05:53 AM
|
#14
|
Member
Registered: Dec 2002
Distribution: Red Hat 9
Posts: 123
Original Poster
Rep:
|
I wouldn't use it anymore for Windows. I just want to recover the lost disk space while still using ext2 or ext3.
|
|
|
07-11-2003, 06:08 AM
|
#15
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 02:36 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
|
|