LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-12-2010, 09:14 AM   #1
Dimit
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Does it possible to mount one disk image to some target points?


Hello All!

I try to mount one disk image to two points.

sudo mount -o loop,user,uid=dm /home/dm/mmm/test_drive1.img /home/dm/mmm/fs
sudo mount -o loop,user,uid=dm /home/dm/mmm/test_drive1.img /home/dm/mmm/fs2

Thats done

But when i create,copy or change anything on one mount point (../fs) its not updates on second mount point (../fs2).

Does anyone know way to 'share' one disk image (.img) to some mount points?

Thanks for all!!!
Dmit
 
Old 01-12-2010, 09:41 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
You are not editing the image
 
Old 01-12-2010, 09:54 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by Dimit View Post
Hello All!

I try to mount one disk image to two points.

sudo mount -o loop,user,uid=dm /home/dm/mmm/test_drive1.img /home/dm/mmm/fs
sudo mount -o loop,user,uid=dm /home/dm/mmm/test_drive1.img /home/dm/mmm/fs2

Thats done

But when i create,copy or change anything on one mount point (../fs) its not updates on second mount point (../fs2).

Does anyone know way to 'share' one disk image (.img) to some mount points?

Thanks for all!!!
Dmit
Those are two different mount points.
 
Old 01-12-2010, 10:39 AM   #4
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
i'm just theorizing based on my own experiments. It appears that there's a filesystem/journal cache that is being maintained somewhere. the underlying image is not updated until you umount the fs. 'sync' does not appear to affect it. The issue is that this also can cause data corruption (as I was successful in doing .

simple solution: do not mount the image twice. use the mount --bind option, like so:

mount --bind /home/dm/mmm/fs /home/dm/mmm/fs2

HTH.
-RN.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DD image of whole disk won't mount ctkroeker Linux - General 4 01-13-2009 02:22 PM
Maxtor Onetouch II: symlink points to wrong target Robert S Linux - Hardware 2 12-23-2007 03:26 PM
creating mount points on the unused Hard disk after installation of RedHat Linux ES 4 vamsikatakam Linux - Enterprise 4 03-21-2007 12:55 PM
Mount points on usb devices (dig. camera, zip drive, external hard disk) Impaler Linux - Hardware 3 05-29-2006 11:08 PM
Mount an image as virtual disk KnottyBoy Linux - Software 1 10-19-2005 04:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:21 AM.

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