USB SSD未挂载但无法格式化(LUKS格式)

USB SSD未挂载但无法格式化(LUKS格式)

我正在尝试使用 LUKS 加密连接到我的小型服务器的 USB SSD。 SSD未安装,但仍无法格式化。 (sda1 是我的外部驱动器)

sudo cryptsetup --verbose --verify-passphrase luksFormat /dev/sda1

Device /dev/sda1 is in use. Can not proceed with format operation.
Command failed with code -1 (wrong or missing parameters).

我尝试了以下方法:

sudo lsof | grep sda1

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1002/gvfs
      Output information may be incomplete.

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.

jbd2/sda1  411                            root  cwd       DIR      179,7     4096          2 /

jbd2/sda1  411                            root  rtd       DIR      179,7     4096          2 /

jbd2/sda1  411                            root  txt   unknown                                /proc/411/exe
ps -A | grep 411

411 ?        00:00:00 jbd2/sda1-8

我在互联网上找到的关于 jbd2 的所有信息都是“日志块设备”,那么它与日志有关吗?

对评论的答复

$ lsblk /dev/sda1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda1 8:1 0 931.5G 0 part


$ ls -l /sys/block/sda/sda1/holders/
total 0
sudo sfdisk -l /dev/sda
sudo password for xxx:
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Portable SSD T5
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: xxx

Device Start End Sectors Size Type 
/dev/sda1 2048 1953523711 1953521664 931.5G Linux filesystem
fuser -m /dev/sda1
Nothing comes out
$ mount
/dev/mmcblk0p7 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1867780k,nr_inodes=117763,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/var/lib/snapd/snaps/core_9069.snap on /snap/core/9069 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1751.snap on /snap/core18/1751 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snap-store_418.snap on /snap/snap-store/418 type squashfs (ro,nodev,relatime,x-gdu.hide)
/dev/mmcblk0p6 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=399972k,mode=700,uid=1000,gid=1000)
tmpfs on /run/user/1002 type tmpfs (rw,nosuid,nodev,relatime,size=399972k,mode=700,uid=1002,gid=1002)
gvfsd-fuse on /run/user/1002/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1002,group_id=1002)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

grep sda1 /proc/mounts
Nothing comes out but still cannot format disk.

相关内容