public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* Mounting a encrypted disk: Fatal error: Required key not available
@ 2024-01-25 20:10 RlndVt
  2024-01-25 22:54 ` Martin Steigerwald
  0 siblings, 1 reply; 6+ messages in thread
From: RlndVt @ 2024-01-25 20:10 UTC (permalink / raw)
  To: linux-bcachefs@vger.kernel.org

Hi,

I'm having difficulties mounting a new array I've created:

# bcachefs mount /dev/sde /mnt/vault/
ERROR - bcachefs_rust::cmd_mount: Fatal error: Required key not available

This array was created using:

# bcachefs format --block_size=4k --encrypted /dev/sde

And unlocked with `bcachefs unlock`.

The host is running fedora 39 with kernel 6.7.0-200.fc39.x86_64 and bcachefs-tools-1.4.1-2.fc39.

Sorry if this isn't much to go by, would love help getting this working.

Thanks in advanced,
Roland

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting a encrypted disk: Fatal error: Required key not available
  2024-01-25 20:10 Mounting a encrypted disk: Fatal error: Required key not available RlndVt
@ 2024-01-25 22:54 ` Martin Steigerwald
  2024-01-26 12:22   ` RlndVt
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Steigerwald @ 2024-01-25 22:54 UTC (permalink / raw)
  To: linux-bcachefs@vger.kernel.org, RlndVt

Hi Roland.

RlndVt - 25.01.24, 21:10:25 CET:
> I'm having difficulties mounting a new array I've created:
> 
> # bcachefs mount /dev/sde /mnt/vault/
> ERROR - bcachefs_rust::cmd_mount: Fatal error: Required key not
> available

This has been discussed before. A possible work-around is: 

Re: Error while unlocking encrypted BCacheFS: Required key not available

Date: Tue, 16 Jan 2024 11:59:08 -0600

https://lore.kernel.org/linux-bcachefs/
CACmrr9gQeXccyS9ZRiR2KnTKnA6EVBCVz_YWcDC3p1mbGqgMSg@mail.gmail.com/

I did not yet take time to test it, but I think for George it worked.

Best,
-- 
Martin



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting a encrypted disk: Fatal error: Required key not available
  2024-01-25 22:54 ` Martin Steigerwald
@ 2024-01-26 12:22   ` RlndVt
  2024-02-11 14:13     ` Martin Steigerwald
  0 siblings, 1 reply; 6+ messages in thread
From: RlndVt @ 2024-01-26 12:22 UTC (permalink / raw)
  To: Martin Steigerwald; +Cc: linux-bcachefs@vger.kernel.org

Hi Martin

On Thursday, 25 January 2024 at 23:54, Martin Steigerwald <martin@lichtvoll.de> wrote:

> 
> 
> Hi Roland.
> 
> RlndVt - 25.01.24, 21:10:25 CET:
> 
> > I'm having difficulties mounting a new array I've created:
> > 
> > # bcachefs mount /dev/sde /mnt/vault/
> > ERROR - bcachefs_rust::cmd_mount: Fatal error: Required key not
> > available
> 
> 
> This has been discussed before. A possible work-around is:
> 
> Re: Error while unlocking encrypted BCacheFS: Required key not available
> 
> Date: Tue, 16 Jan 2024 11:59:08 -0600
> 
> https://lore.kernel.org/linux-bcachefs/
> CACmrr9gQeXccyS9ZRiR2KnTKnA6EVBCVz_YWcDC3p1mbGqgMSg@mail.gmail.com/
> 
> I did not yet take time to test it, but I think for George it worked.
> 
> Best,
> --
> Martin

Thanks; from the #bcache IRC I got the advice to try unlocking with the `-k session` option, which worked for me. 

