LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-02-2009, 04:17 AM   #1
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Rep: Reputation: 37
Overlapping loop mounts?


This is just a trivial question here...I would like to know:

I mount $SC/starcraft.iso in to /mnt/cdrom
I then mount $SC/broodwar.iso to /mnt/cdrom.

Are BOTH mounted at the same time but i can only access one of them?

the thing is that i get this:

Code:
[~]$ mount
[more]
tmpfs on /dev/shm type tmpfs (rw)
/dev/loop0 on /mnt/cdrom type iso9660 (rw)
/dev/loop1 on /mnt/cdrom type iso9660 (rw)
So both are mounted but of course i can only access one of them.
when I umount broodwar then I can access Starcraft...

So is that normal?
 
Old 09-02-2009, 05:22 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
Yes.

When you mount a file system to a mount point the contents of that file system become the only files that exist at the mount point.

Any files that existed under the mount point before will be hidden by the newly mounted file system.

Try not to confuse the issue of mounting two file systems at the same mount point as that makes no difference only the order of the mounting counts.
 
Old 09-03-2009, 05:05 AM   #3
trhodes
LQ Newbie
 
Registered: Sep 2009
Posts: 17

Rep: Reputation: 1
If you want to see both filesystems mounted at the same place:
http://slackbuilds.org/result/?search=aufs&sv=

UnionFS is another option, is somewhat harder to install, but is somewhat more featureful:
http://www.filesystems.org/project-unionfs.html
 
Old 09-03-2009, 07:41 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by RaptorX View Post

So is that normal?
As normal as a very normal thing. You probably want one of the options mentioned above, but another option -I don't know starcraft/broodwar, and what will work them- might be to use separate mount points for the two.
 
Old 09-03-2009, 08:07 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I have noticed that in sw64 13.0 when you mount an iso as loopback you can't unmount it by trying to unmount the iso, you must unmount the '/dev/loop0'. It's kind of odd, because in the past you could use the name of the iso.

Still, you should not mount more than one thing in the same place.
 
Old 09-03-2009, 09:09 AM   #6
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
I have noticed that in sw64 13.0 when you mount an iso as loopback you can't unmount it by trying to unmount the iso, you must unmount the '/dev/loop0'. It's kind of odd, because in the past you could use the name of the iso.
I've just tried that as a test and noticed it in Slackware 13 (32 bit) . As you said it was different in 12 but I always unmount from the mount point so have not noticed this before.

If you look there is a difference in the record stored in /etc/mtab for the mount. SW 12 stores
Code:
/opt/VirtualBox/additions/VBoxGuestAdditions.iso /mnt/cdrom iso9660 rw,loop=/dev/loop0 0 0
for an iso mounted via the loop device. Slackware 13 shows :
Code:
/dev/loop0 /mnt/cdrom iso9660 rw 0 0
for a loop mounted iso. The mount command reports this difference.

Last edited by bgeddy; 09-03-2009 at 09:12 AM.
 
Old 09-03-2009, 11:49 AM   #7
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
well the question came since I expected that when I mount an iso on the same mount point as the other one (/mnt/cdrom in this case) then mount would automatically umount the previous fs that was in that mount point. I though that that was the "normal" behavior and was little startled when I had to umount TWICE to clean /mnt/cdrom...

I know unionfs (which slax uses) and I am planning to use it in a small personal pkg manager.
So it is not that i am looking forward to see both fs' in the same folder since I am aware that unionfs can give you that 'ability'.
 
Old 09-03-2009, 11:56 AM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
well the question came since I expected that when I mount an iso on the same mount point as the other one (/mnt/cdrom in this case) then mount would automatically umount the previous fs that was in that mount point.
Well I must admit I thought the same till I started experimenting given this thread. I too thought mounting something new to an already mounted mount point unmounted the previous mount and it was lost. I didn't think they "stacked up" like they seem to ! I think I'll be looking into this further as things like that interest me. I'm glad you brought this up !
 
Old 09-08-2009, 04:19 PM   #9
RaptorX
Member
 
Registered: Jun 2009
Location: Emden, Germany
Distribution: Slackware 12.2, Slax 6.1
Posts: 254

Original Poster
Rep: Reputation: 37
no problem
 
Old 09-09-2009, 03:45 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
bgeddy -you are onto something interesting. You can actually make thnigs in the lower mount point visible at the same time as those from the last mount -but not mixed like with unionfs.

Try something like this:
1. mount some partition on a given mount point.
2. create or copy some fs image into the mount point, if not already there.
3. use losetup to associate an fs image (*.iso or whatver) with a loop device
4. then mount a new partition on the original mount point. The fs image from above and any other files from the original mount are now invisible.
5. mount the loop device created above on a new mount point. Now you have access to the fs image file from the 'lower' mount point.

You can also, instead of using losetup, use the 'mount --bind ....' command to make the contents of the first mount visible through some other directory.

The use of losetup this way is pretty common in initrd's -you can associate files with devices and the devices are still available after doing switch_root. Fun stuff!
 
  


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
Stop cronjobs overlapping ? MikeAtVillage Linux - General 6 05-23-2008 01:08 AM
Overlapping Text in compiz TomalakBORG Linux - Desktop 1 04-27-2008 05:32 AM
partition overlapping w-mar Linux - Enterprise 3 02-13-2007 10:55 AM
Overlapping text in putty keberus Linux - Server 4 08-12-2006 05:12 AM
Funky overlapping display Jimi_l Debian 9 08-10-2004 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:36 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