LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-31-2009, 02:00 PM   #1
pendal
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Rep: Reputation: 0
1 Mount 2 Locations


I am working on updating a some software in our building that uses a few mounted drives over the network.

they are mounted using cifs (the shares are from a windows machine).

I want to change the mounting structure a bit to optimize some code.

is there anyway I can temporarily make the mount show up in two places

/mnt/oldStorage/mountName (original location)

and

/mnt/storage/mountName (new location)

if i try to mount it a second time it tells me it's already mounted.

I was hoping to optimize the software code and then when it's all working remove old mount points.

is there anyway to make that mount show up in two places at once?
and then also ... what would i need to do to correctly remove the old mount point and then the "link" to it?

I know how to add the new new mounts later.

Thanks in advance,
-P


****sorry i realized this is probably the wrong forum for this .. please move it if you need to****

Last edited by pendal; 08-31-2009 at 02:03 PM.
 
Old 08-31-2009, 02:04 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
How about
Code:
/bin/ln -s /mnt/oldStorage/mountName /mnt/storage/mountName
or the other way around if you prefer (but the mount must be on the actual directory, not on the symlink)
 
Old 08-31-2009, 02:08 PM   #3
pendal
LQ Newbie
 
Registered: Jun 2009
Posts: 12

Original Poster
Rep: Reputation: 0
ok cool ...

so i'm thinking i will wait until later tonight after hours and re-mount the drives under the correct new locations.

then issue the ln to the old directories.

if the eastern side of the U.S. melts away ... I did something wrong

Thanks,
-P
 
Old 08-31-2009, 02:11 PM   #4
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
You can remount a mounted directory using the bind option. See the mount manpage:
Code:
       The bind mounts.
              Since Linux 2.4.0 it is possible to remount part of the file
              hierarchy somewhere else. The call is
                     mount --bind olddir newdir
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL 5.2 log locations to debug an NFS mount tongar Red Hat 8 08-12-2009 12:53 PM
mount fat32 partition in several different locations with individual uid/gid BigMomma Linux - Newbie 4 09-05-2007 10:34 AM
Locations Yull29m Linux User Groups (LUG) 3 01-13-2007 02:01 PM
mount same device at multiple locations merlin23 Linux - Newbie 2 12-06-2004 07:16 AM
App locations Where do they go?? mcgrath0087 Linux - Newbie 2 02-14-2004 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration