hard disk mount
Rick Stevens
rstevens at vitalstream.com
Wed May 26 21:12:16 UTC 2004
abdulahad shaikh wrote:
> Hello
> i have installed linux 9 on 20 gb hdd the partition is
> as follows
> /
> /boot
> /swap the first hdd is identified as hda .
>
> i have connected a new hdd of 6 gb as hdb i
> partitioned with parted and labeld it as data with
> e2label and the fs type as ext2 and made the necessary
> changes in the /etc/fstab.
> and created the mount point in mnt dir as data and
> tried to mount it says mount point not found.
> the hdd hda is os of ext3
>
> have i left out any thing else other than this
> ...plz....thanks
Ok, so you used parted on /dev/hdb and made a single partition.
You then used:
mke2fs /dev/hdb1
to format it and
e2label /dev/hdb1 /mnt/data
to label it, right? (NOTE: The "e2label" command is completely
optional). Then you edited /etc/fstab and added a line such as:
/dev/hdb1 /mnt/data ext2 defaults 0 0
and did
mkdir /mnt/data
to create the mount point, right? If so, then the following three
commands are exactly equivalent:
mount /dev/hdb1
mount /mnt/data
mount /dev/hdb1 /mnt/data
and should mount the new drive at /mnt/data. If you DIDN'T do the
/etc/fstab stuff, then you MUST use the third command:
mount /dev/hdb1 /mnt/data
If yu used the e2label command as I have shown, then the /etc/fstab line
could read either as I show above or this way:
/mnt/data /mnt/data ext2 defaults 0 0
<soap>
Personally, I don't like using filesystem labels in the /etc/fstab
file. It can confuse things mightily. Assume you have, say, Red Hat 9
installed and decide to put in a new drive with Fedora on it.
1. Make your current drive the slave
2. Put in a new drive as master
3. Install Fedora on new drive (remember, the installer will use
e2label and label the partitions with the mountpoint names)
4. Reboot
Since you now have two disks, each with partitions labeled the same,
will the system mount the old hard drive's partitions or the new
drive's? There's really no way to predict and you can have some MAJOR
weirdness happen. If you use the physical device names, that's not an
issue as the device names are unambiguous.
Filesystem labels have a use with removable media (USB drives, ZIP
disks, etc.), but only as long as they can't confuse the OS when it
boots and runs the "mountall" (or "mount -a") command. In other words,
when you boot a machine, there should only be one filesystem with the
"/" label, one with the "/usr" label, one with the "/var" label, etc.
If you have more than one, you're asking for trouble.
</soap>
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- If this is the first day of the rest of my life... -
- I'm in BIG trouble! -
----------------------------------------------------------------------
More information about the Redhat-install-list
mailing list