Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXT4FS Disk cannot be mounted again because of the broken filesystem #8083

Open
1 of 2 tasks
lab4ogtc opened this issue Feb 24, 2022 · 9 comments
Open
1 of 2 tasks

EXT4FS Disk cannot be mounted again because of the broken filesystem #8083

lab4ogtc opened this issue Feb 24, 2022 · 9 comments

Comments

@lab4ogtc
Copy link

Version

Microsoft Windows [Version 10.0.22557.1]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.93.2

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

wsl --mount \.\PHYSICALDRIVE2

Expected Behavior

mount successfully

Actual Behavior

The disk was attached but failed to mount: Invalid argument.
For more details, run 'dmesg' inside WSL2.
To detach the disk, run 'wsl.exe --unmount \.\PHYSICALDRIVE2'.

dmesg log:
[ 31.411807] scsi 0:0:0:3: Direct-Access WDC WD40PURX-78AKYY0 80.0 PQ: 0 ANSI: 0
[ 31.412350] sd 0:0:0:3: Attached scsi generic sg3 type 0
[ 31.412469] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 31.413306] sd 0:0:0:3: [sdd] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 31.413598] sd 0:0:0:3: [sdd] 4096-byte physical blocks
[ 31.414485] sd 0:0:0:3: [sdd] Write Protect is off
[ 31.414741] sd 0:0:0:3: [sdd] Mode Sense: 0f 00 00 00
[ 31.416201] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 31.416839] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 31.448636] sdd: sdd1
[ 31.449078] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 31.451711] sd 0:0:0:3: [sdd] Attached SCSI disk
[ 31.469402] WSL2: Detected (null) filesystem for device: /dev/sdd
[ 31.469733] ERROR: Mount:2716: mount(/dev/sdd, /share/PHYSICALDRIVE2, (null), 0x0, ) failed
[ 31.469734] 22

fdisk -l log:

The primary GPT table is corrupt, but the backup appears OK, so that will be used.
Disk /dev/sdd: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: WD40PURX-78AKYY0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2DA8DB1A-0A96-4ACC-A73F-DD27DBB70D4D

Device Start End Sectors Size Type
/dev/sdd1 34 32767 32734 16M Microsoft reserved

Partition 1 does not start on physical sector boundary.

Diagnostic Logs

No response

@lab4ogtc
Copy link
Author

