外部 USB 硬盘 ext4 分区在 Ubuntu 14.04.5 LTS 上以只读方式挂载,建议使用 e2fsck

外部 USB 硬盘 ext4 分区在 Ubuntu 14.04.5 LTS 上以只读方式挂载,建议使用 e2fsck

当我将 1TB 的 Seagate 硬盘插入台式电脑的 USB 端口时,它成功挂载 NTFS 文件系统 /dev/sdc1,但由于加载文件系统日志时出现明显错误,无法挂载 ext 文件系统 /dev/sdc2。

以下是我插入驱动器后的几秒钟内 /var/log/syslog 中出现的内容:

Jun 24 20:48:11 somehost kernel: [6670321.891087] usb 1-1.2: new high-speed USB device number 44 using ehci-pci
Jun 24 20:48:11 somehost kernel: [6670322.010683] usb 1-1.2: New USB device found, idVendor=0bc2, idProduct=2332
Jun 24 20:48:11 somehost kernel: [6670322.010689] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 24 20:48:11 somehost kernel: [6670322.010693] usb 1-1.2: Product: Portable
Jun 24 20:48:11 somehost kernel: [6670322.010696] usb 1-1.2: Manufacturer: Seagate
Jun 24 20:48:11 somehost kernel: [6670322.010699] usb 1-1.2: SerialNumber: 2GHH43FZ
Jun 24 20:48:11 somehost mtp-probe: checking bus 1, device 44: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Jun 24 20:48:11 somehost mtp-probe: bus: 1, device: 44 was not an MTP device
Jun 24 20:48:11 somehost kernel: [6670322.011257] usb-storage 1-1.2:1.0: USB Mass Storage device detected
Jun 24 20:48:11 somehost kernel: [6670322.011309] scsi50 : usb-storage 1-1.2:1.0
Jun 24 20:48:12 somehost kernel: [6670323.011231] scsi 50:0:0:0: Direct-Access     Seagate  Portable         SF04 PQ: 0 ANSI: 4
Jun 24 20:48:12 somehost kernel: [6670323.011508] sd 50:0:0:0: Attached scsi generic sg3 type 0
Jun 24 20:48:12 somehost kernel: [6670323.012501] sd 50:0:0:0: [sdc] 1953525164 512-byte logical blocks: (1.00 TB/931 GiB)
Jun 24 20:48:12 somehost kernel: [6670323.014587] sd 50:0:0:0: [sdc] Write Protect is off
Jun 24 20:48:12 somehost kernel: [6670323.014591] sd 50:0:0:0: [sdc] Mode Sense: 1c 00 00 00
Jun 24 20:48:12 somehost kernel: [6670323.017357] sd 50:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jun 24 20:48:12 somehost kernel: [6670323.059605]  sdc: sdc1 sdc2
Jun 24 20:48:12 somehost kernel: [6670323.124689] sd 50:0:0:0: [sdc] Attached SCSI disk
Jun 24 20:48:15 somehost kernel: [6670325.576840] end_request: critical target error, dev sdc, sector 0
Jun 24 20:48:15 somehost kernel: [6670325.576848] JBD2: recovery failed
Jun 24 20:48:15 somehost kernel: [6670325.576852] EXT4-fs (sdc2): error loading journal
Jun 24 20:48:16 somehost ntfs-3g[508]: Version 2013.1.13AR.1 external FUSE 29
Jun 24 20:48:16 somehost ntfs-3g[508]: Mounted /dev/sdc1 (Read-Write, label "Expansion Drive", NTFS 3.1)
Jun 24 20:48:16 somehost ntfs-3g[508]: Cmdline options: rw,nosuid,nodev,uhelper=udisks2,uid=1000,gid=1000,dmask=0077,fmask=0177
Jun 24 20:48:16 somehost ntfs-3g[508]: Mount options: rw,nosuid,nodev,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdc1,blkdev,blksize=4096
Jun 24 20:48:16 somehost ntfs-3g[508]: Global ownership and permissions enforced, configuration type 7
Jun 24 20:48:16 somehost udisksd[2934]: Mounted /dev/sdc1 at /media/ps/Expansion Drive on behalf of uid 1000

在这种情况下,sdc2 分区无法访问,但在其他情况下,它会成功安装,但它是只读的,我看到的是:

Jun 24 20:56:21 somehost kernel: [6670811.293826] EXT4-fs (sdc2): warning: mounting fs with errors, running e2fsck is recommended
Jun 24 20:56:21 somehost kernel: [6670811.295543] EXT4-fs (sdc2): mounted filesystem with ordered data mode. Opts: (null)
Jun 24 20:56:21 somehost udisksd[2934]: Mounted /dev/sdc2 at /media/ps/f9940392-a20f-461d-a7c3-6c1132acf20b on behalf of uid 1000
Jun 24 20:56:26 somehost kernel: [6670816.539506] end_request: critical target error, dev sdc, sector 1218352432
Jun 24 20:56:26 somehost kernel: [6670816.539518] Aborting journal on device sdc2-8.

当我尝试在 sdc2 挂载点“touch foobar”时,出现“无法触摸‘foobar’:只读文件系统”。

我将同一个驱动器插入 ChromeBook 上,sdc2 分区成功以读写方式挂载,我可以在其上创建文件。

回到 PC 上,我尝试了“e2fsck/dev/sdc2”,得到了以下结果:

e2fsck 1.42.9 (4-Feb-2014)
/dev/sdc2: recovering journal
/dev/sdc2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdc2: 2131785/45793280 files (0.2% non-contiguous), 128417943/183154845 blocks

当我再次挂载分区时,仍然出现以下信息:

Jun 24 21:05:44 somehost kernel: [6671374.212541] end_request: critical target error, dev sdc, sector 1218352432
Jun 24 21:05:44 somehost kernel: [6671374.212568] Aborting journal on device sdc2-8.

fdisk 表示:

Disk /dev/sdc: 1000.2 GB, 1000204883968 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525164 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa03cb026

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63   488281367   244140652+   7  HPFS/NTFS/exFAT
/dev/sdc2       488281368  1953520127   732619380   83  Linux

在我将 Ubuntu 从 12.04 升级到 14.04 之前没有出现过这个问题,但这可能是一个巧合。

问题

  1. 这可能是驱动器的硬件问题吗?

  2. 如果可能的话,我是否应该尝试使用任何命令行选项来强制 e2fsck 解决问题?

  3. 唯一的解决方案是重新格式化 sdc2(使用 mke2fs)吗?(数据不是很重要,因为它是一堆备份。)

谢谢。

相关内容