Re: fstab
On Sun, Mar 18, 2001 at 03:10:28PM +0100, Robin Gerard wrote:
...
> Hello,
> I have added a new hard disk on my machine and I must change my fstab file.
> Can you advise me what how to proced before that all be destroyed yet.
What do you mean with "all be destroyed"? Surely mounting in itself
is not going to destroy things.
> Y have now :
> primary master : hda3 ext2 ; hda2 swap ; hda1 boot (linux)
> slave : hdb1 ext2 (dd added) (linux)
> secondary master : hdc1 (other OS)
What does (dd added) mean? Did you use dd to copy an existing
partition over to this one? Then let's hope they had the same size!
And it's not clear to me what the original setup was, so please show
your current /etc/fstab. Sizes would be interesting to, e.g. you could
use /dev/hda3 to house /home.
> My questions :
> Q1. Is it possible to mount hdb1 for example in /usr/local and to use
> /usr/local as befor i.e.put the source of soft and compile it as usual ?
The moment you'll mount a filesystem (in this case an ext2 filesystem
on partition /dev/hdb1) on a mountpoint (i.e an existing directory,
here /usr/local) you'll hide all original content of the directory
used as mountpoint. So normally only empty directories are used as
mountpoints. And when appropriate the old content of a non-empty
yet-to-become-mointpoint directory is transfered with tar to the new
yet-to-be-mounted partition. This is done by temporarely mounting
that new partition on say /mnt, like (don't do this now, first tell
us what that (dd added) ment!):
# mount -t ext2 /dev/hdb1 /mnt
# tar -clf- -C /usr/local . | tar -xpf- -C /mnt
[[ use "info tar" or "tar --help" to read up on the
purpose of those flags ]]
> In this case is the new line in fstab suitable ? :
>
> /dev/hdb1 /usr/local ext2 defaults,user 0 2
^^^^^ This gives all
users the power to
remount that partition
and hence do anything
to any file on it.
Better leave it out.
The purpose of the fifth field is to tell the dump program whether to
dump that partition or not, if you don't use dump zero here will do.
The purpose of the sixth field is to tell fsck at boot time the order
in which partitions have to be checked: 0 for don't check, 1 for the
(real) root partition and 2 for all other. This information is readily
available trough the following commands:
$ man mount
$ man fstab
> Q2. Is it possible to use hdb1 like the extension of hda3 i.e. when hda3
> is full the new package.deb will be installed automatically on hdb1 ?
Yes it is by having the kernel treat several partitions as if they
were on long partition, but I've no experience with it, even forget
how it's named.
--
groetjes, carel
Reply to:
- References:
- fstab
- From: "Robin Gerard" <robin.jag@free.fr>
- Re: fstab
- From: Carel Fellinger <cfelling@iae.nl>
- Re: fstab
- From: "Robin Gerard" <robin.jag@free.fr>