在文件操作期间卸载外部 USB NTFS 驱动器

在文件操作期间卸载外部 USB NTFS 驱动器

我最近安装了(带有格式化磁盘选项)一个干净的 Ubuntu 22.04.2 LTS。(一切都是新的,除了 VS、Unity 和其他开箱即用的东西之外,没有任何垃圾/自定义设置)

使用 ultracopier 2.2.4.7,我将 500gb 的文件从外部 USB NTFS 驱动器复制到另一个(相同型号)外部磁盘。

在某个时候,复制开始失败。我注意到目标驱动器已卸载。制作较小的副本,即每个副本的文件较少,效果会更好。直到我无法再次安装目标驱动器(错误“(udisk-error-quark,0)”)。使用“磁盘”,我“修复”分区的文件系统,这似乎解决了安装文件系统的问题。

但现在,我注意到目标驱动器 (Joshua4TB) 在执行重要文件操作时会自行卸载并重新安装。例如,显示约有 33,000 个文件的文件夹的属性。

我在 Ubuntu 16 上没有遇到过这种问题。请注意,目标磁盘也是全新的。

使用磁盘“检查文件系统”,未发现任何错误,再次执行“修复文件系统”成功。(但我不清楚是否确实修复了某些问题)

我该如何修复驱动器?问题是什么?

/var/log/syslog 条目:自动挂载、错误、自动卸载和自动挂载之间