Regards,
Roland

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting a encrypted disk: Fatal error: Required key not available
  2024-01-26 12:22   ` RlndVt
@ 2024-02-11 14:13     ` Martin Steigerwald
  2024-02-11 14:28       ` Martin Steigerwald
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Steigerwald @ 2024-02-11 14:13 UTC (permalink / raw)
  To: RlndVt; +Cc: linux-bcachefs@vger.kernel.org

Hi Roland,

RlndVt - 26.01.24, 13:22:02 CET:
> On Thursday, 25 January 2024 at 23:54, Martin Steigerwald 
> <martin@lichtvoll.de> wrote:
> > Hi Roland.
> > 
> > RlndVt - 25.01.24, 21:10:25 CET:
> > > I'm having difficulties mounting a new array I've created:
> > > 
> > > # bcachefs mount /dev/sde /mnt/vault/
> > > ERROR - bcachefs_rust::cmd_mount: Fatal error: Required key not
> > > available
> > 
> > This has been discussed before. A possible work-around is:
> > 
> > Re: Error while unlocking encrypted BCacheFS: Required key not
> > available
> > 
> > Date: Tue, 16 Jan 2024 11:59:08 -0600
> > 
> > https://lore.kernel.org/linux-bcachefs/
> > CACmrr9gQeXccyS9ZRiR2KnTKnA6EVBCVz_YWcDC3p1mbGqgMSg@mail.gmail.com/
> > 
> > I did not yet take time to test it, but I think for George it worked.
[…]
> Thanks; from the #bcache IRC I got the advice to try unlocking with the
> `-k session` option, which worked for me.

It did not work for me. I tried

bcachefs unlock -k session /dev/sda1

but could not mount it:

error requesting encryption key: ENOKEY

The sequence

bcachefs unlock /dev/sda1

keyctl link @u @s

does work. The "keyctl" command is from the mail I linked above.

Now on to copying 1,4 TiB of data once again as Transcend XS2000 4 TB 
external SSD does not seem to like UAS. Lots of timeouts and I/O errors 
after a certain time. BCacheFS told a lot of interesting stuff to kernel 
log, but that is to be expected on timeouts and write errors. BCacheFS is 
not to blame for that.

Thus I recreated the file system and start from scratch after adding the 
following quirk:

% cat /etc/modprobe.d/disable-uas.conf
# Does not work with external SSD Transcend XS2000 4TB
options usb-storage quirks=0951:176b:u

I hope it works stable with usb-storage only instead of uas.

Will provide bug report to USB people about that.

Best,
-- 
Martin



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting a encrypted disk: Fatal error: Required key not available
  2024-02-11 14:13     ` Martin Steigerwald
@ 2024-02-11 14:28       ` Martin Steigerwald
  2024-02-11 16:15         ` Martin Steigerwald
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Steigerwald @ 2024-02-11 14:28 UTC (permalink / raw)
  To: RlndVt; +Cc: linux-bcachefs@vger.kernel.org

Martin Steigerwald - 11.02.24, 15:13:25 CET:
> Thus I recreated the file system and start from scratch after adding the
> following quirk:
> 
> % cat /etc/modprobe.d/disable-uas.conf
> # Does not work with external SSD Transcend XS2000 4TB
> options usb-storage quirks=0951:176b:u
> 
> I hope it works stable with usb-storage only instead of uas.

It does not. I/O error that aborted rsync within the first 10 minutes.

So it appears that external SSD on Linux is currently unusable. :(

After at least some Sandisk Extreme Pro SSDs reportedly having all kinds 
of trouble – I have been lucky so far – it appears that Transcend SSD is 
not really a better choice. But let's see what comes out of a report to 
USB people.

Best,
-- 
Martin



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting a encrypted disk: Fatal error: Required key not available
  2024-02-11 14:28       ` Martin Steigerwald
@ 2024-02-11 16:15         ` Martin Steigerwald
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Steigerwald @ 2024-02-11 16:15 UTC (permalink / raw)
  To: RlndVt; +Cc: linux-bcachefs@vger.kernel.org

Martin Steigerwald - 11.02.24, 15:28:52 CET:
> Martin Steigerwald - 11.02.24, 15:13:25 CET:
> > Thus I recreated the file system and start from scratch after adding
> > the following quirk:
> > 
> > % cat /etc/modprobe.d/disable-uas.conf
> > # Does not work with external SSD Transcend XS2000 4TB
> > options usb-storage quirks=0951:176b:u
> > 
> > I hope it works stable with usb-storage only instead of uas.
> 
> It does not. I/O error that aborted rsync within the first 10 minutes.
> 
> So it appears that external SSD on Linux is currently unusable. :(
> 
> After at least some Sandisk Extreme Pro SSDs reportedly having all kinds
> of trouble – I have been lucky so far – it appears that Transcend SSD
> is not really a better choice. But let's see what comes out of a report
> to USB people.

On reporting this I got the notice that this could be fixed by the 
following BCacheFS commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/
fs/bcachefs?id=3e44f325f6f75078cdcd44cd337f517ba3650d05

I was aware of some stable fixes, even briefly read through them. But I
did not make the connection.

I will likely wait till 6.7.5 and retry then.

Best,
-- 
Martin



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-11 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25 20:10 Mounting a encrypted disk: Fatal error: Required key not available RlndVt
2024-01-25 22:54 ` Martin Steigerwald
2024-01-26 12:22   ` RlndVt
2024-02-11 14:13     ` Martin Steigerwald
2024-02-11 14:28       ` Martin Steigerwald
2024-02-11 16:15         ` Martin Steigerwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox