How to write /etc/fstab entry for –bind mounting?

How to write /etc/fstab entry for --bind mounting like

mount --bind /home/hadoop/hdfs/store-tmp 
/home/store/tmp

From man 8 mount:

Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is

mount --bind olddir newdir

or shortoption

mount -B olddir newdir

or fstab entry is:

/olddir /newdir none bind

Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *