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

ERROR: unknown entry type 0xff #192

Open
ryderkun opened this issue Mar 7, 2023 · 8 comments
Open

ERROR: unknown entry type 0xff #192

ryderkun opened this issue Mar 7, 2023 · 8 comments
Labels

Comments

@ryderkun
Copy link

ryderkun commented Mar 7, 2023

Hello, let me first describe my use process. I wrote data to the U disk, and then it was full, and there was no space. I used umont, but it didn’t return for a long time. I suspected that the terminal was stuck, and I reopened it. Terminal, df -hl saw that the U disk was not mounted, so I pulled the U disk out of the machine, but when I plugged the U disk into my computer, I found that there was nothing in it, and when I executed the ls command, "ls : reading directory '.': Input/output error", I tried to search for a solution through google, and executed the command "fsck.exfat /dev/sdb1", the result is as follows:

exfatfsck 1.2.8
WARN: volume was not unmounted cleanly.
Checking file system on /dev/sdb1.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 500 GB
Used space 495 GB
Available space 5509 MB
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
Totally 82 directories and 1024 files.
File system checking finished. ERRORS FOUND: 69.

df -i

Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sdb1 4095873 4051800 44073 99% /data1

dumpexfat -s /dev/sdb1

Volume serial number 0xe23d71a1
FS version 1.0
Sector size 512
Cluster size 131072
Sectors count 1048575744
Clusters count 4095873
First sector 0
FAT first sector 128
FAT sectors count 32128
First cluster sector 32256
Root directory cluster 7
Volume state 0x0002
FATs count 1
Drive number 0x80
Allocated space 100%

mount.exfat-fuse -d /dev/sdb1 /data1
FUSE exfat 1.2.8
FUSE library version: 2.9.7
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.26
flags=0x001ffffb
max_readahead=0x00020000
INIT: 7.19
flags=0x00000031
max_readahead=0x00020000
max_write=0x00020000
max_background=0
congestion_threshold=0
unique: 1, success, outsize: 40

unique: 170, opcode: GETATTR (3), nodeid: 3, insize: 56, pid: 23107
getattr /H
unique: 170, success, outsize: 120
unique: 171, opcode: OPENDIR (27), nodeid: 3, insize: 48, pid: 23107
unique: 171, success, outsize: 32
unique: 172, opcode: READDIR (28), nodeid: 3, insize: 80, pid: 23107
readdir[0] from 0
ERROR: unknown entry type 0xff.
ERROR: failed to open directory '/H'.
unique: 172, error: -5 (Input/output error), outsize: 16
unique: 173, opcode: RELEASEDIR (29), nodeid: 3, insize: 64, pid: 0
unique: 173, success, outsize: 16

@relan relan added the question label Mar 8, 2023
@relan
Copy link
Owner

relan commented Mar 8, 2023

Ejection without clean unmount can ruin FS, unfortunately. Looks like the root directory is damaged.

What's your question? If you want to recover data, I'd recommend using something like PhotoRec and then run exfatfsck against the broken FS (you need exfat-utils 1.3.0 for this). If exfatfsck manages to fix the errors, copy data to some other storage and re-make the exFAT FS (mkexfatfs). Anyway some data will be lost.

@ryderkun
Copy link
Author

ryderkun commented Mar 9, 2023

OK,Thank you, I downloaded exfat-utils_1.3.0-1_amd64.deb and installed it with dpkg -i, but there is still no way to restore the data. Thank you very much for taking the time to answer my question, thank you very much

@relan
Copy link
Owner

relan commented Mar 9, 2023

but there is still no way to restore the data

Could you post the log from exfatfsck 1.3.0 run against the broken FS?

@ryderkun
Copy link
Author

root@localhost:/# exfatfsck -n /dev/sdb1
exfatfsck 1.3.0
Checking file system on /dev/sdb1.
WARN: volume was not unmounted cleanly.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 500 GB
Used space 495 GB
Available space 5509 MB
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
ERROR: unknown entry type 0xff.
Totally 82 directories and 1024 files.
File system checking finished. ERRORS FOUND: 69, FIXED: 0.
root@localhost:/# exfatfsck -y /dev/sdb1
exfatfsck 1.3.0
Checking file system on /dev/sdb1.
WARN: volume was not unmounted cleanly.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 500 GB
Used space 495 GB
Available space 5509 MB
ERROR: unknown entry type 0xff.
Fix (Y/N)? Y
ERROR: unknown entry type 0xff.
Fix (Y/N)? Y
ERROR: unknown entry type 0xff.
Fix (Y/N)? Y
…………………………
…………………………
ERROR: unknown entry type 0xff.
Fix (Y/N)? Y
Totally 82 directories and 1024 files.
File system checking finished. ERRORS FOUND: 282593, FIXED: 282593.
root@localhost:/# cd /data1
root@localhost:/data1# ls
H 小灯塔3
root@localhost:/data1# cd H
root@localhost:/data1/H# ls
root@localhost:/data1/H# cd ..
root@localhost:/data1# exfatfsck /dev/sdb1
exfatfsck 1.3.0
Checking file system on /dev/sdb1.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 500 GB
Used space 495 GB
Available space 5509 MB
Totally 82 directories and 1024 files.
File system checking finished. No errors found.
root@lo ca ho s t:/data1# exfatfsck -n /dev/sdb1
exfatfsck 1.3.0
Checking file system on /dev/sdb1.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 500 GB
Used space 495 GB
Available space 5509 MB
Totally 82 directories and 1024 files.
File system checking finished. No errors found.

@relan
Copy link
Owner

relan commented Mar 10, 2023

File system checking finished. ERRORS FOUND: 282593, FIXED: 282593.

Bad luck :(

@awik32
Copy link

awik32 commented Oct 14, 2023

exfatfsck keeps reporting the same number of errors when running it repeatedly, even though it claims to have fixed them:
File system checking finished. ERRORS FOUND: 8960, FIXED: 8960.

The errors it keeps finding (and fixing?) are:
ERROR: unknown entry type 0xff.

Regards,
Albert.

@relan
Copy link
Owner

relan commented Oct 16, 2023

exfatfsck keeps reporting the same number of errors when running it repeatedly, even though it claims to have fixed them: File system checking finished. ERRORS FOUND: 8960, FIXED: 8960.

This may happen when write operations fail. Does exfatfsck report any other errors besides "unknown entry type"?

@awik32
Copy link

awik32 commented Oct 23, 2023

Not usually, but sometimes I think it says something about a label too long.

If it matters, the file system is on a Lenovo 2 TB USB memory stick.

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

No branches or pull requests

3 participants