* [dm-crypt] mistake with luksFormat
@ 2017-12-23 10:49 A. Kapetanovic
2017-12-23 14:01 ` Arno Wagner
2017-12-23 19:23 ` Michael Kjörling
0 siblings, 2 replies; 8+ messages in thread
From: A. Kapetanovic @ 2017-12-23 10:49 UTC (permalink / raw)
To: dm-crypt
Hi everybody,
I did something wrong, can please someone help me ? I followed these
instructions to encrypt a internal HDD :
https://www.cyberciti.biz/hardware/howto-linux-hard-disk-encryption-with-
luks-cryptsetup-command/
Unfortunately I did
cryptsetup -y -v luksFormat /dev/sdb
and not
cryptsetup -y -v luksFormat /dev/sdb1
After that I used fdisk to create sdb1 and did
cryptsetup -y -v luksFormat /dev/sdb1
cryptsetup luksOpen /dev/sdb1 prod
and
pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
all this I did through ssh
but :
1. After a time my shell was frozen. Perhaps has ssh a timer ?
2. My HDD did repetitive noises several hours (now that has stopped), even
after a reboot.
So, my question please : have I to do something to erase what I did with
cryptsetup -y -v luksFormat /dev/sdb
And what is it ?
Have I to do something more, or were the noises of the HDD simple my
pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
command, even if
ps -a | grep dd
didn't display anything ?
Thanks, best regards,
Amel :)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-23 10:49 [dm-crypt] mistake with luksFormat A. Kapetanovic
@ 2017-12-23 14:01 ` Arno Wagner
2017-12-23 17:22 ` A. Kapetanovic
2017-12-23 19:23 ` Michael Kjörling
1 sibling, 1 reply; 8+ messages in thread
From: Arno Wagner @ 2017-12-23 14:01 UTC (permalink / raw)
To: dm-crypt
Hi Amel,
I would say your disk died while you were doing the overwrite.
That is assuming nothing the OS uses was on sdb.
There is no logout-timer in ssh and anyways, it would not freeze.
Regards,
Arno
On Sat, Dec 23, 2017 at 11:49:22 CET, A. Kapetanovic wrote:
> Hi everybody,
>
> I did something wrong, can please someone help me ? I followed these
> instructions to encrypt a internal HDD :
>
> https://www.cyberciti.biz/hardware/howto-linux-hard-disk-encryption-with-luks-cryptsetup-command/
>
> Unfortunately I did
>
> cryptsetup -y -v luksFormat /dev/sdb
>
> and not
>
> cryptsetup -y -v luksFormat /dev/sdb1
>
> After that I used fdisk to create sdb1 and did
>
> cryptsetup -y -v luksFormat /dev/sdb1
> cryptsetup luksOpen /dev/sdb1 prod
>
> and
>
> pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
>
> all this I did through ssh
>
> but :
>
> 1. After a time my shell was frozen. Perhaps has ssh a timer ?
> 2. My HDD did repetitive noises several hours (now that has stopped), even
> after a reboot.
>
> So, my question please : have I to do something to erase what I did with
>
> cryptsetup -y -v luksFormat /dev/sdb
>
> And what is it ?
>
> Have I to do something more, or were the noises of the HDD simple my
>
> pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
>
> command, even if
>
> ps -a | grep dd
>
> didn't display anything ?
>
>
> Thanks, best regards,
>
> Amel :)
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-23 14:01 ` Arno Wagner
@ 2017-12-23 17:22 ` A. Kapetanovic
2017-12-23 18:16 ` Arno Wagner
0 siblings, 1 reply; 8+ messages in thread
From: A. Kapetanovic @ 2017-12-23 17:22 UTC (permalink / raw)
To: Arno Wagner; +Cc: dm-crypt
Thanks Arno,
If I have good understood, you think I can throw the HDD ? This command
cryptsetup -y -v luksFormat /dev/sdb
Simply destroys the drive ?
(I didn't ask any other operations on the sdb).
Regards,
Amel
Arno Wagner writes:
> Hi Amel,
>
> I would say your disk died while you were doing the overwrite.
> That is assuming nothing the OS uses was on sdb.
> There is no logout-timer in ssh and anyways, it would not freeze.
>
> Regards,
> Arno
>
>
> On Sat, Dec 23, 2017 at 11:49:22 CET, A. Kapetanovic wrote:
>> Hi everybody,
>>
>> I did something wrong, can please someone help me ? I followed these
>> instructions to encrypt a internal HDD :
>>
>> https://www.cyberciti.biz/hardware/howto-linux-hard-disk-encryption-with-luks-cryptsetup-command/
>>
>> Unfortunately I did
>>
>> cryptsetup -y -v luksFormat /dev/sdb
>>
>> and not
>>
>> cryptsetup -y -v luksFormat /dev/sdb1
>>
>> After that I used fdisk to create sdb1 and did
>>
>> cryptsetup -y -v luksFormat /dev/sdb1
>> cryptsetup luksOpen /dev/sdb1 prod
>>
>> and
>>
>> pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
>>
>> all this I did through ssh
>>
>> but :
>>
>> 1. After a time my shell was frozen. Perhaps has ssh a timer ?
>> 2. My HDD did repetitive noises several hours (now that has stopped), even
>> after a reboot.
>>
>> So, my question please : have I to do something to erase what I did with
>>
>> cryptsetup -y -v luksFormat /dev/sdb
>>
>> And what is it ?
>>
>> Have I to do something more, or were the noises of the HDD simple my
>>
>> pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
>>
>> command, even if
>>
>> ps -a | grep dd
>>
>> didn't display anything ?
>>
>>
>> Thanks, best regards,
>>
>> Amel :)
>> _______________________________________________
>> dm-crypt mailing list
>> dm-crypt@saout.de
>> http://www.saout.de/mailman/listinfo/dm-crypt
>
> --
> Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
> GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
> ----
> A good decision is based on knowledge and not on numbers. -- Plato
>
> If it's in the news, don't worry about it. The very definition of
> "news" is "something that hardly ever happens." -- Bruce Schneier
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-23 17:22 ` A. Kapetanovic
@ 2017-12-23 18:16 ` Arno Wagner
0 siblings, 0 replies; 8+ messages in thread
From: Arno Wagner @ 2017-12-23 18:16 UTC (permalink / raw)
To: dm-crypt
Hi Amel,
cryptsetup does nothing to the drive.
It cannot destroy hardware.
It sounds like the disk died at the same time
you did the overwrite by pure random chance.
Regards,
Arno
On Sat, Dec 23, 2017 at 18:22:11 CET, A. Kapetanovic wrote:
> Thanks Arno,
>
> If I have good understood, you think I can throw the HDD ? This command
>
> cryptsetup -y -v luksFormat /dev/sdb
>
> Simply destroys the drive ?
>
> (I didn't ask any other operations on the sdb).
>
> Regards,
>
> Amel
>
>
> Arno Wagner writes:
>
> >Hi Amel,
> >
> >I would say your disk died while you were doing the overwrite.
> >That is assuming nothing the OS uses was on sdb.
> >There is no logout-timer in ssh and anyways, it would not freeze.
> >
> >Regards,
> >Arno
> >
> >
> >On Sat, Dec 23, 2017 at 11:49:22 CET, A. Kapetanovic wrote:
> >>Hi everybody,
> >>
> >>I did something wrong, can please someone help me ? I followed these
> >>instructions to encrypt a internal HDD :
> >>
> >>https://www.cyberciti.biz/hardware/howto-linux-hard-disk-encryption-with-luks-cryptsetup-command/
> >>
> >>Unfortunately I did
> >>
> >>cryptsetup -y -v luksFormat /dev/sdb
> >>
> >>and not
> >>
> >>cryptsetup -y -v luksFormat /dev/sdb1
> >>
> >>After that I used fdisk to create sdb1 and did
> >>
> >>cryptsetup -y -v luksFormat /dev/sdb1
> >>cryptsetup luksOpen /dev/sdb1 prod
> >>
> >>and
> >>
> >>pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
> >>
> >>all this I did through ssh
> >>
> >>but :
> >>
> >>1. After a time my shell was frozen. Perhaps has ssh a timer ?
> >>2. My HDD did repetitive noises several hours (now that has stopped), even
> >>after a reboot.
> >>
> >>So, my question please : have I to do something to erase what I did with
> >>
> >>cryptsetup -y -v luksFormat /dev/sdb
> >>
> >>And what is it ?
> >>
> >>Have I to do something more, or were the noises of the HDD simple my
> >>
> >>pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
> >>
> >>command, even if
> >>
> >>ps -a | grep dd
> >>
> >>didn't display anything ?
> >>
> >>
> >>Thanks, best regards,
> >>
> >>Amel :)
> >>_______________________________________________
> >>dm-crypt mailing list
> >>dm-crypt@saout.de
> >>http://www.saout.de/mailman/listinfo/dm-crypt
> >
> >--
> >Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
> >GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
> >----
> >A good decision is based on knowledge and not on numbers. -- Plato
> >
> >If it's in the news, don't worry about it. The very definition of
> >"news" is "something that hardly ever happens." -- Bruce Schneier
> >_______________________________________________
> >dm-crypt mailing list
> >dm-crypt@saout.de
> >http://www.saout.de/mailman/listinfo/dm-crypt
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-23 10:49 [dm-crypt] mistake with luksFormat A. Kapetanovic
2017-12-23 14:01 ` Arno Wagner
@ 2017-12-23 19:23 ` Michael Kjörling
2017-12-24 2:04 ` David Christensen
1 sibling, 1 reply; 8+ messages in thread
From: Michael Kjörling @ 2017-12-23 19:23 UTC (permalink / raw)
To: dm-crypt
On 23 Dec 2017 11:49 +0100, from aka@alphanet.ch (A. Kapetanovic):
> Unfortunately I did
>
> cryptsetup -y -v luksFormat /dev/sdb
>
> and not
>
> cryptsetup -y -v luksFormat /dev/sdb1
Assuming that your system didn't keep anything critical on /dev/sdb...
> After that I used fdisk to create sdb1 and did
...that should have written a new, valid MBR partition table to it,
and...
> cryptsetup -y -v luksFormat /dev/sdb1
> cryptsetup luksOpen /dev/sdb1 prod
...looks right to set up a LUKS container on the freshly created
partition. That partition may have had garbage near the beginning from
the old LUKS header on /dev/sdb, but that's inconsequential as
luksFormat would overwrite it anyway, and any previously existing
plaintext data will just be treated as ciphertext which decrypts to
garbage.
> and
>
> pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
That would operate only through the LUKS container, so cannot
reasonably have damaged any LUKS metadata.
> 2. My HDD did repetitive noises several hours (now that has
> stopped), even after a reboot.
It's hard to diagnose simply based on "repetitive noises", but unless
you took specific steps to do otherwise, anything done by the pv | dd
command should have stopped no later than when you rebooted the
system.
> Have I to do something more, or were the noises of the HDD simple my
>
> pv -tpreb /dev/zero | dd of=/dev/mapper/prod bs=128M
>
> command, even if
>
> ps -a | grep dd
>
> didn't display anything ?
There is a small possibility that the system was, after "dd" exited,
still writing out data that was in the write cache, but that shouldn't
take more than a few seconds even on a heavily loaded modern system.
(You can add "flags=sync" to avoid that, or use a different tool such
as GNU ddrescue.)
I suggest checking the SMART data to see how the drive is reporting
its own health. "smartctl --attributes /dev/sdb" as root should be a
start. In the SMART attributes list, look closely at any attribute
where the "VALUE" is close to "THRESH", or where "WHEN_FAILED" says
anything other than "-".
Other than that, I concur with Arno's analysis that it was likely just
a coincidence, possibly triggered by heavy I/O but unrelated to LUKS
as such.
--
Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se
“People who think they know everything really annoy
those of us who know we don’t.” (Bjarne Stroustrup)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-23 19:23 ` Michael Kjörling
@ 2017-12-24 2:04 ` David Christensen
2017-12-31 0:03 ` Wensday
0 siblings, 1 reply; 8+ messages in thread
From: David Christensen @ 2017-12-24 2:04 UTC (permalink / raw)
To: dm-crypt
On 12/23/17 11:23, Michael Kjörling wrote:
> On 23 Dec 2017 11:49 +0100, from aka@alphanet.ch (A. Kapetanovic):
>> 2. My HDD did repetitive noises several hours (now that has
>> stopped), even after a reboot.
>
> It's hard to diagnose simply based on "repetitive noises", but unless
> you took specific steps to do otherwise, anything done by the pv | dd
> command should have stopped no later than when you rebooted the
...
>
> I suggest checking the SMART data to see how the drive is reporting
> its own health. "smartctl --attributes /dev/sdb" as root should be a
> start. In the SMART attributes list, look closely at any attribute
> where the "VALUE" is close to "THRESH", or where "WHEN_FAILED" says
> anything other than "-".
>
> Other than that, I concur with Arno's analysis that it was likely just
> a coincidence, possibly triggered by heavy I/O but unrelated to LUKS
> as such.
Many HDD manufacturers release diagnostic tools for their products. For
example, Seagate "Seatools":
https://www.seagate.com/support/downloads/seatools/
I prefer bootable CD images, but some manufacturers only offer Windows
executables.
I suggest that you get the tool for your HDD and run it to find out if
your HDD is having problems.
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-24 2:04 ` David Christensen
@ 2017-12-31 0:03 ` Wensday
2018-01-01 21:35 ` H McCurdy
0 siblings, 1 reply; 8+ messages in thread
From: Wensday @ 2017-12-31 0:03 UTC (permalink / raw)
To: David Christensen; +Cc: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]
hello
are you sure this message was hit me?
24.12.2017 03:16 "David Christensen" <dpchrist@holgerdanske.com> napisał(a):
> On 12/23/17 11:23, Michael Kjörling wrote:
>
>> On 23 Dec 2017 11:49 +0100, from aka@alphanet.ch (A. Kapetanovic):
>>
>>> 2. My HDD did repetitive noises several hours (now that has
>>> stopped), even after a reboot.
>>>
>>
>> It's hard to diagnose simply based on "repetitive noises", but unless
>> you took specific steps to do otherwise, anything done by the pv | dd
>> command should have stopped no later than when you rebooted the
>>
> ...
>
>>
>> I suggest checking the SMART data to see how the drive is reporting
>> its own health. "smartctl --attributes /dev/sdb" as root should be a
>> start. In the SMART attributes list, look closely at any attribute
>> where the "VALUE" is close to "THRESH", or where "WHEN_FAILED" says
>> anything other than "-".
>>
>> Other than that, I concur with Arno's analysis that it was likely just
>> a coincidence, possibly triggered by heavy I/O but unrelated to LUKS
>> as such.
>>
>
> Many HDD manufacturers release diagnostic tools for their products. For
> example, Seagate "Seatools":
>
> https://www.seagate.com/support/downloads/seatools/
>
>
> I prefer bootable CD images, but some manufacturers only offer Windows
> executables.
>
>
> I suggest that you get the tool for your HDD and run it to find out if
> your HDD is having problems.
>
>
> David
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
[-- Attachment #2: Type: text/html, Size: 2748 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dm-crypt] mistake with luksFormat
2017-12-31 0:03 ` Wensday
@ 2018-01-01 21:35 ` H McCurdy
0 siblings, 0 replies; 8+ messages in thread
From: H McCurdy @ 2018-01-01 21:35 UTC (permalink / raw)
To: Wensday, David Christensen; +Cc: dm-crypt@saout.de
[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]
David,
Unfortunately, it appears your HDD coincidentally failed and is effectively dead. If it's new enough, it could be a warranty replacement. If not, I fear that it is garbage. Point is, you did nothing to break the drive. You encountered bad luck. (Or perhaps good luck as the drive would have failed soon anyway with data which you would have lost.)
Hugh
On Saturday, December 30, 2017 7:07 PM, Wensday <michalwenda1@gmail.com> wrote:
hello
are you sure this message was hit me?
24.12.2017 03:16 "David Christensen" <dpchrist@holgerdanske.com> napisał(a):
On 12/23/17 11:23, Michael Kjörling wrote:
On 23 Dec 2017 11:49 +0100, from aka@alphanet.ch (A. Kapetanovic):
2. My HDD did repetitive noises several hours (now that has
stopped), even after a reboot.
It's hard to diagnose simply based on "repetitive noises", but unless
you took specific steps to do otherwise, anything done by the pv | dd
command should have stopped no later than when you rebooted the
...
I suggest checking the SMART data to see how the drive is reporting
its own health. "smartctl --attributes /dev/sdb" as root should be a
start. In the SMART attributes list, look closely at any attribute
where the "VALUE" is close to "THRESH", or where "WHEN_FAILED" says
anything other than "-".
Other than that, I concur with Arno's analysis that it was likely just
a coincidence, possibly triggered by heavy I/O but unrelated to LUKS
as such.
Many HDD manufacturers release diagnostic tools for their products. For example, Seagate "Seatools":
https://www.seagate.com/suppor t/downloads/seatools/
I prefer bootable CD images, but some manufacturers only offer Windows executables.
I suggest that you get the tool for your HDD and run it to find out if your HDD is having problems.
David
______________________________ _________________
dm-crypt mailing list
dm-crypt@saout.de
http://www.saout.de/mailman/li stinfo/dm-crypt
_______________________________________________
dm-crypt mailing list
dm-crypt@saout.de
http://www.saout.de/mailman/listinfo/dm-crypt
[-- Attachment #2: Type: text/html, Size: 5348 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-01-01 21:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-23 10:49 [dm-crypt] mistake with luksFormat A. Kapetanovic
2017-12-23 14:01 ` Arno Wagner
2017-12-23 17:22 ` A. Kapetanovic
2017-12-23 18:16 ` Arno Wagner
2017-12-23 19:23 ` Michael Kjörling
2017-12-24 2:04 ` David Christensen
2017-12-31 0:03 ` Wensday
2018-01-01 21:35 ` H McCurdy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.