More dmesg log when try again:
[ 31.411807] scsi 0:0:0:3: Direct-Access WDC WD40PURX-78AKYY0 80.0 PQ: 0 ANSI: 0
[ 31.412350] sd 0:0:0:3: Attached scsi generic sg3 type 0
[ 31.412469] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 31.413306] sd 0:0:0:3: [sdd] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 31.413598] sd 0:0:0:3: [sdd] 4096-byte physical blocks
[ 31.414485] sd 0:0:0:3: [sdd] Write Protect is off
[ 31.414741] sd 0:0:0:3: [sdd] Mode Sense: 0f 00 00 00
[ 31.416201] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 31.416839] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 31.448636] sdd: sdd1
[ 31.449078] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 31.451711] sd 0:0:0:3: [sdd] Attached SCSI disk
[ 31.469402] WSL2: Detected (null) filesystem for device: /dev/sdd
[ 31.469733] ERROR: Mount:2716: mount(/dev/sdd, /share/PHYSICALDRIVE2, (null), 0x0, ) failed
[ 31.469734] 22
[ 49.411640] hv_balloon: Max. dynamic memory size: 32718 MB
[ 65.217117] sd 0:0:0:3: [sdd] Synchronizing SCSI cache
[ 65.217659] sd 0:0:0:3: [sdd] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
[ 79.318136] scsi 0:0:0:3: Direct-Access WDC WD40PURX-78AKYY0 80.0 PQ: 0 ANSI: 0
[ 79.318860] sd 0:0:0:3: Attached scsi generic sg3 type 0
[ 79.318980] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 79.319876] sd 0:0:0:3: [sdd] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 79.320218] sd 0:0:0:3: [sdd] 4096-byte physical blocks
[ 79.321150] sd 0:0:0:3: [sdd] Write Protect is off
[ 79.321454] sd 0:0:0:3: [sdd] Mode Sense: 0f 00 00 00
[ 79.322974] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 79.323543] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 79.328264] sdd: sdd1
[ 79.328618] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 79.331233] sd 0:0:0:3: [sdd] Attached SCSI disk
[ 1040.040130] EXT4-fs (sdd): The kernel was not built with CONFIG_QUOTA and CONFIG_QFMT_V2
[ 1085.582568] sd 0:0:0:3: [sdd] Synchronizing SCSI cache
[ 1085.582993] sd 0:0:0:3: [sdd] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
[ 1111.371791] scsi 0:0:0:3: Direct-Access WDC WD40PURX-78AKYY0 80.0 PQ: 0 ANSI: 0
[ 1111.372489] sd 0:0:0:3: Attached scsi generic sg3 type 0
[ 1111.372623] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 1111.373637] sd 0:0:0:3: [sdd] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 1111.374019] sd 0:0:0:3: [sdd] 4096-byte physical blocks
[ 1111.374941] sd 0:0:0:3: [sdd] Write Protect is off
[ 1111.375192] sd 0:0:0:3: [sdd] Mode Sense: 0f 00 00 00
[ 1111.376690] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1111.377259] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 1111.381330] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 1111.383837] sd 0:0:0:3: [sdd] Attached SCSI disk
[ 1864.711844] sd 0:0:0:3: [sdd] Very big device. Trying to use READ CAPACITY(16).
[ 1864.716558] sdd: sdd1
[ 1890.639943] EXT4-fs (sdd): VFS: Can't find ext4 filesystem
[ 2811.907775] WSL2: Detected ext4 filesystem for device: /dev/sdd
[ 2811.908434] EXT4-fs (sdd): The kernel was not built with CONFIG_QUOTA and CONFIG_QFMT_V2
[ 2811.908741] ERROR: Mount:2716: mount(/dev/sdd, /share/PHYSICALDRIVE2, ext4, 0x0, ) failed
[ 2811.908742] 22
[ 2817.562228] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered
[ 2817.611538] FS-Cache: Duplicate cookie detected
[ 2817.611775] FS-Cache: O-cookie c=00000000300bb56c [p=00000000fa3247a4 fl=222 nc=0 na=1]
[ 2817.612033] FS-Cache: O-cookie d=00000000a54fd6aa n=0000000097efa422
[ 2817.612245] FS-Cache: O-key=[10] '34323935323139303430'
[ 2817.612444] FS-Cache: N-cookie c=0000000024ac4cbb [p=00000000fa3247a4 fl=2 nc=0 na=1]
[ 2817.612823] FS-Cache: N-cookie d=00000000a54fd6aa n=00000000da53db7a
[ 2817.613088] FS-Cache: N-key=[10] '34323935323139303430'
[ 2817.614260] FS-Cache: Duplicate cookie detected
[ 2817.614467] FS-Cache: O-cookie c=00000000300bb56c [p=00000000fa3247a4 fl=222 nc=0 na=1]
[ 2817.614783] FS-Cache: O-cookie d=00000000a54fd6aa n=0000000097efa422
[ 2817.614999] FS-Cache: O-key=[10] '34323935323139303430'
[ 2817.615170] FS-Cache: N-cookie c=0000000024ac4cbb [p=00000000fa3247a4 fl=2 nc=0 na=1]
[ 2817.615420] FS-Cache: N-cookie d=00000000a54fd6aa n=0000000040a07a7d
[ 2817.615629] FS-Cache: N-key=[10] '34323935323139303430'
[ 2817.616676] FS-Cache: Duplicate cookie detected
[ 2817.616876] FS-Cache: O-cookie c=00000000300bb56c [p=00000000fa3247a4 fl=222 nc=0 na=1]
[ 2817.617129] FS-Cache: O-cookie d=00000000a54fd6aa n=0000000097efa422
[ 2817.617338] FS-Cache: O-key=[10] '34323935323139303430'
[ 2817.617508] FS-Cache: N-cookie c=0000000024ac4cbb [p=00000000fa3247a4 fl=2 nc=0 na=1]
[ 2817.617802] FS-Cache: N-cookie d=00000000a54fd6aa n=00000000ce651b93
[ 2817.618036] FS-Cache: N-key=[10] '34323935323139303430'
[ 2817.792781] FS-Cache: Duplicate cookie detected
[ 2817.793179] FS-Cache: O-cookie c=00000000969caa71 [p=00000000fa3247a4 fl=222 nc=0 na=1]
[ 2817.793515] FS-Cache: O-cookie d=00000000a54fd6aa n=00000000a7952e2a
[ 2817.793868] FS-Cache: O-key=[10] '34323935323139303538'
[ 2817.794134] FS-Cache: N-cookie c=00000000c5d6447b [p=00000000fa3247a4 fl=2 nc=0 na=1]
[ 2817.794507] FS-Cache: N-cookie d=00000000a54fd6aa n=00000000d8afb921
[ 2817.794851] FS-Cache: N-key=[10] '34323935323139303538'
[ 2817.796189] FS-Cache: Duplicate cookie detected
[ 2817.796443] FS-Cache: O-cookie c=00000000969caa71 [p=00000000fa3247a4 fl=222 nc=0 na=1]
[ 2817.796873] FS-Cache: O-cookie d=00000000a54fd6aa n=00000000a7952e2a
[ 2817.797198] FS-Cache: O-key=[10] '34323935323139303538'
[ 2817.797460] FS-Cache: N-cookie c=00000000c5d6447b [p=00000000fa3247a4 fl=2 nc=0 na=1]
[ 2817.797792] FS-Cache: N-cookie d=00000000a54fd6aa n=00000000e2d018f2
[ 2817.798097] FS-Cache: N-key=[10] '34323935323139303538'
[ 2817.932567] hv_pci 8a608de4-cf83-4191-a45b-bc4c0bb607e0: PCI VMBus probing: Using version 0x10003
[ 2817.933264] 9pnet_virtio: no channels available for device drvfsa
[ 2817.933638] init: (1) WARNING: mount: waiting for virtio device...
[ 2817.979058] hv_pci 8a608de4-cf83-4191-a45b-bc4c0bb607e0: PCI host bridge to bus cf83:00
[ 2817.979420] pci_bus cf83:00: root bus resource [mem 0xbffe28000-0xbffe2afff window]
[ 2817.980282] pci cf83:00:00.0: [1af4:1049] type 00 class 0x010000
[ 2817.981108] pci cf83:00:00.0: reg 0x10: [mem 0xbffe28000-0xbffe28fff 64bit]
[ 2817.981789] pci cf83:00:00.0: reg 0x18: [mem 0xbffe29000-0xbffe29fff 64bit]
[ 2817.982475] pci cf83:00:00.0: reg 0x20: [mem 0xbffe2a000-0xbffe2afff 64bit]
[ 2817.984977] pci cf83:00:00.0: BAR 0: assigned [mem 0xbffe28000-0xbffe28fff 64bit]
[ 2817.985566] pci cf83:00:00.0: BAR 2: assigned [mem 0xbffe29000-0xbffe29fff 64bit]
[ 2817.986137] pci cf83:00:00.0: BAR 4: assigned [mem 0xbffe2a000-0xbffe2afff 64bit]
[ 2818.038437] hv_pci f240a491-f31e-4c05-9264-ce67a20246be: PCI VMBus probing: Using version 0x10003
[ 2818.084105] 9pnet_virtio: no channels available for device drvfsa
[ 2818.084401] init: (1) WARNING: mount: waiting for virtio device...
[ 2818.084571] hv_pci f240a491-f31e-4c05-9264-ce67a20246be: PCI host bridge to bus f31e:00
[ 2818.085029] pci_bus f31e:00: root bus resource [mem 0xbffe2c000-0xbffe2efff window]
[ 2818.085915] pci f31e:00:00.0: [1af4:1049] type 00 class 0x010000
[ 2818.086769] pci f31e:00:00.0: reg 0x10: [mem 0xbffe2c000-0xbffe2cfff 64bit]
[ 2818.087451] pci f31e:00:00.0: reg 0x18: [mem 0xbffe2d000-0xbffe2dfff 64bit]
[ 2818.088117] pci f31e:00:00.0: reg 0x20: [mem 0xbffe2e000-0xbffe2efff 64bit]
[ 2818.090780] pci f31e:00:00.0: BAR 0: assigned [mem 0xbffe2c000-0xbffe2cfff 64bit]
[ 2818.091390] pci f31e:00:00.0: BAR 2: assigned [mem 0xbffe2d000-0xbffe2dfff 64bit]
[ 2818.091998] pci f31e:00:00.0: BAR 4: assigned [mem 0xbffe2e000-0xbffe2efff 64bit]
[ 2818.188891] hv_pci 60ebe79f-cc08-431b-a35a-6756fad4f0b6: PCI VMBus probing: Using version 0x10003
[ 2818.234647] 9pnet_virtio: no channels available for device drvfsa
[ 2818.234944] init: (1) WARNING: mount: waiting for virtio device...
[ 2818.235077] hv_pci 60ebe79f-cc08-431b-a35a-6756fad4f0b6: PCI host bridge to bus cc08:00
[ 2818.235556] pci_bus cc08:00: root bus resource [mem 0xbffe30000-0xbffe32fff window]
[ 2818.236405] pci cc08:00:00.0: [1af4:1049] type 00 class 0x010000
[ 2818.237235] pci cc08:00:00.0: reg 0x10: [mem 0xbffe30000-0xbffe30fff 64bit]
[ 2818.237887] pci cc08:00:00.0: reg 0x18: [mem 0xbffe31000-0xbffe31fff 64bit]
[ 2818.238569] pci cc08:00:00.0: reg 0x20: [mem 0xbffe32000-0xbffe32fff 64bit]
[ 2818.241050] pci cc08:00:00.0: BAR 0: assigned [mem 0xbffe30000-0xbffe30fff 64bit]
[ 2818.241642] pci cc08:00:00.0: BAR 2: assigned [mem 0xbffe31000-0xbffe31fff 64bit]
[ 2818.242228] pci cc08:00:00.0: BAR 4: assigned [mem 0xbffe32000-0xbffe32fff 64bit]
[ 2818.339045] hv_pci b8cadf34-75ae-4b7b-b9fc-a6c15e93f903: PCI VMBus probing: Using version 0x10003
[ 2818.385345] 9pnet_virtio: no channels available for device drvfsa
[ 2818.385825] init: (1) WARNING: mount: waiting for virtio device...
[ 2818.385881] hv_pci b8cadf34-75ae-4b7b-b9fc-a6c15e93f903: PCI host bridge to bus 75ae:00
[ 2818.386457] pci_bus 75ae:00: root bus resource [mem 0xbffe34000-0xbffe36fff window]
[ 2818.387414] pci 75ae:00:00.0: [1af4:1049] type 00 class 0x010000
[ 2818.388316] pci 75ae:00:00.0: reg 0x10: [mem 0xbffe34000-0xbffe34fff 64bit]
[ 2818.389094] pci 75ae:00:00.0: reg 0x18: [mem 0xbffe35000-0xbffe35fff 64bit]
[ 2818.389818] pci 75ae:00:00.0: reg 0x20: [mem 0xbffe36000-0xbffe36fff 64bit]
[ 2818.392378] pci 75ae:00:00.0: BAR 0: assigned [mem 0xbffe34000-0xbffe34fff 64bit]
[ 2818.393030] pci 75ae:00:00.0: BAR 2: assigned [mem 0xbffe35000-0xbffe35fff 64bit]
[ 2818.393631] pci 75ae:00:00.0: BAR 4: assigned [mem 0xbffe36000-0xbffe36fff 64bit]
[ 2818.490281] hv_pci 553a1aa1-a248-412e-8728-934c6e48844b: PCI VMBus probing: Using version 0x10003
[ 2818.536515] hv_pci 553a1aa1-a248-412e-8728-934c6e48844b: PCI host bridge to bus a248:00
[ 2818.536869] pci_bus a248:00: root bus resource [mem 0xbffe38000-0xbffe3afff window]
[ 2818.537698] pci a248:00:00.0: [1af4:1049] type 00 class 0x010000
[ 2818.538526] pci a248:00:00.0: reg 0x10: [mem 0xbffe38000-0xbffe38fff 64bit]
[ 2818.539209] pci a248:00:00.0: reg 0x18: [mem 0xbffe39000-0xbffe39fff 64bit]
[ 2818.539857] pci a248:00:00.0: reg 0x20: [mem 0xbffe3a000-0xbffe3afff 64bit]
[ 2818.542350] pci a248:00:00.0: BAR 0: assigned [mem 0xbffe38000-0xbffe38fff 64bit]
[ 2818.542928] pci a248:00:00.0: BAR 2: assigned [mem 0xbffe39000-0xbffe39fff 64bit]
[ 2818.543496] pci a248:00:00.0: BAR 4: assigned [mem 0xbffe3a000-0xbffe3afff 64bit]

