Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 178699 - sys-fs/cryptsetup-luks-1.0.3-r2 fails to take down dm-crypt loop devices.
Summary: sys-fs/cryptsetup-luks-1.0.3-r2 fails to take down dm-crypt loop devices.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Benjamin Smee (strerror) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-15 23:10 UTC by Stephan Dale
Modified: 2007-08-14 16:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to remove "source" mappings (dmstop.patch,609 bytes, patch)
2007-07-04 16:38 UTC, Markus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Dale 2007-05-15 23:10:59 UTC
I recently replaced cryptsetup with cryptsetup-luks-1.0.3-r2 (the only modification to config necessary was to change mount= to target=). The existing loopback files 'mounted' properly but on shutdown they could not be taken down, with the following message (from memory, so is not cut-and-paste accurate):

ioctl: LOOP_CLA_FD. Device or resource busy.

I upgraded my kernel to the latest 2.6.18-gentoo-r6 and updated the system to the latest packages in portage.

Replacing cryptsetup-luks with cryptsetup-0.1-r3 fixed the problem.

Encrypted swap went down ok.

My /etc/conf.d/cryptfs (for cryptsetup-luks) was as follows:

[begin /etc/conf.d/cryptfs]

swap=crypt-swap
source='/dev/sda7'

# dm-crypt

target='crypt-tmp'
source='/dev/loop0'
loop_file='/tmp.img'
options='-d /dev/urandom'
pre_mount='/sbin/mkreiserfs -f -f ${dev}'
post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'

# Loopback files

target='crypt-bn'
source='/dev/loop1'
options='-c serpent -s 256'
loop_file='/home/bn.img'

target='crypt-steph'
source='/dev/loop2'
options='-c serpent -s 256'
loop_file='/home/steph.img'

[end]

Reproducible: Always

Steps to Reproduce:
1. Replace cryptsetup with cryptsetup-luks-1.0.3-r2
2. Change mount= to target= in /etc/conf.d/cryptfs.
3. Reboot.
4. Shutdown.

Actual Results:  
dm-crypt loop devices could not be taken down, with the following message:

ioctl: LOOP_CLA_FD. Device or resource busy.

Expected Results:  
dm-crypt loop devices are taken down with no errors or warnings.
Comment 1 Stephan Dale 2007-05-17 18:08:09 UTC
I just want to make clear that when I said "I upgraded my kernel to the latest 2.6.18-gentoo-r6 and updated the system to the latest packages in portage" I meant before I installed cryptsetup-luks.
Comment 2 Markus 2007-07-04 16:38:09 UTC
Created attachment 123890 [details, diff]
patch to remove "source" mappings
Comment 3 Markus 2007-07-05 15:35:18 UTC
I missed the added target for loop... the conf needs an update.