ディスクドライブ

ディスクドライブ

USBエンクロージャを含む古いATA(SATAではないなど)のハードドライブが2つあります。そのうちの1つでEXT4ログエラーが発生し、物理的な問題があるかどうかはわかりません。彼らはただのバックアップディスクなので、ここに新しいbtrfsを入れたいです。

ディスクドライブ

私はこれをしようとしていますfdisk。完全にクリーンアップするには、問題が発生した場合に備えて新しいパーティションテーブルが必要です。

env LC_ALL=C sudo fdisk /dev/sdc

以下は、ディスクの1つの現在の状態です。

Command (m for help): p

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x00006dd0

   Device Boot      Start         End      Blocks   Id  System

次に、新しいパーティションテーブルを作成します。

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x20bf4f51.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

この警告は、すべてのディスクに対して毎回表示されます。ただし、フラグの値は異なる場合があります。これでパーティションテーブルを再印刷します。

Command (m for help): p

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x20bf4f51

   Device Boot      Start         End      Blocks   Id  System

まだ空いていていいです。

新しいパーティションを作成します。

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): 
Using default response p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-312581807, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-312581807, default 312581807): 
Using default value 312581807

これで、ディスク全体にわたるパーティションが必要です。もう一度確認してみるとpパーティションがありました。

書き下ろす:

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

Error closing file

私はこれについて全く知らない。かつてddディスクの最初の部分に400Mのゼロを書きましたが、何も変わりませんでした。

KDEパーティションマネージャ

ディスクの元の状態は次のとおりです。

今、私は新しいパーティションテーブルを作成したいと思います。

未割り当て領域に新しいパーティションを作成します。

ディスクに変更を書き込みます。

役に立たないエラーメッセージ:


ここでいくつかの問題が発生し、ディスクを必要に応じて再フォーマットできない理由がわかりません。

Ubuntu 14.04を使用してください。

ベストアンサー1

おすすめ記事