Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hey I and binding some folders with Code: mount --bind /folder /folder I need to make sure that these are done when I (re)boot the machine. Would that be done ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2004
    Location
    SLC, UT
    Posts
    67

    FSTab and Mount?


    Hey I and binding some folders with

    Code:
    mount --bind /folder /folder
    I need to make sure that these are done when I (re)boot the machine.

    Would that be done in the FSTAB?

    If so can you also help me out with the format?

    I am going to read the MAN on FSTAB (if there is one now )

    ===================
    Read it - still need help! -- Thanks!
    ===================

  2. #2
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Here's the syntax for a bind mount in /etc/fstab

    /my/real/dir /to/mount/dir none rw,bind 0 0

    none - No options associated with mount point (like quotas)
    rw - The mount point is read and writeable.
    bind - The mount point is a bound directory

  3. #3
    Just Joined!
    Join Date
    Aug 2004
    Location
    SLC, UT
    Posts
    67
    Thanks!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    Quote Originally Posted by SilentRage
    Here's the syntax for a bind mount in /etc/fstab

    /my/real/dir /to/mount/dir none rw,bind 0 0

    none - No options associated with mount point (like quotas)
    rw - The mount point is read and writeable.
    bind - The mount point is a bound directory
    in fstab that none would specify that the partition has none fs type. you would need:

    Code:
    /my/real/dir /to/mount/dir <filesystem> rw,bind 0 0
    (i think)
    where filesystem is something like ext2, ext3 reiserfs or vfat
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  6. #5
    Just Joined!
    Join Date
    Mar 2005
    Posts
    13
    sdousley is right. You'll need to put the filesystem in there, or you won't be reading or writing anything.

  7. #6
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    I didn't put anything, and it works for me. It may work differently for mount --bind.

  8. #7
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    mount works so wonderfully on redhat .. isnt it SilentRage ???
    For eg., I use ntfs auto in my fstab with kernel-ntfs installed, and it works peacefully. However same is not the case with other guyz who use, say fc2, or SuSE, maybe.

  9. #8
    Linux Guru Flatline's Avatar
    Join Date
    Feb 2005
    Posts
    2,204
    Actually, many distros (Suse and Mandrake among them) mount ntfs partitions without having to install anything to enable it. Fedora Core uses the same system for mounting ntfs partitions as redhat.
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  10. #9
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    Quote Originally Posted by Flatline
    Actually, many distros (Suse and Mandrake among them) mount ntfs partitions without having to install anything to enable it. Fedora Core uses the same system for mounting ntfs partitions as redhat.
    Why would they change the way it mounts from RedHat to FC?

    Either way, in the fstab, you should put the fstype.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  11. #10
    Just Joined!
    Join Date
    Apr 2005
    Posts
    1

    No fstype

    A bind mount has no fstype, thus you should put no fs type. In any event it's ignored by mount(2). This is because an fstype is used to tell the kernel how to access the device file. Since the device file isn't a device, but rather a directory, telling it to use a directory as a device file make no sense.

    Of course, you could put it there for your own notes, but then the type is already noted in its "real" mount line. And then you'd have to remember to change it anytime the other mount is altered (not a big deal.. shouldn't happen often).

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •