Bytor
Dabbler
- Joined
- Apr 15, 2015
- Messages
- 12
Earlier today I noticed the alert blinking the web GUI of my FreeNAS and there were two errors:
CRITICAL: Device: /dev/ada2, 7 Currently unreadable (pending) sectors
CRITICAL: Device: /dev/ada2, 7 Offline uncorrectable sectors
I followed the steps in https://dekoder.wordpress.com/2014/10/08/fixing-freenas-currently-unreadable-pending-sectors-error/ but I was still not able to reimport the pool because that disk is showing as unavailable to the zpool even though I can access it with low-level tools. New smartctl tests show no errors.
I think it's not available because of damage to the partition table on that particular disk.
[root@twilightsparkle] /mnt# fdisk /dev/ada2
******* Working on device /dev/ada2 *******
parameters extracted from in-core disklabel are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)
fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 625142385 (305245 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 660/ head 15/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Is there enough info somewhere to recreate that partition table on that disk to see if that will restore my zpool?
[root@twilightsparkle] /mnt# gpart list
Geom name: da1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 7847246
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da1p1
Mediasize: 524288 (512k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
rawuuid: d8c9e9b4-edda-11e4-891e-6805ca2736ae
rawtype: 21686148-6449-6e6f-744e-656564454649
label: 1
length: 524288
offset: 17408
type: bios-boot
index: 1
end: 1057
start: 34
2. Name: da1p2
Mediasize: 4017242112 (3.8G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 544768
Mode: r1w1e1
rawuuid: d8d22a6e-edda-11e4-891e-6805ca2736ae
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 4017242112
offset: 544768
type: freebsd-zfs
index: 2
end: 7847239
start: 1064
Consumers:
1. Name: da1
Mediasize: 4017807360 (3.8G)
Sectorsize: 512
Mode: r1w1e2
Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 7814037134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada1p1
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 2910e49f-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 2147483648
offset: 65536
type: freebsd-swap
index: 1
end: 4194431
start: 128
2. Name: ada1p2
Mediasize: 3998639460352 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 292e8055-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 3998639460352
offset: 2147549184
type: freebsd-zfs
index: 2
end: 7814037127
start: 4194432
Consumers:
1. Name: ada1
Mediasize: 4000787030016 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 7814037134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 28744380-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 2147483648
offset: 65536
type: freebsd-swap
index: 1
end: 4194431
start: 128
2. Name: ada0p2
Mediasize: 3998639460352 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 289378a4-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 3998639460352
offset: 2147549184
type: freebsd-zfs
index: 2
end: 7814037127
start: 4194432
Consumers:
1. Name: ada0
Mediasize: 4000787030016 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
[root@twilightsparkle] /mnt# zpool import -d /dev
pool: Archives
id: 3808770709780828448
state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
devices and try again.
see: http://illumos.org/msg/ZFS-8000-6X
config:
Archives UNAVAIL missing device
gptid/289378a4-8ba7-11e3-ab72-ac220b50e07c ONLINE
gptid/292e8055-8ba7-11e3-ab72-ac220b50e07c ONLINE
ada3 ONLINE
ada4 ONLINE
Additional devices are known to be part of this pool, though their
exact configuration cannot be determined.
[root@twilightsparkle] /boot/zfs# zdb -C -U ./zpool.cache
Archives:
version: 5000
name: 'Archives'
state: 0
txg: 14319549
pool_guid: 3808770709780828448
hostid: 1133646529
hostname: ''
vdev_children: 5
vdev_tree:
type: 'root'
id: 0
guid: 3808770709780828448
children[0]:
type: 'disk'
id: 0
guid: 14354937141893476491
path: '/dev/gptid/27fe8d78-8ba7-11e3-ab72-ac220b50e07c'
whole_disk: 1
metaslab_array: 39
metaslab_shift: 31
ashift: 12
asize: 317920641024
is_log: 0
create_txg: 4
children[1]:
type: 'disk'
id: 1
guid: 3741186956870640445
path: '/dev/gptid/289378a4-8ba7-11e3-ab72-ac220b50e07c'
whole_disk: 1
metaslab_array: 37
metaslab_shift: 35
ashift: 12
asize: 3998634737664
is_log: 0
create_txg: 4
children[2]:
type: 'disk'
id: 2
guid: 16287532080604082671
path: '/dev/gptid/292e8055-8ba7-11e3-ab72-ac220b50e07c'
whole_disk: 1
metaslab_array: 35
metaslab_shift: 35
ashift: 12
asize: 3998634737664
is_log: 0
create_txg: 4
children[3]:
type: 'disk'
id: 3
guid: 9244735741447355287
path: '/dev/ada3'
whole_disk: 1
metaslab_array: 311
metaslab_shift: 35
ashift: 12
asize: 4000782221312
is_log: 0
create_txg: 1044801
children[4]:
type: 'disk'
id: 4
guid: 18282693746607454160
path: '/dev/ada4'
whole_disk: 1
metaslab_array: 310
metaslab_shift: 35
ashift: 12
asize: 4000782221312
is_log: 0
create_txg: 1044801
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
[root@twilightsparkle] /boot/zfs# zpool import -d /dev
pool: Archives
id: 3808770709780828448
state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
devices and try again.
see: http://illumos.org/msg/ZFS-8000-6X
config:
Archives UNAVAIL missing device
gptid/289378a4-8ba7-11e3-ab72-ac220b50e07c ONLINE
gptid/292e8055-8ba7-11e3-ab72-ac220b50e07c ONLINE
ada3 ONLINE
ada4 ONLINE
Additional devices are known to be part of this pool, though their
exact configuration cannot be determined.
CRITICAL: Device: /dev/ada2, 7 Currently unreadable (pending) sectors
CRITICAL: Device: /dev/ada2, 7 Offline uncorrectable sectors
I followed the steps in https://dekoder.wordpress.com/2014/10/08/fixing-freenas-currently-unreadable-pending-sectors-error/ but I was still not able to reimport the pool because that disk is showing as unavailable to the zpool even though I can access it with low-level tools. New smartctl tests show no errors.
I think it's not available because of damage to the partition table on that particular disk.
[root@twilightsparkle] /mnt# fdisk /dev/ada2
******* Working on device /dev/ada2 *******
parameters extracted from in-core disklabel are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)
fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 625142385 (305245 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 660/ head 15/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
Is there enough info somewhere to recreate that partition table on that disk to see if that will restore my zpool?
[root@twilightsparkle] /mnt# gpart list
Geom name: da1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 7847246
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da1p1
Mediasize: 524288 (512k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
rawuuid: d8c9e9b4-edda-11e4-891e-6805ca2736ae
rawtype: 21686148-6449-6e6f-744e-656564454649
label: 1
length: 524288
offset: 17408
type: bios-boot
index: 1
end: 1057
start: 34
2. Name: da1p2
Mediasize: 4017242112 (3.8G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 544768
Mode: r1w1e1
rawuuid: d8d22a6e-edda-11e4-891e-6805ca2736ae
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 4017242112
offset: 544768
type: freebsd-zfs
index: 2
end: 7847239
start: 1064
Consumers:
1. Name: da1
Mediasize: 4017807360 (3.8G)
Sectorsize: 512
Mode: r1w1e2
Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 7814037134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada1p1
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 2910e49f-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 2147483648
offset: 65536
type: freebsd-swap
index: 1
end: 4194431
start: 128
2. Name: ada1p2
Mediasize: 3998639460352 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 292e8055-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 3998639460352
offset: 2147549184
type: freebsd-zfs
index: 2
end: 7814037127
start: 4194432
Consumers:
1. Name: ada1
Mediasize: 4000787030016 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 7814037134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 28744380-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 2147483648
offset: 65536
type: freebsd-swap
index: 1
end: 4194431
start: 128
2. Name: ada0p2
Mediasize: 3998639460352 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
rawuuid: 289378a4-8ba7-11e3-ab72-ac220b50e07c
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: 1
length: 3998639460352
offset: 2147549184
type: freebsd-zfs
index: 2
end: 7814037127
start: 4194432
Consumers:
1. Name: ada0
Mediasize: 4000787030016 (3.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
[root@twilightsparkle] /mnt# zpool import -d /dev
pool: Archives
id: 3808770709780828448
state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
devices and try again.
see: http://illumos.org/msg/ZFS-8000-6X
config:
Archives UNAVAIL missing device
gptid/289378a4-8ba7-11e3-ab72-ac220b50e07c ONLINE
gptid/292e8055-8ba7-11e3-ab72-ac220b50e07c ONLINE
ada3 ONLINE
ada4 ONLINE
Additional devices are known to be part of this pool, though their
exact configuration cannot be determined.
[root@twilightsparkle] /boot/zfs# zdb -C -U ./zpool.cache
Archives:
version: 5000
name: 'Archives'
state: 0
txg: 14319549
pool_guid: 3808770709780828448
hostid: 1133646529
hostname: ''
vdev_children: 5
vdev_tree:
type: 'root'
id: 0
guid: 3808770709780828448
children[0]:
type: 'disk'
id: 0
guid: 14354937141893476491
path: '/dev/gptid/27fe8d78-8ba7-11e3-ab72-ac220b50e07c'
whole_disk: 1
metaslab_array: 39
metaslab_shift: 31
ashift: 12
asize: 317920641024
is_log: 0
create_txg: 4
children[1]:
type: 'disk'
id: 1
guid: 3741186956870640445
path: '/dev/gptid/289378a4-8ba7-11e3-ab72-ac220b50e07c'
whole_disk: 1
metaslab_array: 37
metaslab_shift: 35
ashift: 12
asize: 3998634737664
is_log: 0
create_txg: 4
children[2]:
type: 'disk'
id: 2
guid: 16287532080604082671
path: '/dev/gptid/292e8055-8ba7-11e3-ab72-ac220b50e07c'
whole_disk: 1
metaslab_array: 35
metaslab_shift: 35
ashift: 12
asize: 3998634737664
is_log: 0
create_txg: 4
children[3]:
type: 'disk'
id: 3
guid: 9244735741447355287
path: '/dev/ada3'
whole_disk: 1
metaslab_array: 311
metaslab_shift: 35
ashift: 12
asize: 4000782221312
is_log: 0
create_txg: 1044801
children[4]:
type: 'disk'
id: 4
guid: 18282693746607454160
path: '/dev/ada4'
whole_disk: 1
metaslab_array: 310
metaslab_shift: 35
ashift: 12
asize: 4000782221312
is_log: 0
create_txg: 1044801
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
[root@twilightsparkle] /boot/zfs# zpool import -d /dev
pool: Archives
id: 3808770709780828448
state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
devices and try again.
see: http://illumos.org/msg/ZFS-8000-6X
config:
Archives UNAVAIL missing device
gptid/289378a4-8ba7-11e3-ab72-ac220b50e07c ONLINE
gptid/292e8055-8ba7-11e3-ab72-ac220b50e07c ONLINE
ada3 ONLINE
ada4 ONLINE
Additional devices are known to be part of this pool, though their
exact configuration cannot be determined.