Hi!
I intend to mount a directory in another location with "mount --bind" and I wanted to know if there is a way to automate this by putting it somewhere like /etc/fstab. I can put it in /etc/init.d/rc.local but I would rather do this in a more "elegant" way.
Carlos Rodrigues
On Fri, 2003-10-24 at 16:18, Carlos Rodrigues wrote:
Hi!
I intend to mount a directory in another location with "mount --bind" and I wanted to know if there is a way to automate this by putting it somewhere like /etc/fstab. I can put it in /etc/init.d/rc.local but I would rather do this in a more "elegant" way.
"mount --bind" is the same as "mount -o bind", so a line like
/my/old/dir /my/new/dir none bind 0 0
should work.
Nils
On Friday 24 October 2003 17:41, Nils Philippsen wrote:
On Fri, 2003-10-24 at 16:18, Carlos Rodrigues wrote:
Hi!
I intend to mount a directory in another location with "mount --bind" and I wanted to know if there is a way to automate this by putting it somewhere like /etc/fstab. I can put it in /etc/init.d/rc.local but I would rather do this in a more "elegant" way.
"mount --bind" is the same as "mount -o bind", so a line like
/my/old/dir /my/new/dir none bind 0 0
should work.
Nils
Works, I have a lot of --bind mounts. The only problem is I am getting something like "umount2: can't unmount ...., not mounted" when rebooting, which is ignorable - no damage/problems caused to the fs at all... I think it has to do something with my "crossmounts" (--bind inside --bind-ed dir). I do --bind my /var/ftp to /var/www/html/ftp and some yum stuff inside bouth.
On Tue, 2003-10-28 at 07:54, Doncho N. Gunchev wrote:
On Friday 24 October 2003 17:41, Nils Philippsen wrote:
On Fri, 2003-10-24 at 16:18, Carlos Rodrigues wrote:
Hi!
I intend to mount a directory in another location with "mount --bind" and I wanted to know if there is a way to automate this by putting it somewhere like /etc/fstab. I can put it in /etc/init.d/rc.local but I would rather do this in a more "elegant" way.
"mount --bind" is the same as "mount -o bind", so a line like
/my/old/dir /my/new/dir none bind 0 0
should work.
Nils
Works, I have a lot of --bind mounts. The only problem is I am getting something like "umount2: can't unmount ...., not mounted" when rebooting, which is ignorable - no damage/problems caused to the fs at all... I think it has to do something with my "crossmounts" (--bind inside --bind-ed dir). I do --bind my /var/ftp to /var/www/html/ftp and some yum stuff inside bouth.
Please file this in Bugzilla -- though I don't know what component is guilty (kernel ./. util-linux(mount) ./. initscripts) ;-).
Nils