最終編集 ご意見ありがとうございます。確かに多くのことを学びました。残念ながら、彼らはハードドライブを返すことに決めた後、自己テストを行った後、デバイスに欠陥があると結論付けました。
最近、Ubuntuコンピュータに追加するために内蔵4TBハードドライブを購入しました。これは、既存のコンピュータにハードドライブを追加し、特定の場所にマウントする最初の試みです。残念ながら、いくつかの問題が発生しましたが、私が見た同様の投稿のどれも私の問題を完全に解決していませんでした。だから私は私が理解したこと、私が従ったステップ、私が直面しているエラーの完全な分析を提供しようとします。
私のUbuntuバージョン:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
まず、HDDにパーティションを追加してHDDをマウントしようとしたときに何度も失敗した後にテーブルをシャットダウンしたので、それに基づいてください。
sudo dd if=/dev/zero of=/dev/sdc bs=1M count=10
ディスクは/dev/sdcです。
lsblkを使用したときの出力は次のとおりです(sdcは一番下にあります)。
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55.5M 1 loop /snap/core18/2074
loop1 7:1 0 4K 1 loop /snap/bare/5
loop2 7:2 0 55.4M 1 loop /snap/core18/2128
loop3 7:3 0 219M 1 loop /snap/gnome-3-34-1804/66
loop4 7:4 0 219M 1 loop /snap/gnome-3-34-1804/72
loop5 7:5 0 65.1M 1 loop /snap/gtk-common-themes/1515
loop6 7:6 0 65.2M 1 loop /snap/gtk-common-themes/1519
loop7 7:7 0 51M 1 loop /snap/snap-store/542
loop8 7:8 0 51M 1 loop /snap/snap-store/547
loop9 7:9 0 32.3M 1 loop /snap/snapd/13170
loop10 7:10 0 32.4M 1 loop /snap/snapd/13270
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 465.3G 0 part /
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 116M 0 part
├─sdb2 8:18 0 506M 0 part
└─sdb3 8:19 0 930.9G 0 part
sdc 8:32 0 3.7T 0 disk
sr0 11:0 1 1024M 0 from
そしてsudo fdisk -lを使う
Disk /dev/sdc: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: TOSHIBA MG03ACA4
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
次に、gdisk(試行parted
)を使用してタイプと名前などでパーティションテーブルを割り当てます。
新しいパーティションを追加:
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-7814037134, default = 2048) or {+-}size{KMGTP}: 2048
Last sector (2048-7814037134, default = 7814037134) or {+-}size{KMGTP}: 7814037134
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
見てみましょうp
(印刷)
Number Start (sector) End (sector) Size Code Name
1 2048 7814037134 3.6 TiB 8300 Linux filesystem
店と呼びたいです。
Command (? for help): c store
Using 1
Enter name: store
(印刷後)
Number Start (sector) End (sector) Size Code Name
1 2048 7814037134 3.6 TiB 8300 store
最後に、パーティションテーブルをディスクに書き込んで終了します(使用w
)。
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
ドライブとマウントポイントをもう一度見てみましょう(lsblk
)。
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55.5M 1 loop /snap/core18/2074
loop1 7:1 0 4K 1 loop /snap/bare/5
loop2 7:2 0 55.4M 1 loop /snap/core18/2128
loop3 7:3 0 219M 1 loop /snap/gnome-3-34-1804/66
loop4 7:4 0 219M 1 loop /snap/gnome-3-34-1804/72
loop5 7:5 0 65.1M 1 loop /snap/gtk-common-themes/1515
loop6 7:6 0 65.2M 1 loop /snap/gtk-common-themes/1519
loop7 7:7 0 51M 1 loop /snap/snap-store/542
loop8 7:8 0 51M 1 loop /snap/snap-store/547
loop9 7:9 0 32.3M 1 loop /snap/snapd/13170
loop10 7:10 0 32.4M 1 loop /snap/snapd/13270
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 465.3G 0 part /
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 116M 0 part
├─sdb2 8:18 0 506M 0 part
└─sdb3 8:19 0 930.9G 0 part
sdc 8:32 0 3.7T 0 disk
└─sdc1 8:33 0 3.7T 0 part
sr0 11:0 1 1024M 0 rom
今、私は/storeという名前の場所にドライブをマウントしようとしています(例えば、sdc1のパーティションと同じ名前です。混乱しないようにしてください)。ここでエラーが発生します。
(base) anthony@Shodan:/dev$ sudo mount -o rw /dev/sdc1 /store
mount: /store: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
ここで何をすべきかは本当にわかりません。上記と同じ手順を繰り返しましたが、partedを使用しました。この手順は成功しましたが、インストールしようとすると再び失敗しました。
編集#1 ご意見ありがとうございます。私はファイルシステムを作成していないので、次のコマンドを実行しましたが、エラーが発生しました。
(base) anthony@Shodan:~$ sudo mkfs.ext4 /dev/sdc1
[sudo] password for anthony:
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 976754385 4k blocks and 244195328 inodes
Filesystem UUID: d6b2219f-b4fe-490b-bf21-513fec50c625
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: mkfs.ext4: Input/output error while writing out and closing file system
その後、smartmodtoolsをインストールし、smartctlを使用して新しいドライブをテストしましたが、追加の問題が発生しました。
(base) anthony@Shodan:~$ sudo smartctl --smart=on -T permissive /dev/sdc
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.11.0-37-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
Short INQUIRY response, skip product id
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
unable to fetch IEC (SMART) mode page [scsi response fails sanity test]
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
編集#2 私はまだそのダイナミックな仕事を作ろうとしています。ディスクはSMARTをサポートし(BIOSを確認します)、カーネルに表示される内容は次のとおりです。
(base) anthony@Shodan:/$ dmesg | egrep -i "sdc"
[ 1.696642] sd 2:0:0:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 1.696658] sd 2:0:0:0: [sdc] Write Protect is off
[ 1.696661] sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[ 1.696680] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.930394] sdc: sdc1
[ 1.943940] sd 2:0:0:0: [sdc] Attached SCSI disk
[ 2857.111158] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=90s
[ 2857.111168] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 35 c0 08 00 00 00 00 08 00 00
[ 2857.111172] blk_update_request: I/O error, dev sdc, sector 901777408 op 0x1:(WRITE) flags 0x100000 phys_seg 8 prio class 0
[ 2857.111184] Buffer I/O error on dev sdc1, logical block 901775360, lost async page write
[ 2857.111191] Buffer I/O error on dev sdc1, logical block 901775361, lost async page write
[ 2857.111199] Buffer I/O error on dev sdc1, logical block 901775362, lost async page write
[ 2857.111204] Buffer I/O error on dev sdc1, logical block 901775363, lost async page write
[ 2857.111208] Buffer I/O error on dev sdc1, logical block 901775364, lost async page write
[ 2857.111212] Buffer I/O error on dev sdc1, logical block 901775365, lost async page write
[ 2857.111215] Buffer I/O error on dev sdc1, logical block 901775366, lost async page write
[ 2857.111223] Buffer I/O error on dev sdc1, logical block 901775367, lost async page write
[ 2857.111365] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111370] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 36 00 08 00 00 00 00 08 00 00
[ 2857.111371] blk_update_request: I/O error, dev sdc, sector 905971712 op 0x1:(WRITE) flags 0x100000 phys_seg 8 prio class 0
[ 2857.111375] Buffer I/O error on dev sdc1, logical block 905969664, lost async page write
[ 2857.111378] Buffer I/O error on dev sdc1, logical block 905969665, lost async page write
[ 2857.111407] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111410] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 36 40 08 00 00 00 00 08 00 00
[ 2857.111410] blk_update_request: I/O error, dev sdc, sector 910166016 op 0x1:(WRITE) flags 0x100000 phys_seg 8 prio class 0
[ 2857.111430] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111432] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 36 80 08 00 00 00 00 08 00 00
[ 2857.111433] blk_update_request: I/O error, dev sdc, sector 914360320 op 0x1:(WRITE) flags 0x100000 phys_seg 8 prio class 0
[ 2857.111451] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111453] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 36 c0 08 00 00 00 00 08 00 00
[ 2857.111454] blk_update_request: I/O error, dev sdc, sector 918554624 op 0x1:(WRITE) flags 0x100000 phys_seg 8 prio class 0
[ 2857.111471] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111473] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 37 00 08 00 00 00 00 08 00 00
[ 2857.111474] blk_update_request: I/O error, dev sdc, sector 922748928 op 0x1:(WRITE) flags 0x100000 phys_seg 8 prio class 0
[ 2857.111484] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111486] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 37 40 08 00 00 00 00 08 00 00
[ 2857.111487] blk_update_request: I/O error, dev sdc, sector 926943232 op 0x1:(WRITE) flags 0x800 phys_seg 8 prio class 0
[ 2857.111517] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111520] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 37 80 08 00 00 00 00 08 00 00
[ 2857.111521] blk_update_request: I/O error, dev sdc, sector 931137536 op 0x1:(WRITE) flags 0x800 phys_seg 8 prio class 0
[ 2857.111539] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111541] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 37 c0 08 00 00 00 00 08 00 00
[ 2857.111542] blk_update_request: I/O error, dev sdc, sector 935331840 op 0x1:(WRITE) flags 0x800 phys_seg 8 prio class 0
[ 2857.111567] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 2857.111569] sd 2:0:0:0: [sdc] tag#0 CDB: Write(16) 8a 00 00 00 00 00 38 00 08 00 00 00 00 08 00 00
[ 2857.111570] blk_update_request: I/O error, dev sdc, sector 939526144 op 0x1:(WRITE) flags 0x800 phys_seg 8 prio class 0
[ 3053.218272] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3053.218285] sd 2:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[ 3638.943105] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3638.943112] sd 2:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[ 3653.216166] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3653.216179] sd 2:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[ 3971.568186] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3971.568192] sd 2:0:0:0: [sdc] tag#0 CDB: Synchronize Cache(10) 35 00 00 00 00 00 00 00 00 00
[ 3971.568197] blk_update_request: I/O error, dev sdc, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[ 3971.568235] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3971.568237] sd 2:0:0:0: [sdc] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00
[ 3971.568238] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
[ 3971.568256] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3971.568258] sd 2:0:0:0: [sdc] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 3971.568259] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 3971.568262] Buffer I/O error on dev sdc, logical block 0, async page read
[ 3971.568276] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 3971.568278] sd 2:0:0:0: [sdc] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[ 3971.568279] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 3971.568281] Buffer I/O error on dev sdc, logical block 0, async page read
[ 3971.569093] sd 2:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 3971.569103] sd 2:0:0:0: [sdc] Sense not available.
[ 3971.569160] sd 2:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 3971.569164] sd 2:0:0:0: [sdc] Sense not available.
[ 3971.569203] sd 2:0:0:0: [sdc] 0 512-byte logical blocks: (0 B/0 B)
[ 3971.569280] sdc: detected capacity change from 7814037168 to 0
[ 4048.513170] sd 2:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 4048.513175] sd 2:0:0:0: [sdc] Sense not available.
[ 4048.513197] sd 2:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 4048.513198] sd 2:0:0:0: [sdc] Sense not available.
[ 4053.558167] sd 2:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 4053.558170] sd 2:0:0:0: [sdc] Sense not available.
[ 4053.558188] sd 2:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 4053.558189] sd 2:0:0:0: [sdc] Sense not available.
[ 4253.213080] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 4253.213094] sd 2:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[ 4853.209760] sd 2:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
[ 4853.209774] sd 2:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00