Gentoo Archives: gentoo-user

From: Ramon Fischer <Ramon_Fischer@×××××××.de>
To: Dale <rdalek1967@×××××.com>, Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] cryptsetup close and device in use when it is not
Date: Mon, 12 Jul 2021 13:14:52
Message-Id: AM6PR10MB24408E57A6AE1995B837329AEF159@AM6PR10MB2440.EURPRD10.PROD.OUTLOOK.COM
In Reply to: Re: [gentoo-user] cryptsetup close and device in use when it is not by Dale
1 OK, if it could be "udev", you might want to try to check the following:
2
3 $ grep -rF "<part_of_uuid>" /etc/udev/rules.d/
4 $ grep -rF "<part_of_uuid>" /lib/udev/rules.d/
5 $ grep -rF "<part_of_uuid>" /etc
6
7 You could also try to search for the partition device, maybe there will
8 be some interesting configuration files.
9
10 If you are using "systemd", you might want to check every service unit
11 file as well:
12
13 $ systemctl
14
15 Recently, I had a similar issue with "cryptsetup" on Raspbian, where the
16 "/etc/crypttab" was faulty, which may be applicable here. It had the
17 following entry:
18
19 # <accident_paste_with_uuid> # <target name> <source device> [...]
20 <entry1>
21 <entry2>
22
23 Therefore, the systemd service unit
24 "systemd-cryptsetup@dev-disk-by\x2duuid-#<accident_paste_with_uuid> #
25 <target name> <source device> [...]" - if I remember correctly - failed.
26 It seems, that "systemd-cryptsetup-generator" only searches for matching
27 UUIDs in "/etc/crypttab", even, if they are commented and creates
28 service units for each match in "/run/systemd/generator/".
29 I remember, that I had issues to access the hard drive. Nevertheless, I
30 was able to mount it normally, due to the other correct entry(?).
31
32 By removing the accidentally pasted UUID from "/etc/crypttab" and
33 rebooting, I was able to use the hard drive without issues again.
34
35 Maybe this is something, where you could poke around? :)
36
37 -Ramon
38
39 On 12/07/2021 10:31, Dale wrote:
40 > Ramon Fischer wrote:
41 >> Interesting.
42 >>
43 >> I have some other ideas, but this is really grasping at straws. Create
44 >> a backup of the backup drive before doing any tests, since you have to
45 >> move it a lot for this:
46 >>
47 >>    1. Connect the hard drive to a different eSATA port
48 >>    2. Try another eSATA cable
49 >>    3. Try to mount the hard drive on different devices
50 >>    4. Try different hard drive cases with different connection types
51 >>    (Maybe you have a better enclosure with USB or even FireWire, which
52 >>    does not damage your drive?)
53 >>    5. Connect it internally via SATA and try to mount it
54 >>    6. Mirror the hard drive to a second hard drive and try to mount the
55 >>    second one
56 >>
57 >> I think, this would entirely cover Layer 1 of the OSI Layer Model[1]. :)
58 >>
59 >> -Ramon
60 >>
61 >> [1] https://en.wikipedia.org/wiki/OSI_model
62 >>
63 >
64 > That's a lot of effort.  It's annoying it doesn't close like it should
65 > but doing all that would be a tedious task as well.  It would eliminate
66 > a lot of potential causes tho.  Thing is, I think it's a software issue
67 > not hardware.
68 >
69 > To add to this, the 6TB drive just did the same thing.  I had been using
70 > UUID to mount it since it was working.  After getting the same problem
71 > as the other drive, I changed it.  It took some effort to get it to
72 > close but restarting lvm and friends did eventually get it to close.  I
73 > then changed it to mount by label like I been doing with the 8TB drive.
74 >
75 > I think by just continuing to note what it is doing, eventually the
76 > problem will show itself.  Personally, I sort of wonder if it is a udev
77 > problem or lvm.  Thing is, a lot of this software works together so
78 > closely, it's hard to know where one stops and the other starts.
79 >
80 > I finished my backups to the 8TB drive and it worked start to finish
81 > with no errors at all.  I guess we'll see what happens next week with
82 > the 6TB drive.  See if it starts to work again with no problem or still
83 > has issues of some kind.  So far, mounting by label seems to have worked
84 > well for the 8TB drive.
85 >
86 > Will update again as things move along.
87 >
88 > Dale
89 >
90 > :-)  :-)
91
92 --
93 GPG public key: 5983 98DA 5F4D A464 38FD CF87 155B E264 13E6 99BF

Attachments

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

Replies

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