问题
输入
wsl --mount \\.\PhysicalDrive2\
报错
A device attached to the system is not functioning.
Error code: Wsl/Service/AttachDisk/HCS/0x8007001f
解决方法
检查一下硬盘有没有检查到
GET-CimInstance -query "SELECT * from Win32_DiskDrive"
DeviceID Caption Partitions Size Model
-------- ------- ---------- ---- -----
\\.\PHYSICALDRIVE0 Samsung SSD 990 PRO 2TB 1 2000396321280 Samsung SSD 990 PRO 2TB
\\.\PHYSICALDRIVE1 CT1000P3SSD8 2 1000202273280 CT1000P3SSD8
\\.\PHYSICALDRIVE2 ST2000LM 007-1R8174 SCSI Disk Device 0 2000396321280 ST2000LM 007-1R8174 SCSI Disk Device
发现不知道什么原因,名字变了,大小写变了
重新输入
wsl --mount \\.\PHYSICALDRIVE2
成功
The disk was successfully mounted as '/mnt/wsl/PHYSICALDRIVE2'.
Note: The location will be different if you have modified the automount.root setting in /etc/wsl.conf.
To unmount and detach the disk, run 'wsl.exe --unmount \\.\PHYSICALDRIVE2'.