Apr 16 02:07:59 buntu systemd-udevd[11443]: sdc: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdc' failed with exit code 1.
Apr 16 02:07:59 buntu systemd-udevd[11443]: sdc1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdc1' failed with exit code 1.
Apr 16 02:07:59 buntu kernel: [ 9491.528096] ntfs3: Unknown parameter 'windows_names'
Apr 16 02:08:02 buntu ntfs-3g[11456]: Version 2021.8.22 integrated FUSE 28
Apr 16 02:08:02 buntu ntfs-3g[11456]: Mounted /dev/sdc1 (Read-Write, label "Joshua4TB", NTFS 3.1)
Apr 16 02:08:02 buntu ntfs-3g[11456]: Cmdline options: rw,nodev,nosuid,uid=1000,gid=1000,windows_names,uhelper=udisks2
Apr 16 02:08:02 buntu ntfs-3g[11456]: Mount options: nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,rw,default_permissions,fsname=/dev/sdc1,blkdev,blksize=4096
Apr 16 02:08:02 buntu udisksd[826]: Mounted /dev/sdc1 at /media/gm/Joshua4TB on behalf of uid 1000
Apr 16 02:08:02 buntu ntfs-3g[11456]: Global ownership and permissions enforced, configuration type 7
Apr 16 02:08:02 buntu dbus-daemon[1489]: [session uid=1000 pid=1489] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.31' (uid=1000 pid=1656 comm="/usr/bin/gnome-shell " label="unconfined")
Apr 16 02:08:02 buntu dbus-daemon[1489]: [session uid=1000 pid=1489] Successfully activated service 'org.gnome.Shell.HotplugSniffer'
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu kernel: [ 9581.691265] usb 4-1: USB disconnect, device number 23
Apr 16 02:09:29 buntu kernel: [ 9581.691424] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Apr 16 02:09:29 buntu kernel: [ 9581.691498] sd 7:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=0s
Apr 16 02:09:29 buntu kernel: [ 9581.691510] sd 7:0:0:0: [sdc] tag#0 CDB: Read(16) 88 00 00 00 00 00 44 83 4b 48 00 00 00 08 00 00
Apr 16 02:09:29 buntu kernel: [ 9581.691515] I/O error, dev sdc, sector 1149455176 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.691619] device offline error, dev sdc, sector 1149455176 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.691637] Buffer I/O error on dev sdc1, logical block 143681641, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.692665] device offline error, dev sdc, sector 1149750088 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.692686] device offline error, dev sdc, sector 1149750088 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.692689] Buffer I/O error on dev sdc1, logical block 143718505, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.693077] device offline error, dev sdc, sector 1150634824 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.693099] device offline error, dev sdc, sector 1150634824 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.693103] Buffer I/O error on dev sdc1, logical block 143829097, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.699185] device offline error, dev sdc, sector 1150929736 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.699207] device offline error, dev sdc, sector 1150929736 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.699210] Buffer I/O error on dev sdc1, logical block 143865961, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.700264] device offline error, dev sdc, sector 324936 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.700281] device offline error, dev sdc, sector 324936 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Apr 16 02:09:29 buntu kernel: [ 9581.700283] Buffer I/O error on dev sdc1, logical block 40361, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.700497] Buffer I/O error on dev sdc1, logical block 40361, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.700787] Buffer I/O error on dev sdc1, logical block 144087145, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.700979] Buffer I/O error on dev sdc1, logical block 124271055, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.701099] Buffer I/O error on dev sdc1, logical block 124271055, async page read
Apr 16 02:09:29 buntu kernel: [ 9581.701335] Buffer I/O error on dev sdc1, logical block 124271055, async page read
Apr 16 02:09:29 buntu udisksd[826]: Cleaning up mount point /media/gm/Joshua4TB (device 8:33 no longer exists)
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read index block: Input/output error
Apr 16 02:09:29 buntu systemd[1]: media-gm-Joshua4TB.mount: Deactivated successfully.
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read index block: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read index block: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read index block: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read of MFT, mft=145041 count=1 br=-1: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read of MFT, mft=145042 count=1 br=-1: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read index block: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read vcn 0x1 from inode 138980: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
[this repeat for a while]
Apr 16 02:09:29 buntu ntfs-3g[11456]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Failed to read vcn 0x0 from inode 138978: Input/output error
Apr 16 02:09:29 buntu ntfs-3g[11456]: Unmounting /dev/sdc1 (Joshua4TB)
Apr 16 02:09:29 buntu nautilus[4229]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 16 02:09:30 buntu kernel: [ 9582.059279] usb 4-1: new SuperSpeed USB device number 24 using xhci_hcd
Apr 16 02:09:30 buntu kernel: [ 9582.080020] usb 4-1: New USB device found, idVendor=1058, idProduct=2621, bcdDevice=10.34
Apr 16 02:09:30 buntu kernel: [ 9582.080025] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 16 02:09:30 buntu kernel: [ 9582.080027] usb 4-1: Product: Elements 2621
Apr 16 02:09:30 buntu kernel: [ 9582.080029] usb 4-1: Manufacturer: Western Digital
Apr 16 02:09:30 buntu kernel: [ 9582.080031] usb 4-1: SerialNumber: 57584532443932385241465A
Apr 16 02:09:30 buntu kernel: [ 9582.081700] usb-storage 4-1:1.0: USB Mass Storage device detected
Apr 16 02:09:30 buntu kernel: [ 9582.082032] scsi host7: usb-storage 4-1:1.0
Apr 16 02:09:30 buntu mtp-probe: checking bus 4, device 24: "/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1"
Apr 16 02:09:30 buntu mtp-probe: bus: 4, device: 24 was not an MTP device
Apr 16 02:09:30 buntu mtp-probe: checking bus 4, device 24: "/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1"
Apr 16 02:09:30 buntu mtp-probe: bus: 4, device: 24 was not an MTP device
Apr 16 02:09:31 buntu kernel: [ 9583.112431] scsi 7:0:0:0: Direct-Access     WD       Elements 2621    1034 PQ: 0 ANSI: 6
Apr 16 02:09:31 buntu kernel: [ 9583.112898] sd 7:0:0:0: Attached scsi generic sg3 type 0
Apr 16 02:09:31 buntu kernel: [ 9583.113122] sd 7:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
Apr 16 02:09:31 buntu kernel: [ 9583.113270] sd 7:0:0:0: [sdc] 7813969920 512-byte logical blocks: (4.00 TB/3.64 TiB)
Apr 16 02:09:31 buntu kernel: [ 9583.113273] sd 7:0:0:0: [sdc] 4096-byte physical blocks
Apr 16 02:09:31 buntu kernel: [ 9583.113569] sd 7:0:0:0: [sdc] Write Protect is off
Apr 16 02:09:31 buntu kernel: [ 9583.113572] sd 7:0:0:0: [sdc] Mode Sense: 47 00 10 08
Apr 16 02:09:31 buntu kernel: [ 9583.113863] sd 7:0:0:0: [sdc] No Caching mode page found
Apr 16 02:09:31 buntu kernel: [ 9583.113865] sd 7:0:0:0: [sdc] Assuming drive cache: write through
Apr 16 02:09:31 buntu kernel: [ 9583.301681]  sdc: sdc1
Apr 16 02:09:31 buntu kernel: [ 9583.301883] sd 7:0:0:0: [sdc] Attached SCSI disk
Apr 16 02:09:31 buntu systemd-udevd[11517]: sdc: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdc' failed with exit code 1.
Apr 16 02:09:31 buntu systemd-udevd[11517]: sdc1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdc1' failed with exit code 1.
Apr 16 02:09:31 buntu kernel: [ 9583.758705] ntfs3: Unknown parameter 'windows_names'

