Hello

I had a power failure yesterday morning and because of that my server went down 
because of no battery present.
When trying to mount the crypto partitions, I have figured out its not possible 
anymore because a set of 2 errors, as follows:

# sh cryptfs -m -p /home -f /crypto/home/cryptofile -d /dev/svnd0c
Encryption key:
mount_ffs: /dev/svnd0c on /home: specified device does not match mounted device
#

and then, when trying again :

# sh cryptfs -m -p /home -f /crypto/home/cryptofile -d /dev/svnd0c
Encryption key:
vnconfig: VNDIOCSET: Device busy
mount_ffs: /dev/svnd0c on /home: specified device does not match mounted device
#


For further reference , cryptfs script is the following:

#!/bin/sh
#
# cryptfs
#
# mount/unmount blowfish encrypted filesystem
#
# Important Note:  Under OpenBSD's current encrypted vnd filesystem
# implementation, when a system with a mounted, encrypted  vnd filesystem
# is shutdown uncleanly, the encrypted vnd filesystem's structures get
# damaged and, since OpenBSD's fsck will not acknowledge vnd filesystems,
# these damaged structures can not reasonably be repaired.
#
# 12/19/01

#
# Set user defined defaults
#

cryptfile=/crypto/home/cryptfile
cryptmnt=/home
svnd=/dev/svnd0c

#
# Get arguments
#

while getopts muf:p:d:vh option
do
  case "$option"
  in
    m)   mount="yes"
         ;;
    u)   umount="yes"
         ;;
    f)   cryptfile="$OPTARG"
         ;;
    p)   cryptmnt="$OPTARG"
         ;;
    d)    svnd="$OPTARG"
         ;;
    v)   verbose="-v"
         ;;
    h) echo "Usage: cryptfs [-vh] -m|u [-f cryptfile ] [-p mntpoint] [-d svnd]"
         echo "  -m             mount encrypted filesystem"
         echo "  -u             unmount encrypted filesystem"
         echo "  -f cryptfile   cryptfile (default = $cryptfile)"
         echo "  -p mntpoint    mount point (default = $cryptmnt)"
         echo "  -d svnd        svnd  device (default = $svnd)"
         echo "  -v             verbose"
         echo "  -h             help"
         exit 1
         ;;
  esac
done

#
# Check syntax
#

if [ -n "$mount" -a -n "$umount" ]
then
  /bin/echo "syntax error: use -h for help"
  exit
fi

#
# Make sure we are on an OpenBSD system
#

if [ "`/usr/bin/uname -s`" != "OpenBSD" ]
then
  /bin/echo "os error: this must be an OpenBSD system"
  exit
fi

#
# mount encrypted filesystem
#

if [ -n "$mount" ]
then
  [ $verbose ] && /bin/echo "mounting encrypted filesystem ..."
   /usr/sbin/vnconfig -ck $verbose $svnd $cryptfile
  sleep 1
  /sbin/mount -o softdep,nosuid,nodev -f $svnd $cryptmnt
  [ $verbose ] && /bin/echo "             mounted on $cryptmnt"
  exit
fi

#
# unmount encrypted filesystem
#

if [ -n "$umount" ]
then
  [ $verbose ] && /bin/echo "unmounting encrypted filesystem ..."
  /sbin/umount $cryptmnt
  sleep 1
  /usr/sbin/vnconfig -u $verbose $svnd
  exit
fi


Any advice / suggestions is highly recommended as I fear loosing my data, even 
if I am sure there has to be a solution to this FS problem.
Thank you all in advance.
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to