LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Second Hard Drive Mounting Problems (https://www.linuxquestions.org/questions/linux-newbie-8/second-hard-drive-mounting-problems-71499/)

JC404 07-10-2003 04:17 AM

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?

captainstorm 07-10-2003 04:48 AM

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

Qu Chen

JC404 07-10-2003 04:50 AM

Thanks. What type of hard disk format is read/writable for both Linux and Windows?

captainstorm 07-10-2003 04:54 AM

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

tefal 07-10-2003 07:20 AM

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

JZL240I-U 07-10-2003 07:40 AM

Quote:

Originally posted by JC404
Thanks. What type of hard disk format is read/writable for both Linux and Windows?
All FAT-types.

JZL240I-U 07-10-2003 08:12 AM

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.

JC404 07-10-2003 07:53 PM

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.

MasterC 07-10-2003 11:40 PM

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

JC404 07-11-2003 02:24 AM

How can I look for the reserved blocks?

MasterC 07-11-2003 02:41 AM

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

JC404 07-11-2003 04:00 AM

[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]#

JZL240I-U 07-11-2003 05:43 AM

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.

JC404 07-11-2003 05:53 AM

I wouldn't use it anymore for Windows. I just want to recover the lost disk space while still using ext2 or ext3.

MasterC 07-11-2003 06:08 AM

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 10:36 PM.