[Libburn-hackers] Test request to owners of recent Linux kernels

Thomas Schmitt scdbackup at gmx.net
Sat Oct 10 09:46:11 CDT 2009


i am looking for a tester with a very recent
Linux kernel. It is about the ability to mount
two ISO sessions of the same optical media at the
same time.

(Do we have any FreeBSD users on this list ?)


Linux tests (as superuser):

Number 1: Normal mount behavior of ISO CD or DVD

  mkdir /tmp/mnt1 /tmp/mnt2
  mount /dev/sr0 /tmp/mnt1
  mount /dev/sr0 /tmp/mnt2

On my system the second mount fails
  mount: /dev/sr0 already mounted or /tmp/mnt2 busy
  mount: according to mtab, /dev/sr0 is mounted on /tmp/mnt1

(Most probably this is due to O_EXCL locking of
 Linux mount with block devices. It does not
 happen if i do the same with a disk file and
 mount option "-o loop".)

Number 2: Mount with loop device as proxy

  umount /tmp/mnt1
  mount -o loop /dev/sr0 /tmp/mnt1
  mount -o loop /dev/sr0 /tmp/mnt2

This works for me.
Does it work with the current kernels too ?

If it does not work with block devices:
Does it at least work with an ISO image in a
regular disk file ?


The motivation for this multi-mount is the
wish to compare files in two different
sessions of the same incremental backup.
As superuser:
  # osirrox \
       -outdev /dev/sr2 \
       -mount_opts shared \
       -mount outdev session 1 /mnt1 \
       -mount outdev session 2 /mnt2
  Mounted session 1 of device '/dev/sr2' as directory '/mnt1'
  Mounted session 2 of device '/dev/sr2' as directory '/mnt2'

As normal user:
  $ diff /mnt[12]/thomas/projekte/.../xorriso.c \
    | less

man xorriso (SVN):
 -mount_opts option[:option...]
     Set  options  which  influence  -mount and -mount_cmd. Currently
     there is only  option  "exclusive"  which  is  default  and  its
     counterpart  "shared".  The latter causes xorriso not to give up
     the affected drive with command -mount. On Linux it  adds  mount
     option  "loop"  which may allow to mount several sessions of the
     same block device at the same time. One should not  write  to  a
     mounted  optical  media,  of  course.  Take  care  to umount all
     sessions before ejecting.


Have a nice day :)


More information about the Libburn-hackers mailing list