On 04/12/2016 05:37 AM, Sylvain CANOINE wrote:


----- Mail original -----
De: "望月忠雄" <ta...@creative-japan.org> À: "centos"
<centos@centos.org> Envoyé: Mardi 12 Avril 2016 08:17:13 Objet:
[CentOS] mount bind problem

I have set on fstab /home with 'mount bind' but it seems like bind
is not effective.
Indeed. By default, nothing mounts "bind" filesystems. The init
scripts don't read the hole fstab file, there are filters to mount
only some filesystems types. If you want to mount the "bind" FS on
boot, you need to add the related commands into /etc/rc.d/rc.local.

Nonsense!  I'm also running CentOS 6.7 and have several bind-mounts
in my /etc/fstab:

   /var/home            /home           none  bind   0 0
   /var/lib/libvirt/etc /etc/libvirt    none  bind   0 0
   /srv/news            /var/spool/news none  bind   0 0

All of them occur automatically when the system boots.  The
"mount -a" in /etc/rc.d/rc.sysinit takes care of them just fine.
The filter on that command is _excluding_ certain types.  Note
that the first two letters are "no", which applies to all the
listed types:

mount -a -n -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2i,glusterfs -O no_netdev

[rkn] ~ $ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_omega3g-rootvol
                      11963960   5995348   5337828  53% /
tmpfs                  8194160       340   8193820   1% /dev/shm
/dev/sda1               689128    130200    508752  21% /boot
/dev/mapper/vg_omega3g-var
                      38166008   8282340  27921892  23% /var
/dev/mapper/vg_omega3g-srvlv
                     564310312 360619492 175002488  68% /srv
/dev/mapper/vg_omega3g-virt
                     194274580 119917252  64617656  65% /var/lib/libvirt
tmpfs                  2097152       652   2096500   1% /tmp
[rkn] ~ $ df /home /etc/libvirt /var/spool/news
Filesystem           1K-blocks      Used Available Use% Mounted on
/var/home             38166008   8282340  27921892  23% /home
/var/lib/libvirt/etc 194274580 119917252  64617656  65% /etc/libvirt
/srv/news            564310312 360619508 175002472  68% /var/spool/news

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.

_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos

Reply via email to