わいえむねっと

Contents
Categories
Calendar
2019/08
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Monthly Archives
~2000/01
Recent Entries
RSS1.0
Templates
Information
Processed: 0.019 sec
Chashed: -
2019/08/23 Fri

前回までのあらすじ

処理途中でエラーが発生してしまう件で『書き込み先の』ディスクを交換した。



なんかおかしいと思っていたけど、壊れていたのは『読み込み元の』ディスクでしたー!

というわけで、こっちも交換。
書き込み先の方はそもそも容量不足で交換するつもりだったのでそれはそれだ。

代替ディスクは、コンテナをあさったら同容量のディスクがでてきたのでそれを利用。
2015/05/04 に SV98 model2 から引っこ抜いたものらしい。メモによると。


ディスクの初期化

交換先のディスクを昨日買ってきた裸族にセットしてUSB接続。
Server Manager -> Volumes -> Disks から New Volume しようとしたところできず。
もともと Linux で利用していたものなので、パーティションを認識できていないっぽい。

まずは diskpart コマンドでこれを削除。

>diskpart

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          232 GB      0 B
  Disk 1    Online         1863 GB      0 B        *
  Disk 2    Online         1863 GB      0 B        *
  Disk 3    Online            9 TB      0 B        *
  Disk 4    Online         1863 GB      0 B

DISKPART> select disk 4

Disk 4 is now the selected disk.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          232 GB      0 B
  Disk 1    Online         1863 GB      0 B        *
  Disk 2    Online         1863 GB      0 B        *
  Disk 3    Online            9 TB      0 B        *
* Disk 4    Online         1863 GB      0 B

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary           1863 GB    64 KB

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> exit

Leaving DiskPart...

これで New Volume できるように。


ディスク管理を使ってもフォーマットできないときの対処方法(Windows10)
https://geek-memo.com/diskpart/


ファイルコピー①

エラーを吐くディスクから先ほどフォーマットしたディスクにファイルをコピー。
エラーが発生する前提なのでリトライ回数は0で。

>robocopy v: t: /e /r:0 /log:d:\copy.log

ログファイルから "error" を grep した結果が以下。

2019/08/23 02:12:00 ERROR 1117 (0x0000045D) Copying File V:\foo 20180630.ts
The request could not be performed because of an I/O device error.
2019/08/23 02:19:26 ERROR 1117 (0x0000045D) Copying File V:\bar 20190627.ts
The request could not be performed because of an I/O device error.
2019/08/23 03:23:11 ERROR 1117 (0x0000045D) Copying File V:\baz 20190407.ts
The request could not be performed because of an I/O device error.


これらのファイルを xcopy のエラー無視オプションでコピー

>xcopy /c "V:\foo 20180630.ts" t:\
V:\foo 20180630.ts
File creation error - The request could not be performed because of an I/O device error.

…しようとしたけど、はじかれた。
そもそも CRC エラーじゃないしな。


ファイルコピー②

ディスク丸ごとクローンするしかないかなぁと思ったけど、探してみたらリードエラー部を0埋めでコピーしてくれるツールが。

hyperstoneapple3.dip.jp/fcopy/fcopy.htm
http://hyperstone​apple3.dip​.jp/fcopy/fcopy.htm
強制ファイルコピープログラム:fcopy.exe


デフォルトだとブロックサイズが 32KB ということなので、クラスタサイズにあわせて 4096byte で実行。

>fsutil fsinfo ntfsinfo v:
NTFS Volume Serial Number :       0xXXXXXXXXXXXXXXXX
NTFS Version   :                  3.1
LFS Version    :                  2.0
Number Sectors :                  0x00000000e8dc7fff
Total Clusters :                  0x000000001d1b8fff
Free Clusters  :                  0x000000000120aed6
Total Reserved :                  0x0000000000000000
Bytes Per Sector  :               512
Bytes Per Physical Sector :       512
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length :           0x0000000000100000
Mft Start Lcn  :                  0x00000000000c0000
Mft2 Start Lcn :                  0x0000000000000002
Mft Zone Start :                  0x00000000000c0100
Mft Zone End   :                  0x00000000000c0460
Resource Manager Identifier :     XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

>fcopy /b 4096 "V:\foo 20180630.ts" v:\err
Read error at 04231000 pos = 04231000
Read error at 04232000 pos = 04232000
Total error count = 2 block(s)

>fcopy /b 4096 "V:\bar 20190627.ts" v:\err
Read error at 40438000 pos = 40438000
Read error at 40439000 pos = 40439000
Read error at 4043A000 pos = 4043A000
Read error at 4043B000 pos = 4043B000
Read error at 4043C000 pos = 4043C000
Read error at 4043D000 pos = 4043D000
Read error at 4043E000 pos = 4043E000
Total error count = 7 block(s)

>fcopy /b 4096 "V:\baz 20190407.ts" v:\err
Read error at 17367000 pos = 17367000
Total error count = 1 block(s)

TSファイルだし、数KB欠けててもなんとかなるだろ。