何プログラム一覧ZFSでお届けし腐敗しないデータはもらえますか?

StackOverflow https://stackoverflow.com/questions/1725171

質問

と言う私のプログラムの試み読み取りのバイトをファイルは、ZFSファイルシステム.ZFSでの検索に必要なブロックのものを検索できないのですが合には有効なチェックサム(それらはすべてが破損し、または唯一のディスクに存在して破損諾します。い私のプログラムについて説明を行うの戻り値からの読み取り、バイトしてみました。とがあるので、行動に影響を及ぼ(Solarisまたはその他のZFS-実施OS)では、力の障害、力の成功の可能性のある腐敗したデータはもらえますか?

役に立ちましたか?

解決

EIOが実際に現在のZFS実装との唯一の答えである。

オープンZFS「バグ」は破損したデータを読み込むためのいくつかの方法が要求されます: http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6186106

私は、これは文書化されていないが、オープンソースのZDBユーティリティを使用して、すでになんとかであると考えています。 http://www.cuddletech.com/blog/pivotを見てください/entry.php?id=980 のZDBの-Rオプションと「R」フラグを使用してファイルの内容をダンプする方法について説明についてます。

他のヒント

Solaris10:

# Create a test pool
[root@tesalia z]# cd /tmp
[root@tesalia tmp]# mkfile 100M zz
[root@tesalia tmp]# zpool create prueba /tmp/zz

# Fill the pool
[root@tesalia /]# dd if=/dev/zero of=/prueba/dummy_file
dd: writing to `/prueba/dummy_file': No space left on device
129537+0 records in
129536+0 records out
66322432 bytes (66 MB) copied, 1.6093 s, 41.2 MB/s

# Umount the pool
[root@tesalia /]# zpool export prueba

# Corrupt the pool on purpose
[root@tesalia /]# dd if=/dev/urandom of=/tmp/zz seek=100000 count=1 conv=notrunc
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0715209 s, 7.2 kB/s

# Mount the pool again
zpool import -d /tmp prueba

# Try to read the corrupted data
[root@tesalia tmp]# md5sum /prueba/dummy_file 
md5sum: /prueba/dummy_file: I/O error

# Read the manual
[root@tesalia tmp]# man -s2 read
[...]
RETURN VALUES
     Upon successful completion,  read()  and  readv()  return  a
     non-negative integer indicating the number of bytes actually
     read. Otherwise, the functions return -1 and  set  errno  to
     indicate the error.

ERRORS
     The read(), readv(), and pread() functions will fail if:
[...]
     EIO        A physical I/O error has occurred, [...]

まず輸出入の試験プールがない場合には、直接上書き(プの腐敗)を着てのファイルがキャッシュするにはOS。

ない現在、ZFSを拒絶することがありますが破損します。すことができません。

どのようにファイルシステム固有の低レベルのデータレスキューユーティリティ外EIOメイクセンスからread()エラー以外のものを返すでしょうか?

低レベルのデータレスキューユーティリティは、ファイルにアクセスするに近いオープン/読み取り/書き込み/以外のOSとFS固有のAPIを使用する必要があります。それが必要となるセマンティクスは通常のファイルの読み込みとは根本的に異なっているので、それは専門的なAPIが必要になります。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top