On CentOS release 6.7, there's file system problem. Aftert reboot /home is set under /home (/home/home) like followings. # ls -l /home total 48 -rw------- 1 root root 7168 Nov 15 19:10 aquota.group -rw------- 1 root root 7168 Jan 25 11:09 aquota.user drwxr-x--- 2 root root 4096 Jan 18 21:55 backups drwxr-xr-x 4 root root 4096 Jan 1 11:59 home drwxr-xr-x 8 root root 4096 Apr 5 01:10 log drwx------ 2 root root 16384 Nov 15 18:58 lost+found drwxr-xr-x 6 mysql mysql 4096 Dec 13 22:34 mysql # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup-lv_root 12778200 2946824 9175608 25% / tmpfs 961176 0 961176 0% /dev/shm /dev/vda1 487652 205564 256488 45% /boot /dev/vdb 41153856 549492 38507212 2% /mnt/extradiskA /dev/vdb 41153856 549492 38507212 2% /home I have set on fstab /home with 'mount bind' but it seems like bind is not effective. /etc/fstab is following. # cat /etc/fstab # # /etc/fstab # Created by anaconda on Mon Jul 28 08:21:01 2014 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/VolGroup-lv_root / ext4 defaults,usrquota,grpquota 1 1 UUID=9a855356-ee00-4ae7-a185-226566ce1dba /boot ext4 defaults 1 2 UUID=093c9b95-8336-4682-9927-132dbdf2f082 /mnt/extradiskA ext4 defaults,usrquota,grpquota 1 2 /dev/mapper/VolGroup-lv_swap swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /mnt/extradiskA/home /home none bind 0 0 /mnt/extradiskA/log /var/log none bind 0 0 /mnt/extradiskA/mysql /var/lib/mysql none bind 0 0 /mnt/extradiskA/.backup /.backup none bind 0 0 /mnt/extradiskA/.daily_backup /.daily_backup none bind 0 0 /mnt/extradiskA/backups /var/backups none bind 0 0
----- Mail original -----> De: "????" <tadao at creative-japan.org> > ?: "centos" <centos at 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. Sylvain. Pensez ENVIRONNEMENT : n'imprimer que si ncessaire
Thank you Sylvain. I want try to use /etc/rc.d/rc.local. Are there any document about writing into /etc/rc.d/rc.local? Tadao 2016-04-12 19:37 GMT+09:00 Sylvain CANOINE <sylvain.canoine at tv5monde.org>:> > > ----- Mail original ----- > > De: "????" <tadao at creative-japan.org> > > ?: "centos" <centos at 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. > > Sylvain. > Pensez ENVIRONNEMENT : n'imprimer que si ncessaire > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
On 04/12/2016 05:37 AM, Sylvain CANOINE wrote:> > > ----- Mail original ----- >> De: "????" <tadao at creative-japan.org> ?: "centos" >> <centos at 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.