You are not logged in.

#1 2021-01-13 19:29:36

archdub
Member
From: Dublin, Ireland
Registered: 2018-03-04
Posts: 58

cryptsetup - device-mapper: reload ioctl on failed: No such file or

In the middle of last year I successfully wiped two partitions
on my laptop following the instructions here:

https://wiki.archlinux.org/index.php/Dm … _partition

This year I decided to wipe the remaining partition on the same laptop
using the same command command but it fails as below. Any ideas?

~/ lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1       259:0    0 931.5G  0 disk
├─nvme0n1p1   259:1    0     1G  0 part  /boot
├─nvme0n1p2   259:2    0    50G  0 part
│ └─arch-root 254:0    0    50G  0 crypt /
├─nvme0n1p3   259:3    0   700G  0 part
├─nvme0n1p4   259:4    0 176.5G  0 part
│ └─arch-home 254:2    0 176.5G  0 crypt /home
└─nvme0n1p5   259:5    0     4G  0 part
  └─swap      254:1    0     4G  0 crypt [SWAP]
█▓▒░root@thinkpad-p43s█▓▒░ Wed 13/Jan/2021 08:26:53.073
~/ cryptsetup open --type plain -d /dev/urandom /dev/nvme0n1p3 to_be_wiped
device-mapper: reload ioctl on   failed: No such file or directory
~/

Offline

#2 2021-01-13 20:31:59

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

Have you tried runing the command through strace to see what is failing?

Offline

#3 2021-01-14 01:30:54

archdub
Member
From: Dublin, Ireland
Registered: 2018-03-04
Posts: 58

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

Thanks for the strace suggestion. The output was copious but this is the relevant part:

