Gentoo Archives: gentoo-user

From: Frank Steinmetzger <Warp_7@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cryptsetup close and device in use when it is not
Date: Sun, 25 Jul 2021 20:30:11
Message-Id: YP3JvifkTInJsxl2@kern
In Reply to: Re: [gentoo-user] cryptsetup close and device in use when it is not by Dale
1 Am Wed, Jul 07, 2021 at 01:08:55PM -0500 schrieb Dale:
2
3 > root@fireball / # blkid | grep dde669
4 > /dev/mapper/8tb: LABEL="8tb-backup"
5 > UUID="0277ff1b-2d7c-451c-ae94-f20f42dde669" BLOCK_SIZE="4096" TYPE="ext4"
6 > root@fireball / # ls /dev/disk/by-uuid | grep dde669
7 > 0277ff1b-2d7c-451c-ae94-f20f42dde669
8 > root@fireball / #
9
10 I followed this thread, and couldn’t remember ever having the same issue.
11 But today I was bitten: It’s a 3 TB external USB drive from Intenso.
12
13 Yesterday I was in the middle of a backup (it’s my main backup drive), but I
14 had to sleep and so sent the machine into standby. I had to start the PC
15 again a few minutes later in order to unmount an sshfs of it on another
16 machine, and sent it right back to sleep.
17
18 Just now I switched the PC back on and the drive was gone and off (USB
19 enclosures tend to spin down the drive when USB disconnects). So I pulled
20 the USB cable and plugged it back in for the drive to start and be
21 rediscovered. That worked and I resumed the backup, but this enclosure has
22 the nasty habit of sometimes intermittently disconnecting on its own.
23
24 Its device was not gone (it usually disconnects for a tiny moment and then
25 comes back, probably a USB issue), so I just tried to open it again in
26 Dolphin, which gave me:
27 Error unlocking /dev/sdd1: Failed to activate device: File exists
28
29 $ blkid | grep luks
30 /dev/mapper/luks-6a55a712-773e-4cd8-9776-fc9b6f39a998: LABEL="backup" UUID="50ed9519-cd9c-4d11-b78a-9f057b089362" BLOCK_SIZE="4096" TYPE="ext4"
31
32 $ ls -l /dev/disk/by-uuid/6a55a*
33 lrwxrwxrwx 10 root 2021-07-25 21:34 /dev/disk/by-uuid/6a55a712-773e-4cd8-9776-fc9b6f39a998 -> ../../sdd1
34
35 $ lsblk
36 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
37 […]
38 sdd 8:48 0 2,7T 0 disk
39 └─sdd1 8:49 0 2,7T 0 part
40
41 $ mount | grep -E 'luks|sdd'
42 [nothing]
43
44 $ cryptsetup luksClose luks-6a55a712-773e-4cd8-9776-fc9b6f39a998
45 Device luks-6a55a712-773e-4cd8-9776-fc9b6f39a998 is still in use.
46
47 I don’t quite like this bad habit of the enclosure, but a 3 TB drive is a 3
48 TB drive. I just looked at smart to see how old it is, because it has only
49 350 hours of power-on time, but it must be at least 5 years old. And
50 smartctl tells me there is a firmware update available! (for Windows, Mac
51 and—lo and behold—a bootable ISO, let’s hope it works with USB sticks).
52
53 Perhaps this fixes the issue. Dale, maybe you should look for the same.
54
55 --
56 Grüße | Greetings | Qapla’
57 Please do not share anything from, with or about me on any social network.
58
59 Emacs is a great operating system, which only lacks a good editor.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] cryptsetup close and device in use when it is not Dale <rdalek1967@×××××.com>