华硕 l210 上的 opensuse leap 15.4
我的 USB 文件系统上有无法读取/无法移除的文件。有人能解释一下以下命令序列吗?以及我可以做什么来解决这个问题?
/media/q/Elements/bkp/Convert/Adams/Shardik $ ls -l
total 104
drwxrwxrwx 1 root root 106496 Jul 21 13:33 i/
/media/q/Elements/bkp/Convert/Adams/Shardik $ cd i
/media/q/Elements/bkp/Convert/Adams/Shardik/i $ ls -l
ls: reading directory '.': Input/output error
total 0
/media/q/Elements/bkp/Convert/Adams/Shardik/i $ cd ..
/media/q/Elements/bkp/Convert/Adams/Shardik $ rm -r -f i
rm: cannot remove 'i': Directory not empty
/media/q/Elements/bkp/Convert/Adams/Shardik $ sudo rm -r -f i
[sudo] password for root:
rm: cannot remove 'i': Directory not empty
/media/q/Elements/bkp/Convert/Adams/Shardik $ cd i
/media/q/Elements/bkp/Convert/Adams/Shardik/i $ rm -f *
/media/q/Elements/bkp/Convert/Adams/Shardik/i $ cd ..
/media/q/Elements/bkp/Convert/Adams/Shardik $ rmdir i
rmdir: failed to remove 'i': Directory not empty
/media/q/Elements/bkp/Convert/Adams/Shardik $ ls -l i/*.*
ls: cannot access 'i/*.*': No such file or directory
/media/q/Elements/bkp/Convert/Adams/Shardik $ ls -l i
ls: reading directory 'i': Input/output error
total 0
/media/q/Elements/bkp/Convert/Adams/Shardik $
此 fs 上的内容并非由 chattr 创建
/media/q/Elements/bkp/Convert/Adams/Shardik $ sudo chattr -i i/*.*
[sudo] password for root:
chattr: No such file or directory while trying to stat i/*.*
/media/q/Elements/bkp/Convert/Adams/Shardik $ sudo lsattr i/*
lsattr: No such file or directory while trying to stat i/*
如果有帮助的话,fdisk 将列出相关设备
Disk /dev/sda: 4.55 TiB, 5000947302400 bytes, 9767475200 sectors
Disk model: Elements 2621
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: F7568B1B-3550-47AB-99FE-0C493E536C41
设备起始结束扇区大小类型 /dev/sda1 2048 9767473151 9767471104 4.5T Microsoft 基本数据
正如 Kamil Maciorowski 的以下评论所建议的那样:
$ sudo smartctl -a /dev/sda
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.14.21-150400.24.33-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Elements / My Passport (USB, AF)
Device Model: WDC WD50NDZW-11BCSS0
Serial Number: WD-WX72DB136EXY
LU WWN Device Id: 5 0014ee 2bf8fe6d0
Firmware Version: 01.01A01
User Capacity: 5,000,947,523,584 bytes [5.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 4800 rpm
Form Factor: 2.5 inches
TRIM Command: Available, deterministic
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Wed Dec 7 13:16:33 2022 PST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 1500) seconds.
Offline data collection
capabilities: (0x1b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
No Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 11) minutes.
SCT capabilities: (0x30b5) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 253 253 021 Pre-fail Always - 4433
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 335
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 283
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 281
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 264
193 Load_Cycle_Count 0x0032 198 198 000 Old_age Always - 6499
194 Temperature_Celsius 0x0022 120 105 000 Old_age Always - 32
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 241 -
Selective Self-tests/Logging not supported
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
└─sda1 ntfs Elements
F0220C5C220C29E4 2.5T 45% /media/q/Elements
/media/q/Elements/bkp/Convert/Adams/Shardik $ rm -fr i|sudo dmesg|tail
rm: cannot remove 'i': Directory not empty
[ 16.042041] rtw_8821ce 0000:02:00.0: stop vif 52:41:fc:92:46:60 on port 0
[ 16.557898] rtw_8821ce 0000:02:00.0: start vif 20:4e:f6:78:42:fd on port 0
[ 20.604282] wlan1: authenticate with d0:15:a6:0f:9a:d1
[ 21.137016] wlan1: send auth to d0:15:a6:0f:9a:d1 (try 1/3)
[ 21.137852] wlan1: authenticated
[ 21.189079] wlan1: associate with d0:15:a6:0f:9a:d1 (try 1/3)
[ 21.190102] wlan1: RX AssocResp from d0:15:a6:0f:9a:d1 (capab=0x1 status=0 aid=2)
[ 21.190122] rtw_8821ce 0000:02:00.0: sta d0:15:a6:0f:9a:d1 joine d with macid 0
[ 21.190412] wlan1: associated
[ 21.192561] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready