Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Aug 2002 22:43:18 +0200 (CEST)
From:      "Martin.Kraemer@fujitsu-siemens.com" <Martin.Kraemer@Fujitsu-Siemens.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/41350: vnconfig: apparent off-by-one bug
Message-ID:  <200208052043.g75KhIYp017589@deejai2.mch.fsc.net>

next in thread | raw e-mail | index | archive | help

>Number:         41350
>Category:       bin
>Synopsis:       vnconfig: apparent off-by-one bug
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 05 13:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin.Kraemer@fujitsu-siemens.com
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
Fujitsu-Siemens Computers
>Environment:
System: FreeBSD deejai2.mch.fsc.net 4.6-STABLE FreeBSD 4.6-STABLE #9: Tue Jul 16 10:46:49 CEST 2002 martin@deejai2.mch.fsc.net:/usr/src/sys/compile/DEEJAI4B i386


>Description:
This is a long error report, and I wondered whether I should send it
to freebsd-stable@freebsd.org, or send_pr it to the developers
directly. Because it is a VERY specific problem, I decided on sending
it using send_pr, because freebsd-stable@ is more for the user view.

Below please find several mis-features and errors around mount and vnconfig
which I found while trying to mount ISO images using vnconfig.
I am astonished that I seem to be the first who mentions these problems,
because their effect is quite obvious, and has plagued me since
FreeBSD-4.5-STABLE some time ago. Only now did I find the time to
dig deeper into the strange effects around vnconfig & mount.

I am running a 4.6-STABLE, cvsup'ed last in mid-july 2002.
I configured my kernel to have 16 vn devices:
  pseudo-device   vn      16              # Vnode driver (for vnconfig command)

########################################################################
*** Suggestion ***

It appears that the vnconfig command has support for automatically mounting
the configured device. However, this support is currently limited to the
"ufs" fstype, because there is no documented method for passing the
desired fstype ("-t cd9660") or other options (e.g., "-o ro") to
the mount. That makes it impossible to "vnconfig -a -e" a set of
ISO images and mount them from vnconfig.
Several calls to mount are thus needed to mount the vnconfigured devices
after "vnconfig -a".
Suggestion: extend the syntax to support not only mountro=
            but also opt= and fstype=

########################################################################
*** Suggestion ***
Subject: Improve output of "vnconfig"

When configuring a loopback device, vnconfig prints, e.g., 
  /dev/vn1a: 0 bytes on /home/martin/WWW/FreeBSD-4.6/4.6-disc2.iso
The "0 bytes" information is misleading at best, leading to confusion.
Probably it was meant for the function to create an image in the swap
partition, but it makes no sense for the case where I try and mount
a given file as a file system.
Suggestion: remove the "XXX bytes" info for existing files.


########################################################################
*** Suggestion ***
Subject: Use realpath for "vnconfig"

When configuring a loopback device, specifying an image file path which
crosses symbolic links, vnconfig should use the realpath(3) of the
image file instead of the given path. (IMHO mount should do that too)


########################################################################
*** Suggestion ***
Subject: All-or-nothing approach in case of errors

When configuring a loopback device using "vnconfig -c -e" to enable
additional options given in the vntab lines or on the command line,
an error situation does not report which part of the vn configuration
failed (the "vnconfig -c" part (configure) or the "vnconfig -e" part
(mount)).  When used in a script, it is therefore unclear whether
_nothing_ has been done by vnconfig, or whether part of the action
_was_ executed (and needs to be undone).
Suggestion: A better solution would be to have an "all or nothing"
approach, i.e, when the "vnconfig -e" (mount) fails, then an implicit
equivalent of "vnconfig -u" must internally be executed for the
"vnconfig -c" which was already successfully executed, thus
guaranteeing that the caller need not undo anything if the invocation
failed.

########################################################################
*** Wish ***
Subject: Being able to query the vnconfig'ed devices

Solaris has a "lofiadm" command which can list the configured
loopback devices. FreeBSD seems to have a "write only" configuration:
you can configure, but you must remember what you configured, and
you cannot query "is /dev/vn13a already configured?"
Especially after "vnconfig -a", that is a problem, because if it
returns a non-zero exit code, a script cannot know how much of the
command succeeded, and which devices are still unassigned.
Wish: a "vnconfig -l" to list the configured devices would be nice to have.


########################################################################
*** Error ***
Subject:  apparent builtin limit of 80 chars for the path length of a mount directory

After preparing a (loopback) device using vnconfig, a subsequent
mount of the CD image appears to succeed, but the result returned
by mount is truncated. I mounted /dev/vn13a on
/home/spare1/Debian-3.0/ftp2.de.debian.org/debian-cd/image/3.0_r0/jigdo/i386/CD4
but "mount" prints:
/dev/vn13a on /home/spare1/Debian-3.0/ftp2.de.debian.org/debian-cd/image/3.0_r0/jigdo/i386/CD (cd9660, local, read-only)
(note the missing "4" in ".../CD4"; BTW: the length is 80-1)

(off-by-one error? hitting an unreported internal limit? A mount path should
hold at least 1023 characters, or should return ENAMETOOLONG:
  The mount() function will fail when one of the following occurs:
     [...]
     [ENAMETOOLONG]     A component of a pathname exceeded 255 characters, or
                        the entire length of a path name exceeded 1023 charac­
                        ters.
And at least, mount should complain before hitting this limit.
In my case, I was unable to umount this directory again!!! Had to reboot...)


*** Error ***
Subject: off by one error(s) around vnconfig

When using "vnconfig -a", the vnconfig command sometimes makes a peculiar
error. After mounting the last vn device mentioned in the vntab, a subsequent
attempt to mount this device does not actually mount THIS device,
but instead mounts the contents of /dev/vn0a (again, so two different
mount points now have the same contents).

Another error caused presumably by "vnconfig -a" is that the vn0a
device (for me at least; probably "the first used vn device" rather
than "specifically vn0a") can no longer be unconfigured (although it
can still be used and mounted). See below for the error log.

When I say "sometimes" a peculiar error, it means that the error
depends on the history of "vnconfig -a" commands invoked previously.
For instance, after configuring 7 vn devices for the first time,
the last one shows the error. When increasing the number to 13, again
only the last one is buggy. When reducing the number of vn devices
now to 12, these 12 are all behaving correctly (all increase/decrease
numbers are meant in conjunction with a "vnconfig -a" command, and a
unconfiguration before trying the next test).

The script <<testvn>> which I append shows that this error occurs only
when using "vnconfig -a", not when using individual calls to vnconfig.
The script can be edited to configure the triples <vn_dev>, <iso_file> and
<mountro=dir> for testing purposes. The examples are lines taken from
my /etc/vntab, but you can substitute other triples for your situation.

What the script does:

* Using the configured vntab format lines, it first umounts and unconfigures
  whatever might have been left over from the previous invocation of "testvn".

* Using the configured vntab format lines, it then tries to vnconfig
  and mount all configured image files one-by-one. First, it tries to
  "vnconfig -c -e" (but that fails because I cannot pass the
  options "-t cd9660 -o ro" to vnconfig/mount, and the script does
  an implied "vnconfig -u" -- just in case, see suggestion above).
  Then it tries to "vnconfig -c" the vn device and mounts it on the
  mount point found in the vntab triple (currently, "-t cd9660" only).

* After a successful mount, the contents of the mount points are listed
  into a temporary file (ls -l). This file is later compared against the
  other vn mount points to find the error we are looking for.

* Now all vn mounts are umounted again, and their respective vn devices
  are unconfigured again. This triggers the error message...
    vnconfig: VNIOCDETACH: Device not configured
  when trying to unconfigure the vn0a device (which had been 
  umounted two lines before).

* The second main part of the script now tries a "vnconfig -a -c" 
  in contrast to the individual "vnconfig -c" lines for each vn
  device we invoked above.
  The "vnconfig -a -c" prints an error when trying to configure the
  last device specified in the vntab:
    vnconfig: VNIOCATTACH: Device busy
  and prints its acknowledgement message
    "/dev/vnXXa: 0 bytes on <imagefile>"
  for the remaining vn devices.
  Also, this looks like an off-by-one error.

* Now, we loop over the mount points for the vn devices and re-mount
  them, like in the 1st main part. Then we compare the contents of
  the mount points with the temporary directory listings we made
  above (ls -l) and report any differences. In the case of a
  mismatch, we loop over all the temporary directory listing files to
  see if what we mounted is the contents of one of the OTHER mount
  points. If so, we print that.

* Finally, all vn mounts are umounted again, and their respective
  vn devices are unconfigured again, like above.
  Again, this triggers the error message...
    vnconfig: VNIOCDETACH: Device not configured
  when trying to unconfigure the vn0a device (which had been 
  umounted two lines before).

In the log file, please look for lines containing "Oops:".

I append the script <<testvn>>, then its output <<testvn.log>>
--snip--testvn:
#!/bin/sh
#set -x
vntab=vntab.tmp
cat >$vntab <<.
# Insert the list of vn nodes, ISO images and mount points here:
/dev/vn0a  /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc1.iso mountro=/home/com5/martin/WWW/FreeBSD-4.6/CD1
/dev/vn1a  /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc2.iso mountro=/home/com5/martin/WWW/FreeBSD-4.6/CD2
/dev/vn2a  /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc3.iso mountro=/home/com5/martin/WWW/FreeBSD-4.6/CD3
/dev/vn3a  /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc4.iso mountro=/home/com5/martin/WWW/FreeBSD-4.6/CD4
/dev/vn4a  /home/spare1/ct1.iso mountro=/home/com5/martin/WWW/ct2002/ct1
/dev/vn5a  /home/spare1/ct2.iso mountro=/home/com5/martin/WWW/ct2002/ct2
/dev/vn6a  /home/spare1/ct2002-01.iso mountro=/home/com5/martin/WWW/ct2002/ctrom1
/dev/vn7a  /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd1.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD1
/dev/vn8a  /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd2.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD2
#/dev/vn9a  /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd3.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD3
#/dev/vn10a  /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd4.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD4
#/dev/vn11a /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd5.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD5
#/dev/vn12a /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd6.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD6
#/dev/vn13a /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd7.iso mountro=/home/com5/martin/WWW/SuSE-8.0/CD7
/dev/vn9a /home/spare1/Debian-3.0/debian-30r0-i386-binary-1.iso mountro=/home/spare1/Debian-3.0/CD1
/dev/vn10a /home/spare1/Debian-3.0/debian-30r0-i386-binary-1_NONUS.iso mountro=/home/spare1/Debian-3.0/CD1_NONUS
/dev/vn11a /home/spare1/Debian-3.0/debian-30r0-i386-binary-2.iso mountro=/home/spare1/Debian-3.0/CD2
/dev/vn12a /home/spare1/Debian-3.0/debian-30r0-i386-binary-3.iso mountro=/home/spare1/Debian-3.0/CD3
/dev/vn13a /home/spare1/Debian-3.0/debian-30r0-i386-binary-4.iso mountro=/home/spare1/Debian-3.0/CD4
.

Log()
{
  echo >&2 "`basename $0`: $@"
}

for dir in `grep '^/dev.*mountro=' $vntab | cut -d= -f2`
do
  umount $dir 2>/dev/null && Log "Umounted $dir"
done
mounted="" # We umounted everything, right?

for vn in `grep '^/dev/vn' $vntab | cut -d' ' -f1`
do
  vnconfig -d $vn
  vnconfig -u $vn 2>/dev/null && Log "Un-vnconfig'ed $vn"
  vnconfig -u $vn 2>/dev/null && Log "Un-vnconfig'ed $vn"
done

Log "=================================================="
Log "Mounting the VN's one by one"
mounted=`grep '^/dev/vn' $vntab |
while read line
do
  dev=\`set -- $line; echo $1\`
  iso=\`set -- $line; echo $2\`
  mountpt=\`echo $line | cut -d= -f2\`
  echo "Device $dev from file $iso mount point $mountpt"

  if vnconfig -v -e $dev $iso mount=$mountpt  2>/dev/null
  then
    if mount | grep $dev >/dev/null
    then
      Log "vnconfig $dev succeeded in mounting the ISO image"
      mounted="$dev $mounted"
    else
      Log "vnconfig $dev did not mount, yet returned exit code 0"
    fi
  else
    vnconfig -u $dev 2>/dev/null
    vnconfig -v -e $dev $iso &&
    if mount -t cd9660 $dev $mountpt
    then
      # delete lines 1 and 3
      # line 1 is "total XXXX" (total size includes "..", so depends on size of mnt point)
      # line 3 is ".." (depends on mnt point)
      ls -la $mountpt | sed "1d;3d" >\`basename $dev\`.tmp
      mounted="$dev $mounted"
    fi
  fi
  Log ""
  # Verify that nothing has changed:
  for dev in $mounted
  do
    mountpt=\`mount | grep "^$dev on " | cut -d' ' -f3\`
    ls -la $mountpt | sed "1d;3d" | diff \`basename $dev\`.tmp - || Log "Oops: Mount point $mountpt changed its contents."
#    Log "Verified $dev"
  done
  trap "echo $mounted >&3" 0
done 3>&1 1>&2`

Log "=================================================="
Log "Cleanup  $mounted"
for dev in $mounted
do
  if mount | grep "^$dev on" >/dev/null
  then
    Log "umounting and unconfiguring $dev"
    umount $dev || Log "Oops: could not umount $dev"
    vnconfig -d -u $dev || Log "Oops: could not vnconfig -d -u $dev"
  else
    Log "Oops: Expected $dev to be mounted, but it wasn't"
  fi
done

Log "=================================================="
Log "Try vnconfig -a now"
Log "=================================================="
vnconfig -a -c -v -f $vntab || Log "Oops: could not vnconfig -a -c -v -f $vntab"
mount | grep '^/dev/vn' || Log "Ok, No images are mounted at the moment."

Log "After the 'vnconfig -a', try to mount them:"
mounted='' #reset
mounted=`grep '^/dev/vn' $vntab |
while read line
do
  dev=\`set -- $line; echo $1\`
  iso=\`set -- $line; echo $2\`
  mountpt=\`echo $line | cut -d= -f2\`
  echo "Try: mount -t cd9660 $dev $mountpt "
  if mount -t cd9660 $dev $mountpt
  then
    mountpt=\`mount | grep "^$dev on " | cut -d' ' -f3\`
    if [ _"$mountpt" = _"" ]; then
      Log "Oops - mount succeeded, but $dev is not mounted !?!?!"
    fi
    if ls -la "$mountpt" | sed "1d;3d" | diff \`basename $dev\`.tmp -  >/dev/null
    then
      Log "Ok: $dev has same contents as in the manual vnconfig."
    else
      Log "Oops: contents of $dev $mountpt changed!!!"
      for chk in $mounted \`grep '^/dev/vn' $vntab | cut -d' ' -f1\`
      do
        if [ $dev != $chk ] && ls -la "$mountpt" | sed "1d;3d" | diff \`basename $chk\`.tmp - >/dev/null
	then
	  Log "Looks like $dev (on $mountpt) shows the contents of $chk !!!"
	  break
	fi
      done
    fi
    mounted="$dev $mounted"
  else
    Log "Oops: could not mount -t cd9660 $dev $mountpt"
  fi
  Log ""
  # Verify that nothing has changed:
  for dev in $mounted
  do
    mountpt=\`mount | grep "^$dev on " | cut -d' ' -f3\`
    if [ _"$mountpt" != _"" ]; then
      ls -la $mountpt | sed "1d;3d" | diff \`basename $dev\`.tmp - || Log "Oops: Mount point for $dev changed its contents."
    else
      Log "Could not verify $dev - it is not mounted"
    fi
  done
  trap "echo $mounted >&3" 0
done 3>&1 1>&2`

Log "=================================================="
Log "Cleanup  $mounted"
for dev in $mounted
do
  if mount | grep "^$dev on" >/dev/null
  then
    Log "umounting and unconfiguring $dev"
    umount $dev || Log "Oops: could not umount $dev"
    vnconfig -d -u $dev || Log "Oops: could not vnconfig -d -u $dev"
  else
    Log "Oops: Expected $dev to be mounted, but it wasn't"
  fi
done
Log "=================================================="
--snip--

