You are not logged in.

#1 2022-11-26 06:23:13

jerryDaBaaws
Member
Registered: 2020-06-08
Posts: 67

[SOLVED] luks external hdd getting remounted as read only

So ive a luks encryped hdd which i unlocked and mounted at boot, using following entries in fstab and crypttab

fstab

/dev/mapper/sda1 /run/media/kushy/e03306b7-59d0-4088-829d-270facbf8267  ext4 auto,nofail

crypttab

sda1 /dev/disk/by-uuid/d9a3c81f-4310-40ed-b483-59aba3a3ea52 none luks

the setup works, but occasionally ive to detach the ext harddisk and when i replug it , it doesnt get mounted automatically back, and entering paraphase doesnt work .


also when i replug it, it is assigned /dev/sdb1 instead of /dev/sda1
did some digging, and one user suggested to create the luks mapping again via

cryptsetup luksOpen /dev/sdb1 lukslvm

but this is mounting hdd as read/write momentarily and then get changed to read only seconds only , any suggestion to make it writable ?


weirdly status is shown as read/write

cryptsetup -v status lukslvm

/dev/mapper/lukslvm is active and is in use.
  type:    LUKS2
  cipher:  aes-xts-plain64
  keysize: 512 bits
  key location: keyring
  device:  /dev/sdb1
  sector size:  512
  offset:  32768 sectors
  size:    3906926592 sectors
  mode:    read/write

also the mount folder is 700 only

Last edited by jerryDaBaaws (2022-11-26 07:27:51)

Offline

#2 2022-11-26 07:27:31

jerryDaBaaws
Member
Registered: 2020-06-08
Posts: 67

Re: [SOLVED] luks external hdd getting remounted as read only

Solved,

I had to remove the original mapping first using

cryptsetup luksClose sda1  

Offline

Board footer

Powered by FluxBB