我挖出了一个旧硬盘,想看看里面有什么。我不记得它是否曾经分区过,是否运行 Windows,或者它是否只是一个备份磁盘。
这是我所做的:
插入磁盘,Ubuntu才不是识别磁盘并且不会自动挂载。
打开分区. 看到这个错误:
Invalid argument during seek for read on /dev/sdd
然后在 /dev/sdd 上显示未分配的 2.73 TB
sudo fdisk -l
Disk /dev/sdd: 3000.6 GB, 3000591900160 bytes 255 heads, 63 sectors/track, 364801 cylinders, total 5860531055 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: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 1 4294967295 2147483647+ ee GPT
sudo smartctl --all /dev/sdd
=== START OF INFORMATION SECTION === Model Family: Seagate Barracuda 7200.14 (AF) Device Model: ST3000DM001-1CH166 Serial Number: Z1F3ZH6B LU WWN Device Id: 5 000c50 0652247c5 Firmware Version: CC27 User Capacity: 3,000,591,900,160 bytes [3.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 7200 rpm Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2, ACS-3 T13/2161-D revision 3b SATA Version is: SATA 3.1, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Sat May 21 18:05:13 2016 EDT ==> WARNING: A firmware update for this drive may be available, see the following Seagate web pages: http://knowledge.seagate.com/articles/en_US/FAQ/207931en http://knowledge.seagate.com/articles/en_US/FAQ/223651en 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: ( 584) seconds. Offline data collection capabilities: (0x73) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. No Offline surface scan supported. Self-test supported. Conveyance Self-test supported. 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: ( 1) minutes. Extended self-test routine recommended polling time: ( 321) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x3085) SCT Status supported. SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 100 100 006 Pre-fail Always - 1452432 3 Spin_Up_Time 0x0003 099 099 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 2 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 7 Seek_Error_Rate 0x000f 100 253 030 Pre-fail Always - 146028888090 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 5 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 20 183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0 184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 0 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 069 065 045 Old_age Always - 31 (Min/Max 29/31) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 10 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 38 194 Temperature_Celsius 0x0022 031 040 000 Old_age Always - 31 (0 27 0 0 0) 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 6h+00m+31.860s 241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 89828161 242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 234961 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.
`
这是 Seagate 3TB 的劣质硬盘之一,故障率很高(并且会引发集体诉讼)。这个硬盘只是一块未分区的空硬盘吗?它还能正常工作吗?
我即将重新格式化此磁盘,但我想确保不会覆盖任何内容。这样安全吗?
答案1
看起来您可能正在使用 USB 外壳。
你怎么知道的?SMART 报告磁盘高级格式(4096 字节物理扇区),但fdisk
看到的是 512 字节物理扇区。USB 外壳显示 512 字节物理扇区,尽管这并不正确。 更多详情请点击这里。
我看到fdisk
只能看到4294967295 blocks
或。 USB 外壳可能根本2TiB
无法使用超过的高级格式磁盘。 我建议:2TiB
- 获取支持高级格式化的新外壳或
- 通过 SATA 电缆将磁盘直接插入计算机。
某些 USB 外壳可以处理高级格式化,但仍会报告 512 字节物理扇区。如果您有这样的外壳,为了安装此磁盘,您应该让 Linux 忽略错误的扇区大小。以下是使用回送设备:
LODEVICE="$(losetup -f)"
sudo losetup "$LODEVICE" /dev/sdd
sudo partprobe "$LODEVICE"
运行后losetup
,您应该有一个名为的设备/dev/loop#
,其中/dev/loop#
存储在的字符串$LODEVICE
。
运行后partprobe
,您应该有一个名为 的设备/dev/loop#p1
。
可能还有其他分区,您可以使用该lsblk
命令找到它们。输出应该类似于以下内容:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
⋮
loop# 7:0 0 22.4G 0 loop
├─loop#p1 259:0 0 512M 0 loop
├─loop#p2 259:1 0 244M 0 loop
└─loop#p3 259:2 0 21.6G 0 loop
如果您想要挂载第一个分区/mnt
,您可以这样做:
sudo mount "${LODEVICE}p1" /mnt
然后您可以跑去ls /mnt
看看里面有什么。
卸载完成后,您可以像这样断开环回设备:
sudo losetup -d "$LODEVICE"