Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #56141

Can crypsetup --type plain destroy a previous written partition?

From Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt>
Newsgroups alt.os.linux
Subject Can crypsetup --type plain destroy a previous written partition?
Date 2019-05-09 21:14 +0100
Organization Aioe.org NNTP Server
Message-ID <qb21mk$eti$1@gioia.aioe.org> (permalink)

Show all headers | View raw


Hi all!

Can crypsetup --type plain destroy a previous written partition?

Here is what happened ...

1. I had a raid1 of 2X2TiB usb disks (say A and B).
2. I wanted to replace one of the disks. There are some errors in it -
B. Disk A is fine.
3. I decided to use 2 new disks of 4TiB each (C and D) in raid1.
4. Disks A and B were encryted with --type plain.
5. I normally mounted disks A and B as usual. OK.
6. luksFormat'ed disk C.
7. Added it using btrfs dev add.
8. Deleted disk B with btrfs dev del B.
9. After 1.5 days the process ended successfully with disks A and C (I
could see it with btrfs fi show).
10. After this I unmounted the filesystem, closed the encrypted devices.
11. I physically disconnected disk B.
12. Then, wrongly, I tried to open disk A with --type=luks (it was
encrypted with --type=plain!). I got an error message.
13. After this I was no more able to make disk A recognized by btrfs.
14. I also noticed that cryptsetup with --type=plain (for disk A) didn't
cause a link creation in /dev/disk/by-uuid for the corresponding mapped
device which makes me think that the disk content was destroyed or at
least it is not being correctly unencrypted.

Any comments? Thanks.

TURN AROUND
I mounted the filesystem using only disk C as degraded.
Added disk D.
Deleted "missing".
Now it is transfering "things" to D.
Seems OK. Let's see what happens at the very end.

Regards

Back to alt.os.linux | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Can crypsetup --type plain destroy a previous written partition? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2019-05-09 21:14 +0100
  Re: Can crypsetup --type plain destroy a previous written partition? "J.O. Aho" <user@example.net> - 2019-05-10 07:02 +0200
    Re: Can crypsetup --type plain destroy a previous written partition? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2019-05-10 16:10 +0100
      Re: Can crypsetup --type plain destroy a previous written partition? "J.O. Aho" <user@example.net> - 2019-05-10 18:43 +0200
        Re: Can crypsetup --type plain destroy a previous written partition? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2019-05-10 17:59 +0100
          Re: Can crypsetup --type plain destroy a previous written partition? "J.O. Aho" <user@example.net> - 2019-05-10 23:52 +0200
            Re: Can crypsetup --type plain destroy a previous written partition? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2019-05-11 04:08 +0100
              Re: Can crypsetup --type plain destroy a previous written partition? "J.O. Aho" <user@example.net> - 2019-05-11 09:40 +0200
                Re: Can crypsetup --type plain destroy a previous written partition? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2019-05-11 18:50 +0100
  Re: Can crypsetup --type plain destroy a previous written partition? [EXLAINED] Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2019-05-10 16:00 +0100

csiph-web