sudo hdparm -I /dev/sdc1

/dev/sdc1:

ATA device, with non-removable media
    Model Number:       WDC WD40NDZW-11BCSS0                    
    Serial Number:     [REDACTED]
    Firmware Revision:  01.01A01
    Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
    Used: unknown (minor revision code 0x006d) 
    Supported: 10 9 8 7 6 5 
    Likely used: 10
Configuration:
    Logical     max current
    cylinders   16383   0
    heads       16  0
    sectors/track   63  0
    --
    LBA    user addressable sectors:   268435455
    LBA48  user addressable sectors:  7813971632
    Logical  Sector size:                   512 bytes
    Physical Sector size:                  4096 bytes
    Logical Sector-0 offset:                  0 bytes
    device size with M = 1024*1024:     3815415 MBytes
    device size with M = 1000*1000:     4000753 MBytes (4000 GB)
    cache/buffer size  = unknown
    Form Factor: 2.5 inch
    Nominal Media Rotation Rate: 4800
Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, with device specific minimum
    R/W multiple sector transfer: Max = 16  Current = 0
    Advanced power management level: 128
    DMA: *mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 udma6 
         Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4 
         Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
    Enabled Supported:
       *    SMART feature set
            Security Mode feature set
       *    Power Management feature set
       *    Write cache
       *    Look-ahead
       *    WRITE_BUFFER command
       *    READ_BUFFER command
       *    NOP cmd
       *    DOWNLOAD_MICROCODE
       *    Advanced Power Management feature set
            Power-Up In Standby feature set
       *    SET_FEATURES required to spinup after power up
       *    48-bit Address feature set
       *    Mandatory FLUSH_CACHE
       *    FLUSH_CACHE_EXT
       *    SMART error logging
       *    SMART self-test
       *    General Purpose Logging feature set
       *    64-bit World wide name
       *    IDLE_IMMEDIATE with UNLOAD
       *    {READ,WRITE}_DMA_EXT_GPL commands
       *    Segmented DOWNLOAD_MICROCODE
       *    Gen1 signaling speed (1.5Gb/s)
       *    Gen2 signaling speed (3.0Gb/s)
       *    Gen3 signaling speed (6.0Gb/s)
       *    Native Command Queueing (NCQ)
       *    Phy event counters
       *    Idle-Unload when NCQ is active
       *    NCQ priority information
       *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
            DMA Setup Auto-Activate optimization
            Software settings preservation
       *    SMART Command Transport (SCT) feature set
       *    SCT Write Same (AC2)
       *    SCT Features Control (AC4)
       *    SCT Data Tables (AC5)
            unknown 206[7]
            unknown 206[12] (vendor specific)
            unknown 206[13] (vendor specific)
       *    Device encrypts all user data
       *    DOWNLOAD MICROCODE DMA command
       *    WRITE BUFFER DMA command
       *    READ BUFFER DMA command
       *    Data Set Management TRIM supported (limit 255 blocks)
       *    Deterministic read data after TRIM
Security: 
    Master password revision code = 65534
        supported
    not enabled
    not locked
    not frozen
    not expired: security count
        supported: enhanced erase
    772min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee26ad12f84
    NAA     : 5
    IEEE OUI    : 0014ee
    Unique ID   : [REDACTED]
Checksum: correct

答案1

所以...我至少遇到了一个问题,也许两个。都是硬件问题。

同一块硬盘在另一台计算机上工作正常。

  1. 我的 OS 使用了 5 年以上的 SSD 硬盘出现了问题。扫描磁盘有所帮助,但并没有解决问题。实际上,它最近完全停止了启动……

  2. 我怀疑 USB 控制器也出现了问题。但我的 *nix-fu 太弱了,无法准确诊断出问题。

相关内容