--snip--testvn.log:
testvn: ==================================================
testvn: Mounting the VN's one by one
Device /dev/vn0a from file /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc1.iso mount point /home/com5/martin/WWW/FreeBSD-4.6/CD1
/dev/vn0a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc1.iso
/dev/vn0a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc1.iso
testvn: 
Device /dev/vn1a from file /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc2.iso mount point /home/com5/martin/WWW/FreeBSD-4.6/CD2
/dev/vn1a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc2.iso
/dev/vn1a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc2.iso
testvn: 
Device /dev/vn2a from file /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc3.iso mount point /home/com5/martin/WWW/FreeBSD-4.6/CD3
/dev/vn2a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc3.iso
/dev/vn2a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc3.iso
testvn: 
Device /dev/vn3a from file /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc4.iso mount point /home/com5/martin/WWW/FreeBSD-4.6/CD4
/dev/vn3a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc4.iso
/dev/vn3a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc4.iso
testvn: 
Device /dev/vn4a from file /home/spare1/ct1.iso mount point /home/com5/martin/WWW/ct2002/ct1
/dev/vn4a: 0 bytes on /home/spare1/ct1.iso
/dev/vn4a: 0 bytes on /home/spare1/ct1.iso
testvn: 
Device /dev/vn5a from file /home/spare1/ct2.iso mount point /home/com5/martin/WWW/ct2002/ct2
/dev/vn5a: 0 bytes on /home/spare1/ct2.iso
/dev/vn5a: 0 bytes on /home/spare1/ct2.iso
testvn: 
Device /dev/vn6a from file /home/spare1/ct2002-01.iso mount point /home/com5/martin/WWW/ct2002/ctrom1
/dev/vn6a: 0 bytes on /home/spare1/ct2002-01.iso
/dev/vn6a: 0 bytes on /home/spare1/ct2002-01.iso
testvn: 
Device /dev/vn7a from file /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd1.iso mount point /home/com5/martin/WWW/SuSE-8.0/CD1
/dev/vn7a: 0 bytes on /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd1.iso
/dev/vn7a: 0 bytes on /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd1.iso
testvn: 
Device /dev/vn8a from file /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd2.iso mount point /home/com5/martin/WWW/SuSE-8.0/CD2
/dev/vn8a: 0 bytes on /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd2.iso
/dev/vn8a: 0 bytes on /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd2.iso
testvn: 
Device /dev/vn9a from file /home/spare1/Debian-3.0/debian-30r0-i386-binary-1.iso mount point /home/spare1/Debian-3.0/CD1
/dev/vn9a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-1.iso
/dev/vn9a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-1.iso
testvn: 
Device /dev/vn10a from file /home/spare1/Debian-3.0/debian-30r0-i386-binary-1_NONUS.iso mount point /home/spare1/Debian-3.0/CD1_NONUS
/dev/vn10a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-1_NONUS.iso
/dev/vn10a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-1_NONUS.iso
testvn: 
Device /dev/vn11a from file /home/spare1/Debian-3.0/debian-30r0-i386-binary-2.iso mount point /home/spare1/Debian-3.0/CD2
/dev/vn11a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-2.iso
/dev/vn11a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-2.iso
testvn: 
Device /dev/vn12a from file /home/spare1/Debian-3.0/debian-30r0-i386-binary-3.iso mount point /home/spare1/Debian-3.0/CD3
/dev/vn12a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-3.iso
/dev/vn12a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-3.iso
testvn: 
Device /dev/vn13a from file /home/spare1/Debian-3.0/debian-30r0-i386-binary-4.iso mount point /home/spare1/Debian-3.0/CD4
/dev/vn13a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-4.iso
testvn: 
testvn: ==================================================
testvn: Cleanup  /dev/vn13a /dev/vn12a /dev/vn11a /dev/vn10a /dev/vn9a /dev/vn8a /dev/vn7a /dev/vn6a /dev/vn5a /dev/vn4a /dev/vn3a /dev/vn2a /dev/vn1a /dev/vn0a
testvn: umounting and unconfiguring /dev/vn13a
testvn: umounting and unconfiguring /dev/vn12a
testvn: umounting and unconfiguring /dev/vn11a
testvn: umounting and unconfiguring /dev/vn10a
testvn: umounting and unconfiguring /dev/vn9a
testvn: umounting and unconfiguring /dev/vn8a
testvn: umounting and unconfiguring /dev/vn7a
testvn: umounting and unconfiguring /dev/vn6a
testvn: umounting and unconfiguring /dev/vn5a
testvn: umounting and unconfiguring /dev/vn4a
testvn: umounting and unconfiguring /dev/vn3a
testvn: umounting and unconfiguring /dev/vn2a
testvn: umounting and unconfiguring /dev/vn1a
testvn: umounting and unconfiguring /dev/vn0a
vnconfig: VNIOCDETACH: Device not configured
testvn: Oops: could not vnconfig -d -u /dev/vn0a
testvn: ==================================================
testvn: Try vnconfig -a now
testvn: ==================================================
/dev/vn0a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc1.iso
/dev/vn1a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc2.iso
/dev/vn2a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc3.iso
/dev/vn3a: 0 bytes on /home/com5/martin/WWW/FreeBSD-4.6/4.6-disc4.iso
/dev/vn4a: 0 bytes on /home/spare1/ct1.iso
/dev/vn5a: 0 bytes on /home/spare1/ct2.iso
/dev/vn6a: 0 bytes on /home/spare1/ct2002-01.iso
/dev/vn7a: 0 bytes on /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd1.iso
/dev/vn8a: 0 bytes on /home/com5/martin/WWW/SuSE-8.0/suse_intel_8.0_prof_cd2.iso
/dev/vn9a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-1.iso
/dev/vn10a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-1_NONUS.iso
/dev/vn11a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-2.iso
/dev/vn12a: 0 bytes on /home/spare1/Debian-3.0/debian-30r0-i386-binary-3.iso
vnconfig: VNIOCATTACH: Device busy
testvn: Oops: could not vnconfig -a -c -v -f vntab.tmp
testvn: Ok, No images are mounted at the moment.
testvn: After the 'vnconfig -a', try to mount them:
Try: mount -t cd9660 /dev/vn0a /home/com5/martin/WWW/FreeBSD-4.6/CD1 
testvn: Ok: /dev/vn0a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn1a /home/com5/martin/WWW/FreeBSD-4.6/CD2 
testvn: Ok: /dev/vn1a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn2a /home/com5/martin/WWW/FreeBSD-4.6/CD3 
testvn: Ok: /dev/vn2a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn3a /home/com5/martin/WWW/FreeBSD-4.6/CD4 
testvn: Ok: /dev/vn3a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn4a /home/com5/martin/WWW/ct2002/ct1 
testvn: Ok: /dev/vn4a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn5a /home/com5/martin/WWW/ct2002/ct2 
testvn: Ok: /dev/vn5a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn6a /home/com5/martin/WWW/ct2002/ctrom1 
testvn: Ok: /dev/vn6a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn7a /home/com5/martin/WWW/SuSE-8.0/CD1 
testvn: Ok: /dev/vn7a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn8a /home/com5/martin/WWW/SuSE-8.0/CD2 
testvn: Ok: /dev/vn8a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn9a /home/spare1/Debian-3.0/CD1 
testvn: Ok: /dev/vn9a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn10a /home/spare1/Debian-3.0/CD1_NONUS 
testvn: Ok: /dev/vn10a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn11a /home/spare1/Debian-3.0/CD2 
testvn: Ok: /dev/vn11a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn12a /home/spare1/Debian-3.0/CD3 
testvn: Ok: /dev/vn12a has same contents as in the manual vnconfig.
testvn: 
Try: mount -t cd9660 /dev/vn13a /home/spare1/Debian-3.0/CD4 
testvn: Oops: contents of /dev/vn13a /home/spare1/Debian-3.0/CD4 changed!!!
testvn: Looks like /dev/vn13a (on /home/spare1/Debian-3.0/CD4) shows the contents of /dev/vn0a !!!
testvn: 
1,15c1,36
< dr-xr-xr-x   8 root    wheel    2048 18 Jul 15:08 .
< dr-xr-xr-x   2 root    wheel    2048 18 Jul 15:08 .disk
< dr-xr-xr-x   2 root    wheel    4096 18 Jul 15:08 .xlp
< -r--r--r--   1 root    wheel   15111 18 Jul 15:08 README.html
< -r--r--r--   1 root    wheel   58004 11 Jul 20:52 README.mirrors.html
< -r--r--r--   1 root    wheel   29126 11 Jul 20:52 README.mirrors.txt
< -r--r--r--   1 root    wheel   17061 11 Jul 20:52 README.non-US
< -r--r--r--   1 root    wheel   10062 18 Jul 15:08 README.txt
< -r--r--r--   1 root    wheel     661 18 Jul 16:22 TRANS.TBL
< dr-xr-xr-x   2 root    wheel    2048 18 Jul 15:08 boot
< lr-xr-xr-x   1 root    wheel       1 18 Jul 15:08 debian -> .
< dr-xr-xr-x   4 root    wheel    2048 18 Jul 15:09 dists
< -r--r--r--   1 root    wheel  114175 18 Jul 15:32 md5sum.txt
< dr-xr-xr-x   2 root    wheel    2048 18 Jul 15:08 pics
< dr-xr-xr-x   4 root    wheel    2048 18 Jul 15:09 pool
---
> dr-xr-xr-x  23 root    wheel     6144 11 Jun 02:14 .
> -r--r--r--   1 root    wheel     4200 11 Jun 01:32 ERRATA.HTM
> -r--r--r--   1 root    wheel     2708 11 Jun 01:32 ERRATA.TXT
> -r--r--r--   1 root    wheel   111873 11 Jun 01:32 HARDWARE.HTM
> -r--r--r--   1 root    wheel    40039 11 Jun 01:32 HARDWARE.TXT
> -r--r--r--   1 root    wheel   102691 11 Jun 01:32 INSTALL.HTM
> -r--r--r--   1 root    wheel    59121 11 Jun 01:32 INSTALL.TXT
> -r--r--r--   1 root    wheel    22502 11 Jun 01:32 README.HTM
> -r--r--r--   1 root    wheel    13811 11 Jun 01:32 README.TXT
> -r--r--r--   1 root    wheel    52233 11 Jun 01:32 RELNOTES.HTM
> -r--r--r--   1 root    wheel    21931 11 Jun 01:32 RELNOTES.TXT
> dr-xr-xr-x   2 root    wheel    18432 11 Jun 01:32 bin
> dr-xr-xr-x   3 root    wheel     4096 11 Jun 01:32 boot
> dr-xr-xr-x   2 root    wheel     4096 11 Jun 01:32 catpages
> -r--r--r--   1 root    wheel       25 11 Jun 01:32 cdrom.inf
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 compat1x
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 compat20
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 compat21
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 compat22
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 compat3x
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 compat4x
> dr-xr-xr-x   2 root    wheel    10240 11 Jun 01:32 crypto
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 dict
> dr-xr-xr-x   2 root    wheel    10240 11 Jun 01:32 doc
> -r--r--r--   1 root    wheel     2963 11 Jun 01:32 docbook.css
> -r--r--r--   1 root    wheel    83155 11 Jun 16:46 filename.txt
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 floppies
> dr-xr-xr-x   2 root    wheel     4096 11 Jun 01:32 games
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 info
> -r-xr-xr-x   3 root    wheel  3773568 11 Jun 01:14 kernel
> dr-xr-xr-x   2 root    wheel     6144 11 Jun 01:32 manpages
> dr-xr-xr-x  65 root    wheel    10240 11 Jun 16:43 packages
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:33 ports
> dr-xr-xr-x   2 root    wheel     2048 11 Jun 01:32 proflibs
> dr-xr-xr-x   2 root    wheel    40960 11 Jun 01:32 src
> dr-xr-xr-x   4 root    wheel     4096 28 Jan  2002 tools
testvn: Oops: Mount point for /dev/vn13a changed its contents.
testvn: ==================================================
testvn: Cleanup  /dev/vn13a /dev/vn12a /dev/vn11a /dev/vn10a /dev/vn9a /dev/vn8a /dev/vn7a /dev/vn6a /dev/vn5a /dev/vn4a /dev/vn3a /dev/vn2a /dev/vn1a /dev/vn0a
testvn: umounting and unconfiguring /dev/vn13a
testvn: umounting and unconfiguring /dev/vn12a
testvn: umounting and unconfiguring /dev/vn11a
testvn: umounting and unconfiguring /dev/vn10a
testvn: umounting and unconfiguring /dev/vn9a
testvn: umounting and unconfiguring /dev/vn8a
testvn: umounting and unconfiguring /dev/vn7a
testvn: umounting and unconfiguring /dev/vn6a
testvn: umounting and unconfiguring /dev/vn5a
testvn: umounting and unconfiguring /dev/vn4a
testvn: umounting and unconfiguring /dev/vn3a
testvn: umounting and unconfiguring /dev/vn2a
testvn: umounting and unconfiguring /dev/vn1a
testvn: umounting and unconfiguring /dev/vn0a
vnconfig: VNIOCDETACH: Device not configured
testvn: Oops: could not vnconfig -d -u /dev/vn0a
testvn: ==================================================
--snip--

>How-To-Repeat:
	See testvn script above
>Fix:
	avoid "vnconfig -a" (not even sure if that cures the problem)
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208052043.g75KhIYp017589>