meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:fs:zfs:issues:dva_0_has_invalid_offset [2021/05/09 19:55] – niziak | linux:fs:zfs:issues:dva_0_has_invalid_offset [2021/05/24 19:10] (current) – niziak | ||
---|---|---|---|
Line 6: | Line 6: | ||
* 2021-05-09" | * 2021-05-09" | ||
- | Stop scrub to prevent kernel error again: | ||
- | <code bash> | ||
- | zfs scrub -s rpool | ||
- | </ | ||
DVA (DataVirtualAddress) is made up of: | DVA (DataVirtualAddress) is made up of: | ||
* a 32bit integer representing the VDEV | * a 32bit integer representing the VDEV | ||
* followed by a 63bit integer representing the offset. | * followed by a 63bit integer representing the offset. | ||
+ | * | ||
+ | ===== Important steps ===== | ||
+ | |||
+ | **Stop scrub to prevent error loop** (if scrub reads corrupted data, kernel will panic again): | ||
+ | <code bash> | ||
+ | zfs scrub -s rpool | ||
+ | </ | ||
+ | |||
+ | **(Option) Turn ZFS PANIC into WARNING ** | ||
+ | <code bash> | ||
+ | echo 1 > / | ||
+ | </ | ||
+ | |||
Dump whole history of pool: | Dump whole history of pool: | ||
Line 20: | Line 29: | ||
</ | </ | ||
- | Verify the checksum of all metadata blocks while printing block statistics | + | * '' |
- | Report statistics on zdb I/O. Display operation counts, bandwidth, and error counts of I/O | + | * '' |
- | Disable leak detection and the loading of space maps. | + | * '' |
+ | * '' | ||
+ | * '' | ||
<code bash> | <code bash> | ||
- | zdb -bcsvL < | + | zdb -AAA -bbbcsvL |
+ | </ | ||
+ | |||
+ | And sometimes it shows some errors during reading: | ||
+ | |||
+ | < | ||
+ | zdb_blkptr_cb: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Find problematic file / volume ====== | ||
+ | |||
+ | Try to read all ZFS volumes | ||
+ | <code bash> | ||
+ | zfs list | ||
+ | </ | ||
+ | |||
+ | And for each volume, try to read it: | ||
+ | <code bash> | ||
+ | zfs send rpool/ | ||
+ | </ | ||
+ | Catch PANIC and reboot system by sysrq to prevent IO lock. | ||
+ | This problmatic volume is a replicated (received) volume from another ZFS node. | ||
+ | < | ||
+ | echo s > / | ||
+ | echo b > / | ||
+ | </ | ||
+ | |||
+ | After power up delete problematic zfs volume. During deletion PANIC happens again. | ||
+ | Deletion is stored ZFS journal, so during mounting ZFS tries to replay pending deletion which cause PANIC again. | ||
+ | System stuck in bootloop. | ||
+ | |||
+ | * Boot from Live USB with ZFS Support (Ubuntu has 0.8.3 ZOL). | ||
+ | * stop zfs-zed service | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | It doesn' | ||
+ | |||
+ | Last possibility is to boot from Live system from USB and copy all data to other zpool and recreate '' | ||
+ | <code bash> | ||
+ | mkdir /rpool | ||
+ | zpool import -f -R /rpool rpool -o readonly=on | ||
+ | |||
+ | </ | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | <code bash> | ||
+ | zdb -e -bcsvL rpool | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== Resoruces ====== | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | < | ||
+ | ZFS scrub repairs only blocks with bad checksums or otherwise unreadable blocks. | ||
+ | ZFS scrub does not analyze and thus does not fix any logical inconsistencies. | ||
+ | If bad data has a correct checksum, then at present ZFS cannot fix it. Sometimes it can recognize that the data is bad and report an error, sometimes it has no option but to panic, but sometimes it cannot even tell if it's bad data. | ||
</ | </ | ||