What to do after HDD crash and zfs replace
-
Hi.
I am very new in freeBSD and pfSense. I had a HDD crash and was able to mount the pfSense again because of ZFS mirror. No i added a new HDD and was able to resync the zfs volume. Is there something else if have to do?Efi Boot install on new HDD or something like this?
What i have done until now is. I created the same partition schema like the "original" one with the following command:
gpart backup ada0 | gpart restore -F ada1Afterwards i replace the zfs volume with the new one:
zfs replace pfSense ada1p4 ada1p4Now the pool is in status online and there everythink looks ok. But i am not sure if the new HDD is now able to used a startvolume.
this is my current partitioning created with the default installer:
gpart list ada0 Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 246162631 first: 40 entries: 128 scheme: GPT Providers: 1. Name: ada0p1 Mediasize: 272629760 (260M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 20480 Mode: r1w1e2 efimedia: HD(1,GPT,3d712343-8dc1-11ee-9e83-0015177566c0,0x28,0x82000) rawuuid: 3d712343-8dc1-11ee-9e83-0015177566c0 rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: efiboot0 length: 272629760 offset: 20480 type: efi index: 1 end: 532519 start: 40 2. Name: ada0p2 Mediasize: 524288 (512K) Sectorsize: 512 Stripesize: 0 Stripeoffset: 272650240 Mode: r0w0e0 efimedia: HD(2,GPT,3d7960c3-8dc1-11ee-9e83-0015177566c0,0x82028,0x400) rawuuid: 3d7960c3-8dc1-11ee-9e83-0015177566c0 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: gptboot0 length: 524288 offset: 272650240 type: freebsd-boot index: 2 end: 533543 start: 532520 3. Name: ada0p3 Mediasize: 1073741824 (1.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 273678336 Mode: r1w1e0 efimedia: HD(3,GPT,3dd500a7-8dc1-11ee-9e83-0015177566c0,0x82800,0x200000) rawuuid: 3dd500a7-8dc1-11ee-9e83-0015177566c0 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap0 length: 1073741824 offset: 273678336 type: freebsd-swap index: 3 end: 2631679 start: 534528 4. Name: ada0p4 Mediasize: 124687220736 (116G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 1347420160 Mode: r1w1e1 efimedia: HD(4,GPT,3ddfd125-8dc1-11ee-9e83-0015177566c0,0x282800,0xe83f800) rawuuid: 3ddfd125-8dc1-11ee-9e83-0015177566c0 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: zfs0 length: 124687220736 offset: 1347420160 type: freebsd-zfs index: 4 end: 246161407 start: 2631680 Consumers: 1. Name: ada0 Mediasize: 126035288064 (117G) Sectorsize: 512 Mode: r3w3e6 ------------------------------------------------------------------------------------------------ gpart list ada1 Geom name: ada1 modified: false state: OK fwheads: 16 fwsectors: 63 last: 250069639 first: 40 entries: 128 scheme: GPT Providers: 1. Name: ada1p1 Mediasize: 272629760 (260M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 20480 Mode: r0w0e0 efimedia: HD(1,GPT,da046798-8fbc-11ef-b297-0015177566c0,0x28,0x82000) rawuuid: da046798-8fbc-11ef-b297-0015177566c0 rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: (null) length: 272629760 offset: 20480 type: efi index: 1 end: 532519 start: 40 2. Name: ada1p2 Mediasize: 524288 (512K) Sectorsize: 512 Stripesize: 0 Stripeoffset: 272650240 Mode: r0w0e0 efimedia: HD(2,GPT,da05605d-8fbc-11ef-b297-0015177566c0,0x82028,0x400) rawuuid: da05605d-8fbc-11ef-b297-0015177566c0 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 524288 offset: 272650240 type: freebsd-boot index: 2 end: 533543 start: 532520 3. Name: ada1p3 Mediasize: 1073741824 (1.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 273678336 Mode: r0w0e0 efimedia: HD(3,GPT,da061bc9-8fbc-11ef-b297-0015177566c0,0x82800,0x200000) rawuuid: da061bc9-8fbc-11ef-b297-0015177566c0 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 1073741824 offset: 273678336 type: freebsd-swap index: 3 end: 2631679 start: 534528 4. Name: ada1p4 Mediasize: 124687220736 (116G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 1347420160 Mode: r1w1e1 efimedia: HD(4,GPT,da06de06-8fbc-11ef-b297-0015177566c0,0x282800,0xe83f800) rawuuid: da06de06-8fbc-11ef-b297-0015177566c0 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: (null) length: 124687220736 offset: 1347420160 type: freebsd-zfs index: 4 end: 246161407 start: 2631680 Consumers: 1. Name: ada1 Mediasize: 128035676160 (119G) Sectorsize: 512 Mode: r1w1e2
-
What does
zpool status
show? -
zpool status: pool: pfSense state: ONLINE scan: resilvered 1.54G in 00:00:14 with 0 errors on Mon Oct 21 17:01:26 2024 config: NAME STATE READ WRITE CKSUM pfSense ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0p4 ONLINE 0 0 0 ada1p4 ONLINE 0 0 0
-
Looks good there.
-
Yes, and there is nothing more to do? Is this device now bootable?
-
Yes I would expect it to be. If the pool shows as good and all members of the pool as good.
-
Ok, thank you very much. I will give it a try tomorrow.