FreeBSD 在使用 ext2fs 与扇区大小为 4096 字节的外部 USB 硬盘驱动器时是否存在问题?

FreeBSD 在使用 ext2fs 与扇区大小为 4096 字节的外部 USB 硬盘驱动器时是否存在问题?

我有两个相同的 1TB 外部 USB 磁盘,我已在 Linux 下使用ext2fs.如果我lsusb在 Linux 中运行,我会得到以下几行:

Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. 
Bus 004 Device 003: ID 174c:55aa ASMedia Technology Inc. 

两个驱动器都有一个分区占据整个磁盘。当我启动到 FreeBSD 时,两个驱动器被报告为/dev/da0/dev/da1,分区为/dev/da0s1/dev/da1s1。我可以/dev/da0s1毫无问题地安装:

mount -t ext2fs /dev/da0s1 <path>

但是当我想安装第二个驱动器时

mount -t ext2fs /dev/da1s1 <path>

我收到消息

mount: /dev/da1s1: Invalid argument

gpart list我不知道它是否有帮助,这是两个磁盘的输出:

Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 1953525167
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: da0s1
   Mediasize: 1000201224704 (932G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   rawtype: 131
   length: 1000201224704
   offset: 1048576
   type: linux-data
   index: 1
   end: 1953520064
   start: 2048
Consumers:
1. Name: da0
   Mediasize: 1000204886016 (932G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e2

Geom name: da1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 244190645
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: da1s1
   Mediasize: 1000193654784 (932G)
   Sectorsize: 4096
   Stripesize: 0
   Stripeoffset: 262144
   Mode: r0w0e0
   attrib: active
   rawtype: 131
   length: 1000193654784
   offset: 262144
   type: linux-data
   index: 1
   end: 244187967
   start: 64
Consumers:
1. Name: da1
   Mediasize: 1000204886016 (932G)
   Sectorsize: 4096
   Mode: r0w0e0

编辑

我尝试删除好磁盘并重新启动。现在坏磁盘被检测为/dev/da0。这是输出dmesg

da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <Intenso USB 3.0 device 0> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 30100000000000000263
da0: 400.000MB/s transfers
da0: 953869MB (244190646 4096 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

并且安装失败:

# mount -t ext2fs /dev/da0s1 mnt0
mount: /dev/da0s1: Invalid argument

对于两个磁盘,输出为dmesg

da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <Intenso USB 3.0 Device 0> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 30700000000000001682
da0: 400.000MB/s transfers
da0: 953869MB (1953525168 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
...
da1 at umass-sim1 bus 1 scbus7 target 0 lun 0
da1: <Intenso USB 3.0 device 0> Fixed Direct Access SPC-4 SCSI device
da1: Serial Number 30100000000000000263
da1: 400.000MB/s transfers
da1: 953869MB (244190646 4096 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
...

坏盘使用 4096 字节扇区,而好盘使用 512 字节扇区。扇区大小会成为问题吗?

笔记

我一直没能解决这个问题。我最终决定使用 UFS 格式化这两个磁盘,将它们连接到 FreeBSD Raspberrypi,并通过网络将它们提供给其他计算机。

相关内容