openat(AT_FDCWD, "/usr/share/locale/en_IE.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_IE.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_IE/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "device-mapper: reload ioctl on  "..., 67device-mapper: reload ioctl on   failed: No such file or directory) = 67

Why are those files missing? Last year I ran the command so presumably the files were there.
Today I ran locale-gen but it had no effect. IE is because I live in Ireland.

Maybe there is a bug somewhere related to locales. What do you think?

 
~/ locale              
LANG=en_IE.UTF-8
LC_CTYPE="en_IE.UTF-8"
LC_NUMERIC="en_IE.UTF-8"
LC_TIME="en_IE.UTF-8"
LC_COLLATE="en_IE.UTF-8"
LC_MONETARY="en_IE.UTF-8"
LC_MESSAGES="en_IE.UTF-8"
LC_PAPER="en_IE.UTF-8"
LC_NAME="en_IE.UTF-8"
LC_ADDRESS="en_IE.UTF-8"
LC_TELEPHONE="en_IE.UTF-8"
LC_MEASUREMENT="en_IE.UTF-8"
LC_IDENTIFICATION="en_IE.UTF-8"
LC_ALL=
█▓▒░root@thinkpad-p43s█▓▒░ Thu 14/Jan/2021 01:26:38.077 
~/ locale -a
C
de_DE.utf8
en_GB.utf8
en_IE.utf8
es_ES.utf8
fr_FR.utf8
it_IT.utf8
POSIX
pt_PT.utf8
█▓▒░root@thinkpad-p43s█▓▒░ Thu 14/Jan/2021 01:26:48.417 
~/ cat /etc/locale.conf 
LANG=en_IE.UTF-8
█▓▒░root@thinkpad-p43s█▓▒░ Thu 14/Jan/2021 01:27:09.423 
~/ ll /usr/share/locale
total 1108
drwxr-xr-x 274 root root  4096 Jan 12 23:51  ./
drwxr-xr-x 292 root root 12288 Jan 12 23:52  ../
drwxr-xr-x   3 root root  4096 Jun  2  2020  ab/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ace/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ach/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  af/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ak/
drwxr-xr-x   3 root root  4096 Jun  1  2020  am/
drwxr-xr-x   3 root root  4096 Jun  2  2020  am_ET/
drwxr-xr-x   3 root root  4096 Jun  1  2020  an/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ang/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ar/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  as/
drwxr-xr-x   3 root root  4096 Jun  2  2020  as_IN/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ast/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ay/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  az/
drwxr-xr-x   3 root root  4096 Jun  2  2020  az_IR/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ba/
drwxr-xr-x   3 root root  4096 Jun  1  2020  bal/
drwxr-xr-x   3 root root  4096 Jun  2  2020  bar/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  be/
drwxr-xr-x   3 root root  4096 Jan 12 23:52 'be@latin'/
drwxr-xr-x   3 root root  4096 Jun  4  2020  bem/
drwxr-xr-x   3 root root  4096 Aug 23 22:27  ber/
drwxr-xr-x   3 root root  4096 Jun  2  2020 'be@tarask'/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  bg/
drwxr-xr-x   3 root root  4096 Jun  4  2020  bg_BG/
drwxr-xr-x   3 root root  4096 Jun  2  2020  bi/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  bn/
drwxr-xr-x   3 root root  4096 Jun  4  2020  bn_BD/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  bn_IN/
drwxr-xr-x   3 root root  4096 Jun  1  2020  bo/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  br/
drwxr-xr-x   3 root root  4096 Jun  1  2020  brx/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  bs/
drwxr-xr-x   3 root root  4096 Jun  2  2020  byn/
drwxr-xr-x   6 root root  4096 Jan 12 23:52  ca/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'ca_ES@valencia'/
drwxr-xr-x   3 root root  4096 Jun  1  2020  ca.us-ascii/
drwxr-xr-x   4 root root  4096 Jan 12 23:52 'ca@valencia'/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ce/
drwxr-xr-x   3 root root  4096 Jun  2  2020  cgg/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ch/
drwxr-xr-x   3 root root  4096 Jun  2  2020  chr/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ckb/
drwxr-xr-x   3 root root  4096 Jun  2  2020  cmn/
drwxr-xr-x   3 root root  4096 Jun  2  2020  co/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  crh/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  cs/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  csb/
drwxr-xr-x   3 root root  4096 Jun  4  2020  cs_CZ/
drwxr-xr-x   3 root root  4096 Jun  2  2020  cv/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  cy/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  da/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  de/
drwxr-xr-x   3 root root  4096 Jun  1  2020  de_CH/
drwxr-xr-x   3 root root  4096 Jun  1  2020  de.us-ascii/
drwxr-xr-x   3 root root  4096 Jun  4  2020  doi/
drwxr-xr-x   3 root root  4096 Jun  2  2020  dv/
drwxr-xr-x   3 root root  4096 Jun  1  2020  dz/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ee/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  el/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  en/
drwxr-xr-x   3 root root  4096 Jun  2  2020  en_AU/
drwxr-xr-x   3 root root  4096 Jun  1  2020 'en@boldquot'/
drwxr-xr-x   3 root root  4096 Jun  1  2020  en_CA/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  en_GB/
drwxr-xr-x   3 root root  4096 Jun  2  2020  en_NZ/
drwxr-xr-x   3 root root  4096 Jun  1  2020 'en@quot'/
drwxr-xr-x   3 root root  4096 Jun  1  2020 'en@shaw'/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  en_US/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  eo/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  es/
drwxr-xr-x   3 root root  4096 Jun  1  2020  es_419/
drwxr-xr-x   3 root root  4096 Jun  2  2020  es_AR/
drwxr-xr-x   3 root root  4096 Jun  2  2020  es_ES/
drwxr-xr-x   3 root root  4096 Jun  2  2020  es_MX/
drwxr-xr-x   3 root root  4096 Jun  4  2020  es_VE/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  et/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  eu/
drwxr-xr-x   3 root root  4096 Jun  1  2020  eu_ES/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  fa/
drwxr-xr-x   3 root root  4096 Jun  2  2020  fa_IR/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ff/
drwxr-xr-x   6 root root  4096 Jan 12 23:52  fi/
drwxr-xr-x   3 root root  4096 Jun  4  2020  fi_FI/
drwxr-xr-x   3 root root  4096 Jun  4  2020  fil/
drwxr-xr-x   3 root root  4096 Jun  1  2020  fo/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  fr/
drwxr-xr-x   3 root root  4096 Jun  1  2020  fr_CA/
drwxr-xr-x   3 root root  4096 Jun  2  2020  frp/
drwxr-xr-x   4 root root  4096 Jun  4  2020  fur/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  fy/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  ga/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  gd/
drwxr-xr-x   3 root root  4096 Jun  2  2020  gez/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  gl/
drwxr-xr-x   3 root root  4096 Jun  4  2020  gl_ES/
drwxr-xr-x   3 root root  4096 Jun  2  2020  gn/
drwxr-xr-x   3 root root  4096 Aug 23 22:27  gr/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  gu/
drwxr-xr-x   3 root root  4096 Jun  2  2020  gv/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ha/
drwxr-xr-x   3 root root  4096 Jun  2  2020  haw/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  he/
drwxr-xr-x   3 root root  4096 Jun  4  2020  he_IL/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  hi/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  hne/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  hr/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  hsb/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ht/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  hu/
drwxr-xr-x   3 root root  4096 Jun  4  2020  hu_HU/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  hy/
drwxr-xr-x   3 root root  4096 Jun  2  2020  hy_AM/
drwxr-xr-x   3 root root  4096 Aug 23 22:27  hye/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  ia/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  id/
drwxr-xr-x   3 root root  4096 Jun  2  2020  id_ID/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ie/
drwxr-xr-x   3 root root  4096 Jun  4  2020  ig/
drwxr-xr-x   3 root root  4096 Jun  2  2020  io/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  is/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  it/
drwxr-xr-x   3 root root  4096 Jun  2  2020  iu/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  ja/
drwxr-xr-x   3 root root  4096 Jun  4  2020  ja_JP/
drwxr-xr-x   3 root root  4096 Jun  2  2020  jam/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ka/
drwxr-xr-x   3 root root  4096 Jun  2  2020  kab/
drwxr-xr-x   3 root root  4096 Jun  2  2020  kg/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ki/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  kk/
drwxr-xr-x   3 root root  4096 Jun  2  2020  kl/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  km/
drwxr-xr-x   3 root root  4096 Jun  4  2020  km_KH/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  kn/
drwxr-xr-x   6 root root  4096 Jan 12 23:52  ko/
drwxr-xr-x   3 root root  4096 Jun  2  2020  kok/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'kok@latin'/
drwxr-xr-x   3 root root  4096 Jun  4  2020  ko_KR/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'ks@aran'/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'ks@deva'/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ks_IN/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ku/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ku_IQ/
drwxr-xr-x   3 root root  4096 Jun  2  2020  kv/
drwxr-xr-x   3 root root  4096 Jun  1  2020  kw/
drwxr-xr-x   3 root root  4096 Jun  1  2020  kw_GB/
drwxr-xr-x   3 root root  4096 Jun  1  2020  ky/
drwxr-xr-x   3 root root  4096 Jun  4  2020  la/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  lb/
drwxr-xr-x   4 root root  4096 Jun  1  2020  lg/
drwxr-xr-x   3 root root  4096 Jun  2  2020  li/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ln/
drwxr-xr-x   3 root root  4096 Jun  2  2020  lo/
-rw-r--r--   1 root root  2998 Oct 14 18:00  locale.alias
drwxr-xr-x   3 root root  4096 Jun  4  2020  lo_LA/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  lt/
drwxr-xr-x   3 root root  4096 Jun  4  2020  lt_LT/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  lv/
drwxr-xr-x   3 root root  4096 Jun  4  2020  lv_LV/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  mai/
drwxr-xr-x   3 root root  4096 Jun  1  2020  mg/
drwxr-xr-x   3 root root  4096 Jun  2  2020  mhr/
drwxr-xr-x   3 root root  4096 Jun  2  2020  mi/
drwxr-xr-x   3 root root  4096 Jun  2  2020  mjw/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  mk/
drwxr-xr-x   3 root root  4096 Jun  4  2020  mk_MK/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ml/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ml_IN/
drwxr-xr-x   3 root root  4096 Jun  1  2020  mn/
drwxr-xr-x   3 root root  4096 Jun  4  2020  mni/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'mni@beng'/
drwxr-xr-x   3 root root  4096 Jun  2  2020  mo/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  mr/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  ms/
drwxr-xr-x   3 root root  4096 Jun  2  2020  mt/
drwxr-xr-x   3 root root  4096 Jun  1  2020  my/
drwxr-xr-x   3 root root  4096 Jun  2  2020  na/
drwxr-xr-x   3 root root  4096 Jun  2  2020  nah/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  nb/
drwxr-xr-x   3 root root  4096 Jun  2  2020  nb_NO/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  nds/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ne/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  nl/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  nn/
drwxr-xr-x   3 root root  4096 Jun  4  2020  nn_NO/
drwxr-xr-x   3 root root  4096 Jun  4  2020  no/
drwxr-xr-x   3 root root  4096 Jun  1  2020  no.us-ascii/
drwxr-xr-x   3 root root  4096 Jun  1  2020  nso/
drwxr-xr-x   3 root root  4096 Jun  2  2020  nv/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  oc/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  or/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  pa/
drwxr-xr-x   3 root root  4096 Jun  2  2020  pap/
drwxr-xr-x   3 root root  4096 Jun  2  2020  pi/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  pl/
drwxr-xr-x   3 root root  4096 Jun  4  2020  pl_PL/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ps/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  pt/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  pt_BR/
drwxr-xr-x   3 root root  4096 Jun  1  2020  pt_BR.us-ascii/
drwxr-xr-x   3 root root  4096 Jun  2  2020  pt_PT/
drwxr-xr-x   3 root root  4096 Jun  1  2020  pt.us-ascii/
drwxr-xr-x   3 root root  4096 Jun  4  2020  rm/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  ro/
drwxr-xr-x   3 root root  4096 Jun  4  2020  ro_RO/
drwxr-xr-x   6 root root  4096 Jan 12 23:52  ru/
drwxr-xr-x   3 root root  4096 Jun  1  2020  rw/
drwxr-xr-x   3 root root  4096 Jun  4  2020  sa/
drwxr-xr-x   3 root root  4096 Jun  4  2020  sat/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'sat@deva'/
drwxr-xr-x   3 root root  4096 Jun  2  2020  sc/
drwxr-xr-x   3 root root  4096 Jun  2  2020  sd/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'sd@deva'/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  se/
drwxr-xr-x   3 root root  4096 Jun  2  2020  shn/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  si/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  sk/
drwxr-xr-x   3 root root  4096 Jun  4  2020  sk_SK/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  sl/
drwxr-xr-x   3 root root  4096 Jun  4  2020  sl_SI/
drwxr-xr-x   3 root root  4096 Jun  2  2020  so/
drwxr-xr-x   3 root root  4096 Jun  2  2020  son/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  sq/
drwxr-xr-x   6 root root  4096 Jan 12 23:52  sr/
drwxr-xr-x   3 root root  4096 Jun  1  2020 'sr@ije'/
drwxr-xr-x   4 root root  4096 Jan 12 23:52 'sr@ijekavian'/
drwxr-xr-x   4 root root  4096 Jan 12 23:52 'sr@ijekavianlatin'/
drwxr-xr-x   4 root root  4096 Jan 12 23:52 'sr@latin'/
drwxr-xr-x   3 root root  4096 Jun  2  2020  sr_RS/
drwxr-xr-x   3 root root  4096 Jun  4  2020 'sr_RS@latin'/
drwxr-xr-x   3 root root  4096 Jun  4  2020  st/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  sv/
drwxr-xr-x   3 root root  4096 Jun  2  2020  sw/
drwxr-xr-x   3 root root  4096 Jun  1  2020  szl/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ta/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  te/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  tg/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  th/
drwxr-xr-x   3 root root  4096 Jun  4  2020  th_TH/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ti/
drwxr-xr-x   3 root root  4096 Jun  2  2020  tig/
drwxr-xr-x   3 root root  4096 Jun  2  2020  tk/
drwxr-xr-x   3 root root  4096 Jun  1  2020  tl/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  tr/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  tt/
drwxr-xr-x   3 root root  4096 Jun  2  2020 'tt@iqtelif'/
drwxr-xr-x   3 root root  4096 Jun  4  2020  tt_RU/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  ug/
drwxr-xr-x   6 root root  4096 Jan 12 23:52  uk/
drwxr-xr-x   3 root root  4096 Jun  4  2020  uk_UA/
drwxr-xr-x   3 root root  4096 Jun  1  2020  ur/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ur_PK/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  uz/
drwxr-xr-x   3 root root  4096 Jan 12 23:52 'uz@cyrillic'/
drwxr-xr-x   3 root root  4096 Jun  2  2020 'uz@Latn'/
drwxr-xr-x   3 root root  4096 Jun  2  2020  ve/
drwxr-xr-x   4 root root  4096 Jan 12 23:52  vi/
drwxr-xr-x   3 root root  4096 Jun  4  2020  vi_VN/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  wa/
drwxr-xr-x   3 root root  4096 Jun  2  2020  wae/
drwxr-xr-x   3 root root  4096 Jun  2  2020  wal/
drwxr-xr-x   3 root root  4096 Jun  1  2020  wo/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  xh/
drwxr-xr-x   3 root root  4096 Jun  1  2020  yi/
drwxr-xr-x   3 root root  4096 Jun  1  2020  yo/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  zh_CN/
drwxr-xr-x   3 root root  4096 Jun  2  2020  zh_Hant/
drwxr-xr-x   3 root root  4096 Jan 12 23:52  zh_HK/
drwxr-xr-x   5 root root  4096 Jan 12 23:52  zh_TW/
drwxr-xr-x   3 root root  4096 Jun  4  2020  zh_TW.Big5/
drwxr-xr-x   3 root root  4096 Jun  1  2020  zu/
█▓▒░root@thinkpad-p43s█▓▒░ Thu 14/Jan/2021 01:27:33.511 
~/ 

Offline

#4 2021-01-14 02:41:26

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

openat(AT_FDCWD, "/usr/share/locale/en_IE.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_IE.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_IE/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

Those files not being found is normal.

write(2, "device-mapper: reload ioctl on  "..., 67device-mapper: reload ioctl on   failed: No such file or directory) = 67

Print the error message,  something went wrong before this point.

You could also try --debug

man 8 cryptsetup wrote:

              For backward compatibility there are open command aliases:

              create (argument-order <name> <device>): open --type plain
              plainOpen: open --type plain
              luksOpen: open --type luks
              loopaesOpen: open --type loopaes
              tcryptOpen: open --type tcrypt
              bitlkOpen: open --type bitlk

              <options> are type specific and are described below for individual  device  types. For create, the order of the <name> and <device> options is inverted  for  historical  reasons,  all  other aliases use the standard <device> <name> order.

~/ cryptsetup open --type plain -d /dev/urandom /dev/nvme0n1p3 to_be_wiped

Did you reverse the order of the device and its name?

Offline

#5 2021-01-14 08:48:49

archdub
Member
From: Dublin, Ireland
Registered: 2018-03-04
Posts: 58

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

"Did you reverse the order of the device and its name?"
I entered the command in the wiki which is according to the man page so I don't think there is a problem there.

Anyway, I solved the problem by rebooting the laptop. Linux is like Windows! :-)

I followed your suggestion of using the --debug parameter. Thanks. In the evening I will post the output with debug enabled before and after rebooting (I don't have time now), then we can compare.

Offline

#6 2021-01-14 15:04:19

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

archdub wrote:

Anyway, I solved the problem by rebooting the laptop. Linux is like Windows! :-)

Did you perform a kernel update without a reboot before encountering the issue?  Otherwise I wonder what the reboot changed.

Offline

#7 2021-01-14 23:45:02

archdub
Member
From: Dublin, Ireland
Registered: 2018-03-04
Posts: 58

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

loqs wrote:

Did you perform a kernel update without a reboot before encountering the issue?  Otherwise I wonder what the reboot changed.

No kernel update. However I deleted p3 because I wanted to grow p4 into its space, then recreated p3 because I thought that I would wipe it before growing p4. My guess is that deleting and recreating p3 triggered a bug somewhere like udev or kernel. Everything else was normal (fdisk, lsblk, etc).

Anyway, following your suggestion of using --debug, this is what I got before rebooting:

█▓▒░root@thinkpad-p43s█▓▒░ Thu 14/Jan/2021 07:50:13.616 
~/ cryptsetup open --debug --type plain -d /dev/urandom /dev/nvme0n1p3 to_be_wiped
# cryptsetup 2.3.4 processing "cryptsetup open --debug --type plain -d /dev/urandom /dev/nvme0n1p3 to_be_wiped"
# Running command open.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/nvme0n1p3.
# Trying to open and read device /dev/nvme0n1p3 with direct-io.
# Initialising device-mapper backend library.
# Formatting device /dev/nvme0n1p3 as type PLAIN.
# Crypto backend (OpenSSL 1.1.1i  8 Dec 2020) initialized in cryptsetup library version 2.3.4.
# Detected kernel Linux 5.4.60-1-lts x86_64.
# Activating volume to_be_wiped [keyslot -1] using keyfile /dev/urandom.
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-ioctl version 4.41.0.
# Detected dm-crypt version 1.19.0.
# Device-mapper backend running with UDEV support enabled.
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Trying to activate PLAIN device to_be_wiped using cipher aes-cbc-essiv:sha256.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Calculated device size is 1468006400 sectors (RW), offset 0.
# DM-UUID is CRYPT-PLAIN-to_be_wiped
# Udev cookie 0xd4d12c5 (semid 13) created
# Udev cookie 0xd4d12c5 (semid 13) incremented to 1
# Udev cookie 0xd4d12c5 (semid 13) incremented to 2
# Udev cookie 0xd4d12c5 (semid 13) assigned to CREATE task(0) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
# dm create to_be_wiped CRYPT-PLAIN-to_be_wiped [ opencount flush ]   [16384] (*1)
# dm reload to_be_wiped  [ opencount flush securedata ]   [16384] (*1)
device-mapper: reload ioctl on   failed: No such file or directory
# Udev cookie 0xd4d12c5 (semid 13) decremented to 1
# Udev cookie 0xd4d12c5 (semid 13) incremented to 2
# Udev cookie 0xd4d12c5 (semid 13) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
# dm remove to_be_wiped  [ opencount flush securedata ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Udev cookie 0xd4d12c5 (semid 13) decremented to 1
# Udev cookie 0xd4d12c5 (semid 13) waiting for zero
# Udev cookie 0xd4d12c5 (semid 13) destroyed
# Releasing crypt device /dev/nvme0n1p3 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command failed with code -1 (wrong or missing parameters).

And this is what I got after rebooting:

█▓▒░root@thinkpad-p43s█▓▒░ Thu 14/Jan/2021 08:27:53.800 
~/ cryptsetup open --debug --type plain -d /dev/urandom /dev/nvme0n1p3 to_be_wiped 
# cryptsetup 2.3.4 processing "cryptsetup open --debug --type plain -d /dev/urandom /dev/nvme0n1p3 to_be_wiped"
# Running command open.
# Locking memory.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/nvme0n1p3.
# Trying to open and read device /dev/nvme0n1p3 with direct-io.
# Initialising device-mapper backend library.
# Formatting device /dev/nvme0n1p3 as type PLAIN.
# Crypto backend (OpenSSL 1.1.1i  8 Dec 2020) initialized in cryptsetup library version 2.3.4.
# Detected kernel Linux 5.4.88-1-lts x86_64.
# Activating volume to_be_wiped [keyslot -1] using keyfile /dev/urandom.
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-ioctl version 4.41.0.
# Detected dm-crypt version 1.19.0.
# Device-mapper backend running with UDEV support enabled.
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Trying to activate PLAIN device to_be_wiped using cipher aes-cbc-essiv:sha256.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Calculated device size is 1468006400 sectors (RW), offset 0.
# DM-UUID is CRYPT-PLAIN-to_be_wiped
# Udev cookie 0xd4d3daa (semid 3) created
# Udev cookie 0xd4d3daa (semid 3) incremented to 1
# Udev cookie 0xd4d3daa (semid 3) incremented to 2
# Udev cookie 0xd4d3daa (semid 3) assigned to CREATE task(0) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
# dm create to_be_wiped CRYPT-PLAIN-to_be_wiped [ opencount flush ]   [16384] (*1)
# dm reload to_be_wiped  [ opencount flush securedata ]   [16384] (*1)
# dm resume to_be_wiped  [ opencount flush securedata ]   [16384] (*1)
# to_be_wiped: Stacking NODE_ADD (254,3) 0:0 0600 [trust_udev]
# to_be_wiped: Stacking NODE_READ_AHEAD 256 (flags=1)
# Udev cookie 0xd4d3daa (semid 3) decremented to 1
# Udev cookie 0xd4d3daa (semid 3) waiting for zero
# Udev cookie 0xd4d3daa (semid 3) destroyed
# to_be_wiped: Skipping NODE_ADD (254,3) 0:0 0600 [trust_udev]
# to_be_wiped: Processing NODE_READ_AHEAD 256 (flags=1)
# to_be_wiped (254:3): read ahead is 256
# to_be_wiped: retaining kernel read ahead of 256 (requested 256)
# Releasing crypt device /dev/nvme0n1p3 context.
# Releasing device-mapper backend.
# Unlocking memory.
Command successful.

Offline

#8 2021-01-15 00:01:52

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

Hmm no kernel update but the detected kernel changed from

# Detected kernel Linux 5.4.60-1-lts x86_64.

to

# Detected kernel Linux 5.4.88-1-lts x86_64.

Although I agree the kernel getting out of sync with the actual disk state is another possible cause.

Glad the issue is resolved even if the cause / fix is undetermined.

Offline

#9 2021-01-15 00:44:57

archdub
Member
From: Dublin, Ireland
Registered: 2018-03-04
Posts: 58

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

Thanks! Well spotted! I normally reboot after kernel update but forgot this time. It is such a mechanical thing that I just assumed that I had rebooted.

Not rebooting is the cause of the issue I had. I confirmed it by deleting and recreating partition 3 and cryptsetup worked fine. So no bug.

I am not sure if I should mark this as solved, since it was just a stupid mistake.

Last edited by archdub (2021-01-15 02:07:55)

Offline

#10 2023-11-29 18:26:09

mattalexx
Member
From: Austin, TX
Registered: 2012-08-03
Posts: 12

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

I had the same problem, but a reboot didn't help.

The partition I was targetting had been created in the space left over from shrinking an NTFS partition. The new partition had not been given a filesystem yet, but I assume that shouldn't matter for this command. So just to try anything, I formatted the partition with ext4. After that, it worked fine, after warning me about data loss with the new filesystem.

Before:

% sudo cryptsetup open --debug --type=plain --key-file=/dev/urandom --cipher=aes-xts /dev/sdb4 to_be_wiped
# cryptsetup 2.6.1 processing "cryptsetup open --debug --type=plain --key-file=/dev/urandom --cipher=aes-xts /dev/sdb4 to_be_wiped"
# Verifying parameters for command open.
# Running command open.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/sdb4.
# Trying to open and read device /dev/sdb4 with direct-io.
# Initialising device-mapper backend library.
# Formatting device /dev/sdb4 as type PLAIN.
# Crypto backend (OpenSSL 3.1.4 24 Oct 2023 [default][legacy]) initialized in cryptsetup library version 2.6.1.
# Detected kernel Linux 6.6.3-arch1-1 x86_64.
# Activating volume to_be_wiped [keyslot -1] using keyfile /dev/urandom.
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-ioctl version 4.48.0.
# Device-mapper backend running with UDEV support enabled.
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Trying to activate PLAIN device to_be_wiped using cipher aes-xts.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Calculated device size is 1788610150 sectors (RW), offset 0.
# dm target-version crypt  [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-crypt version 1.24.0.
# DM-UUID is CRYPT-PLAIN-to_be_wiped
# Udev cookie 0xd4dd5fd (semid 0) created
# Udev cookie 0xd4dd5fd (semid 0) incremented to 1
# Udev cookie 0xd4dd5fd (semid 0) incremented to 2
# Udev cookie 0xd4dd5fd (semid 0) assigned to CREATE task(0) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
# dm create to_be_wiped CRYPT-PLAIN-to_be_wiped [ opencount flush ]   [16384] (*1)
# dm reload   (254:0) [ opencount flush securedata ]   [16384] (*1)
device-mapper: reload ioctl on to_be_wiped (254:0) failed: Invalid argument
# Udev cookie 0xd4dd5fd (semid 0) decremented to 1
# Udev cookie 0xd4dd5fd (semid 0) incremented to 2
# Udev cookie 0xd4dd5fd (semid 0) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
# dm remove to_be_wiped  [ opencount flush securedata ]   [16384] (*1)
# Uevent not generated! Calling udev_complete internally to avoid process lock-up.
# Udev cookie 0xd4dd5fd (semid 0) decremented to 1
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Udev cookie 0xd4dd5fd (semid 0) decremented to 0
# Udev cookie 0xd4dd5fd (semid 0) waiting for zero
# Udev cookie 0xd4dd5fd (semid 0) destroyed
# Releasing crypt device /dev/sdb4 context.
# Releasing device-mapper backend.
Command failed with code -4 (wrong device or file specified).

After:

% sudo cryptsetup open --debug --type=plain --key-file=/dev/urandom /dev/sdb4 to_be_wiped
# cryptsetup 2.6.1 processing "cryptsetup open --debug --type=plain --key-file=/dev/urandom /dev/sdb4 to_be_wiped"
# Verifying parameters for command open.
# Running command open.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating context for crypt device /dev/sdb4.
# Trying to open and read device /dev/sdb4 with direct-io.
# Initialising device-mapper backend library.
WARNING: Device /dev/sdb4 already contains a 'ext4' superblock signature.

WARNING!
========
Detected device signature(s) on /dev/sdb4. Proceeding further may damage existing data.

Are you sure? (Type 'yes' in capital letters): YES
# Formatting device /dev/sdb4 as type PLAIN.
# Crypto backend (OpenSSL 3.1.4 24 Oct 2023 [default][legacy]) initialized in cryptsetup library version 2.6.1.
# Detected kernel Linux 6.6.3-arch1-1 x86_64.
# Activating volume to_be_wiped [keyslot -1] using keyfile /dev/urandom.
# dm version   [ opencount flush ]   [16384] (*1)
# dm versions   [ opencount flush ]   [16384] (*1)
# Detected dm-ioctl version 4.48.0.
# Detected dm-crypt version 1.24.0.
# Device-mapper backend running with UDEV support enabled.
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Trying to activate PLAIN device to_be_wiped using cipher aes-cbc-essiv:sha256.
# dm versions   [ opencount flush ]   [16384] (*1)
# dm status to_be_wiped  [ opencount noflush ]   [16384] (*1)
# Calculated device size is 1788610150 sectors (RW), offset 0.
# DM-UUID is CRYPT-PLAIN-to_be_wiped
# Udev cookie 0xd4df4f3 (semid 2) created
# Udev cookie 0xd4df4f3 (semid 2) incremented to 1
# Udev cookie 0xd4df4f3 (semid 2) incremented to 2
# Udev cookie 0xd4df4f3 (semid 2) assigned to CREATE task(0) with flags DISABLE_LIBRARY_FALLBACK         (0x20)
# dm create to_be_wiped CRYPT-PLAIN-to_be_wiped [ opencount flush ]   [16384] (*1)
# dm reload   (254:0) [ opencount flush securedata ]   [16384] (*1)
# dm resume to_be_wiped  [ opencount flush securedata ]   [16384] (*1)
# to_be_wiped: Stacking NODE_ADD (254,0) 0:0 0600 [trust_udev]
# to_be_wiped: Stacking NODE_READ_AHEAD 131064 (flags=1)
# Udev cookie 0xd4df4f3 (semid 2) decremented to 1
# Udev cookie 0xd4df4f3 (semid 2) waiting for zero
# Udev cookie 0xd4df4f3 (semid 2) destroyed
# to_be_wiped: Skipping NODE_ADD (254,0) 0:0 0600 [trust_udev]
# to_be_wiped: Processing NODE_READ_AHEAD 131064 (flags=1)
# to_be_wiped (254:0): read ahead is 131064
# to_be_wiped: retaining kernel read ahead of 131064 (requested 131064)
# Releasing crypt device /dev/sdb4 context.
# Releasing device-mapper backend.
Command successful.

Last edited by mattalexx (2023-11-29 18:29:42)

Offline

#11 2023-11-29 20:34:30

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: cryptsetup - device-mapper: reload ioctl on failed: No such file or

you specified an invalid cipher, --cipher=aes-xts should be aes-xts-plain64

Offline

Board footer

Powered by FluxBB