@lab4ogtc
Copy link
Author

What's wrong with the kernel about:
EXT4-fs (sdd): The kernel was not built with CONFIG_QUOTA and CONFIG_QFMT_V2

@mdibenigno
Copy link

I have this issue as well. Any resolution?

@edjanx
Copy link

edjanx commented Nov 11, 2022

I also have this issue. Please advise

@lab4ogtc
Copy link
Author

sudo tune2fs -O ^quota /dev/sdd
May works in wsl linux, and have to mount the disk in bare mode first, just like
wsl.exe --mount \\.\PHYSICALDRIVE2 --bare

@mjanson
Copy link

mjanson commented May 6, 2023

+1 (I realize there is a workaround, but hoping for a fix to save future keystrokes):

PS C:\Windows\system32> wmic diskdrive list brief
Caption                    DeviceID            Model                      Partitions  Size
WD_BLACK SNXXXX XXXXGB     \\.\PHYSICALDRIVE0  WD_BLACK SNXXXX XXXXGB     5           XXXXXXXXXXXXX
Sabrent  SCSI Disk Device  \\.\PHYSICALDRIVE1  Sabrent  SCSI Disk Device  1           1000XXXXXXXXX

PS C:\Windows\system32> wsl --mount \\.\PHYSICALDRIVE1
The disk was attached but failed to mount: Invalid argument.
For more details, run 'dmesg' inside WSL2.
To detach the disk, run 'wsl.exe --unmount \\.\PHYSICALDRIVE1'.
PS C:\Windows\system32> wsl --unmount \\.\PHYSICALDRIVE1
The operation completed successfully.
PS C:\Windows\system32> wsl --mount \\.\PHYSICALDRIVE1  --partition 1
The disk was successfully mounted as '/mnt/wsl/PHYSICALDRIVE1p1'.
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 \\.\PHYSICALDRIVE1'.
PS C:\Windows\system32>

strangely, it appears a mountpoint was still created for the "failed to mount":

~$ ls -d /mnt/wsl/PHYSI*
/mnt/wsl/PHYSICALDRIVE1  /mnt/wsl/PHYSICALDRIVE1p1
~$

@greenhandatsjtu
Copy link

Met same issue, and managed to mount the drive by following @mjanson

@envico801
Copy link

envico801 commented Aug 11, 2023

Just to add an error that happened to me, you have to do what @mjanson says, in my case even doing that it still didn't work, it mounted the disk but when I wanted to access the contents it threw "permission denied". To solve this just pass the ownership of the contents to your user.

Important: using the command can take a long period of time depending on the capacity of the hard disk, in my case a 300GB disk connected as removable storage took about 6 minutes. So make sure you have the time at hand first.

sudo chown -R YOURUSER DRIVE

e.g.

sudo chown -R enzod PHYSICALDRIVE2p1

@leorg99
Copy link

leorg99 commented May 12, 2024

What worked for me was to add --type ext4 to the mount arguments:

wsl --mount \\.\PhysicalDrive2 --name mydrive --partition 1 --type ext4

I also used mkfs.ext4 on the the bare mounted drive after initializing it with fdisk with ext4 fstype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants