Find the answer to your Linux question:
Results 1 to 4 of 4
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 ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    1

    Does it possible to mount one disk image to some target point?

    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

  2. #2
    Just Joined! REVEREND_FLIBBLE's Avatar
    Join Date
    Jun 2007
    Posts
    26
    my first thought would be to use links, but I am unsure weather this would accomplish your goal. I am also unable to test this currently, so the commands may be slightly different.


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

    There may be much better ways to do this. I am still getting used to certain things in linux, and do not have very much exposure to this sort of stuff

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by Dmit 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
    This is very dangerous. You are likely to end up with a corrupted image. Mount to one (common) point, and then make the other one a soft link to that one. Multiple mounts to one hardware device is ok, but to a disc image file I think you are asking for trouble.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Nov 2004
    Location
    Utrecht, The Nederlands
    Posts
    2
    Hi Dmit,

    Maybe the -B, --bind mount options.

    Cheers

    Ali

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...