Re: is it possible to mount only a part of a device?

From: Norbert (noaddress_at_none.de)
Date: 03/13/04


Date: Sat, 13 Mar 2004 01:25:23 +0100


"John-Paul Stewart" <jpstewart@binaryfoundry.ca> schrieb im Newsbeitrag
news:itgt2c.ui.ln@mail.binaryfoundry.ca...

> Put the above commands into to one of the rc scripts that'll run at boot
> time. /etc/rc.local or equivalent would be a good choice. (The exact
> file varies by distribution.) Just make sure the commands are run near
> the end of the boot process, after /etc/fstab has been processed.

It is a solution for /home/Peter/data and /home/John/data.
But for /tmp (see below) it has to be done very early,
since I don't know, which processes need /tmp during the start.

> > What do you think about this (using a shared FAT32 partition)?
>
> FAT filesystems don't support Unix-style owners and permissions. I
> think it's a very bad idea, unless you intend to mount /tmp with the
> "umsdos" filesystem (which I hear is slow to access).

o.k. convinced.

> I wouldn't worry about files in /tmp being deleted by one operating
> system and needed by the other. On Linux you should not assume the
> contents of /tmp will be available after a reboot. This is specified in
> at least one of the filesystem standards and several distros will clean
> out /tmp at each boot anyway. Similarly, the common recommendation for
> Windows users who wish to manually clear their temp directory is that
> they can safely delete any files created prior to the last reboot. So I
> don't see the need to seperate the two OSes into their own directories
> on your /tmp filesystem. Neither OS expects any temp files to be there
> after a reboot.

Hmm. Let me tell you something, what happened today:
I installed Fedora, everything worked fine. Then I saw that there are
some files in /tmp. These files were related to the XFree-Server.
I planned to mount /tmp to the FAT-partition (yes, I won't do it again :->).
This couldn't be done at the installation, since Disk Druid (the
partition-tool
of Fedora) didn't allow mounts to FAT partitions.
For adding the mount to /etc/fstab, I thought that /tmp has to be empty
(now I know that even nonempty directories can be "mount points").
So I changed to runlevel 2. There were still files in /tmp. So I decided
to reboot ("shutdown -r now" from runlevel 2)
with Knoppix (a distro on CD), mounted the Fedora filesystem
and did the changes to /etc/fstab of Fedora. I also deleted the files,
which still were remaining in /tmp of Fedora. I rebootet and ---- the
XFree-Server of Fedora couldn't start. It was looking for a file
/tmp/.X0-lock or something similar. I forgot the exact name.
Maybe that this was just a result of the unusual shutdown,
but thing like this can happen anytime.

So, if two installations (say two Linux installations) share a partition
(say ext3) for their /tmp, these /tmp should better be mounted to
different directories in this partition. It's saver, even if under normal
conditions both directories are never used at the same time.

Norbert



Relevant Pages

  • Re: Error 16: Inconsistent filesystem structure
    ... the book's Fedora Live CD and I created ext3 partitions which I had ... Which disk and partition is grub installed to? ... I can mount the NTFS drive and I can mount sdb2 if I don't specify the ...
    (Fedora)
  • Mount Problem
    ... I have data on /dev/sda1 and I want to mount this ... partition on my file system. ... Fedora 9 is installed on an external USB hard drive. ... After the install was complete and Fedora 9 was booted, ...
    (comp.os.linux.setup)
  • Re: dual boot Fedora / Mandrake
    ... > I would like to install on the same machine Fedora Core 1 and Mandrake ... I would like to see my home partition ... Mount from Fedora: ...
    (comp.os.linux.setup)
  • Re: /etc/fstab changed
    ... Without moving back to orginal fstab file, ... I lost my mounted partition. ... After reboot, I get ... you could mount whatever partition ...
    (comp.unix.solaris)
  • Re: hardisk full
    ... mount the appropriate partition on each. ... > one filesystem at a time and use the other partition as the location to ... > c: Reboot ...
    (Fedora)