Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 150068 Details for
Bug 232276
Kernel hangs working with crypted loop device
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
A script in use
worker.sh (text/plain), 5.41 KB, created by
Artem S. Tashkinov
on 2007-03-14 17:27:59 UTC
(
hide
)
Description:
A script in use
Filename:
MIME Type:
Creator:
Artem S. Tashkinov
Created:
2007-03-14 17:27:59 UTC
Size:
5.41 KB
patch
obsolete
>#! /bin/sh > >#---------------------------------------------------------------------- ># Description: dm-crypt management over loop device with ext3fs ># Author: Artem S. Tashkinov aka birdie ># Created at: Sat Dec 9 17:26:37 YEKT 2006 ># Computer: localhost ># System: Linux 2.6.9-42.0.3.ELsmp on i686 ># ># Copyright (c) 2006 Artem S. Tashkinov aka birdie All rights reserved. ># License: GPL2 >#---------------------------------------------------------------------- > >SIZE=102400 # In megabytes. You can increase it maximum 1024fold! >ENCFILE='cache-00$N.dat' # Encrypted filename >DESTDIR='/mnt/cache$N' # A folder where encrypted disk images get mounted >ENCDISK='cryptdisk$N' >LOOPDEV='/dev/loop$N' > >WDIR=/root/.private # A folder to store encrypted disk images > >set -e # Let's get out if any command fails > >die() >{ > echo "$*" > exit 1 >} > >ask2go() >{ > echo -n "$* ... continue (n)? " > read a > test "$a" = "y" -o "$a" = "Y" || exit 1 >} > >initme() >{ > export ENCFILE=`eval echo $ENCFILE` > export ENCDISK=`eval echo $ENCDISK` > export LOOPDEV=`eval echo $LOOPDEV` > export DESTDIR=`eval echo $DESTDIR` >} > >assign() >{ > test -z "$1" && die "Give me a number from 0 to 7" > test "$1" -ge 0 -a "$1" -le 7 || die "[$1] is not a number from 0 to 7" > N=$1 > initme > echo "Trying to assign $ENCFILE ..." > echo "1. Assigning loop device $N" > test -z "`losetup /dev/loop$N 2>/dev/null | grep $ENCFILE`" && losetup $LOOPDEV $ENCFILE || die "Losetup LOOPDEV already assigned" > echo "2. Assigning crypto device, please enter a password: " > cryptsetup create $ENCDISK $LOOPDEV > echo "3. Mounting cryptdevice (with fsck'ing): " > mkdir -p $DESTDIR || die "Cannot create mount point" > e2fsck -v /dev/mapper/$ENCDISK > mount -t ext3 -o noatime,errors=remount-ro /dev/mapper/$ENCDISK $DESTDIR || die "Cannot mount" > echo "OK" >} > >disassign() >{ > test -z "$1" && die "Give me a number from 0 to 7" > test "$1" -ge 0 -a "$1" -le 7 || die "[$1] is not a number from 0 to 7" > N=$1 > initme > echo "Trying to disassign $ENCFILE ..." > echo "1. Unmounting cryptdevice: " > umount /dev/mapper/$ENCDISK || ask2go "Cannot unmount" > echo "2. Removing crypto device " > cryptsetup remove $ENCDISK || ask2go "Failed removing" > echo "3. Deleting loop device $N" > losetup -d /dev/loop$N || ask2go "Failed dislooping" > echo "OK" >} > >create() >{ > test -z "$1" && die "Give me a number from 0 to 7" > test "$1" -ge 0 -a "$1" -le 7 || die "[$1] is not a number from 0 to 7" > N=$1 > initme > echo "Trying to setup $ENCFILE ..." > echo "1. Creating file of $SIZE MB" > test -f $ENCFILE && die "File $ENCFILE already exists" > dd if=/dev/zero of=$ENCFILE bs=1M count=$SIZE || die "Cannot create $ENCFILE" > echo "2. Assigning loop device $N" > test -z "`losetup /dev/loop$N 2>/dev/null | grep $ENCFILE`" && losetup $LOOPDEV $ENCFILE || die "Losetup LOOPDEV already assigned" > echo "3. Creating crypto device, please enter a password twice: " > cryptsetup -y create $ENCDISK $LOOPDEV > echo "4. Formatting crypto device" > mke2fs -j -O dir_index /dev/mapper/$ENCDISK >/dev/null || die "mk2fs failed!" > echo "5. Mounting cryptdevice: " > mkdir -p $DESTDIR || die "Cannot create mount point" > mount -t ext3 -o noatime,errors=remount-ro /dev/mapper/$ENCDISK $DESTDIR || die "Cannot mount" > echo "OK" >} > >delete() >{ > test -z "$1" && die "Give me a number from 0 to 7" > test "$1" -ge 0 -a "$1" -le 7 || die "[$1] is not a number from 0 to 7" > N=$1 > initme > echo "Trying to delete $ENCFILE ..." > echo "1. Unmounting cryptdevice: " > umount /dev/mapper/$ENCDISK || ask2go "Cannot unmount" > echo "2. Removing crypto device " > cryptsetup remove $ENCDISK || ask2go "Failed removing" > echo "3. Deleting loop device $N" > losetup -d /dev/loop$N || ask2go "Failed dislooping" > echo "4. Erasing file" > /bin/rm -iv $ENCFILE > echo "OK" >} > > >grow() >{ > test -z "$1" && die "Give me a number from 0 to 7" > test "$1" -ge 0 -a "$1" -le 7 || die "[$1] is not a number from 0 to 7" > N=$1 > initme > test ! -f "$ENCFILE" && die "Cannot find $ENCFILE" > test -n "`df | grep $ENCDISK`" -o "`losetup $LOOPDEV 2>/dev/null | grep $ENCFILE`" && die "Please, disassign at first!" > test -z "$2" && die "Give me number of MB to grow" > test ! "`echo $2/$2 | bc 2>/dev/null`" -eq 1 && die "[$2] must be a number" > echo "1. Growing file" > seek=`stat -c%s $ENCFILE` > seek=`echo $seek/1048576 | bc` > dd if=/dev/zero of=$ENCFILE bs=1M count=$2 seek=$seek conv=notrunc || die "Growing of $ENCFILE failed" > echo "2. Assigning loop device $N" > test -z "`losetup /dev/loop$N 2>/dev/null | grep $ENCFILE`" && losetup $LOOPDEV $ENCFILE || die "Losetup LOOPDEV already assigned" > echo "3. Assigning crypto device, please enter a password: " > cryptsetup create $ENCDISK $LOOPDEV > echo "4. Growing crypto device" > cryptsetup --verbose resize $ENCDISK || die "Growing failed" > echo "5. Mounting cryptdevice: " > mkdir -p $DESTDIR || die "Cannot create mount point" > mount -t ext3 -o noatime,errors=remount-ro /dev/mapper/$ENCDISK $DESTDIR || die "Cannot mount" > echo "6. Growing filesystem" > ext2online -C 0 --verbose /dev/mapper/$ENCDISK || die "Growing failed" > echo OK >} > >test "$UID" -ne 0 && die "Must be a superuser to continue!" > >test ! -d $WDIR && die "Cannot find $WDIR" >cd $WDIR || die "Cannot enter $WDIR" > >case "$1" in > assign) > assign $2 > ;; > disassign) > disassign $2 > ;; > create) > create $2 > ;; > grow) > grow $2 $3 > ;; > delete) > delete $2 > ;; > status) > status > ;; > *) > echo $"Usage: $0 {create|grow|delete|assign|disassign|status}" > exit 1 >esac
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 232276
: 150068