PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Loopback Encrypted Filesystem and VMWare


Your Ad Here

Your Ad Here

Failed to set uid : Resouce temporarily unavailable
Hello, We have a production Redhat Enterprise Linux 4 server that is used as a: 1. File Server (Samba) 2. Print Server (Cups-PDF) 3. Database Server (MySQL...

On Thu, 16 Feb 2006 16:15:36 -0700, Douglas Mayne

I modified this startup script to do a better job of cleaning up after itself. It makes multiple attempts to clear mounts and loopback devices. WAG: VMWare may be slow to release locks on open files causing a simple umount command to fail. Bad things happen when loopbacks are not closed properly at shutdown.

#!-bin-bash #Purpose: A script to launch vmware using virtual machine stored on # encrypted file system # # copyright (c) 2006 Douglas D. Mayne # Use of this software is subject to this license: # EWD=$(pwd) MP=-mnt-efs T1=$(-home-util-tmpfile.scr) for TRY1 in 0 1;do $TRY1 -ne 0 && continue $# -ne 1 && continue ! -e $T1 && continue ! -e $1 && continue modprobe cryptoloop lsmod grep cryptoloop continue L1=$(losetup -f) # mount grep "${MP}" && continue ! -e $MP && mkdir $MP # # Three attempts at pbuttword on loopback encrypted file # BF=0 for j in 1 2 3;do $j -ne 1 && losetup -d $L1 echo Pbuttword Attempt $j losetup -e serpent $L1 $1 mount $L1 $MP if $? -eq 0 ;then else continue fi BF=1 && break done $BF -eq 0 && continue ! -e ${MP}-vmware && continue # # Looks good for startup # killall -i busyloop nice ~-busyloop & childp=$! vmware kill -1 $childp break done # # Clean up: temp file has successful ops to be undone # cd $EWD for TRY2 in 0 1;do echo Second Try Loop... $TRY2 -ne 0 && continue $LC -eq 0 && break # # Try to umount loopback # if $LC -eq 2 ;then MP=$(cat $T1 head -2 tail -1) BF=0 for i in $(seq 1 5); do if $? -eq 0 ;then else sleep 5 fi done if $BF -eq 0 ;then echo "Could not umount: $MP ..." echo "umount and remove loopback manually..." continue else echo "Loopback mount: $MP umounted on attempt $i" fi fi # # Try to delete loopback device # BF=0 for i in $(seq 1 5); do if $? -eq 0 ;then else sleep 5 fi done if $BF -eq 0 ;then echo "Could not remove loopback device: $L1 ..." echo "Remove loopback manually..." continue else echo "Loopback device $L1 deleted on attempt $i" fi break done # # Give the user a hint of what happened. # if $TRY2 -ne 0 ;then echo "NOTICE: There are errors to be handled manually." fi rm $T1 echo "Press any key to exit ..." read $TRY1 -eq 0 && $TRY2 -eq 0 && exit 0 exit 1 # -- end script

Changing hard drives and GRUB
I wish to replace my 7200rpm EIDE drives with 10,000rpm SCSI ones (my other 4 drives are already 10,000rpm SCSI drives). Now ondev-hda1 is theboot parbreastion...

-- Douglas Mayne



Your Ad Here

List | Previous | Next

Failed to set uid : Resouce temporarily unavailable

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Loopback Encrypted Filesystem and VMWare