Help reimporting volume so I can replace a disk

Status
Not open for further replies.

ckuethe

Cadet
Joined
Oct 14, 2017
Messages
3
Hardware: HP N40L (dual-core amd64 AMD Turion), 8GB, 4x Hitachi HDS5C3030ALA630 (3TB), 1x Corsair Force 3 SSD (240GB)
Build: FreeNAS-11.0-U3 (c5dcf4416)

I was silly and forgot to offline a disk that was throwing errors before replacing it. OK, I figured I'd put the old disk back in, actually offline and remove it, and continue replacing it. No joy. The volume fails to import on reboot and when I try import it by hand, I get this:

Code:
# zpool import 
   pool: media
	 id: 10073608176500451415
  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:

	media										   UNAVAIL  missing device
	  raidz1-0									  ONLINE
		gptid/8621c5d2-f271-11e1-97d9-e4115b138d18  ONLINE
		gptid/f249fe7c-f309-11e1-a031-e4115b138d18  ONLINE
		gptid/14d22fbf-f264-11e1-84ee-e4115b138d18  ONLINE
		gptid/4b057049-f27f-11e1-a031-e4115b138d18  ONLINE

	Additional devices are known to be part of this pool, though their
	exact configuration cannot be determined.


The drives do all appear to be connected:
Code:
# glabel status
									  Name  Status  Components
gptid/8621c5d2-f271-11e1-97d9-e4115b138d18	 N/A  ada0p1
gptid/f249fe7c-f309-11e1-a031-e4115b138d18	 N/A  ada1p1
gptid/14d22fbf-f264-11e1-84ee-e4115b138d18	 N/A  ada2p1
gptid/4b057049-f27f-11e1-a031-e4115b138d18	 N/A  ada3p1
gptid/f58248e4-82af-11e4-b4e3-e4115b138d18	 N/A  da0p1



I'm just going to stop here and wait for further advice before I make the situation any worse. Help?
 

ckuethe

Cadet
Joined
Oct 14, 2017
Messages
3
Plugged in the disk I tried using as a replacement into a spare sata port (ie. I now have all the original disks plus my intended replacement, and the volume now imports, though a little bit unhappy.

So I guess my question is how do I remove gptid/0c56691a-b153-11e7-9b30-e4115b138d18 from the volume and then use it as a replacement for gptid/8621c5d2-f271-11e1-97d9-e4115b138d18 (ada4) which has bad sectors?

Code:
# zpool status media
  pool: media
state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
	attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
	using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://illumos.org/msg/ZFS-8000-9P
  scan: resilvered 8.53M in 0h0m with 0 errors on Sat Oct 14 21:30:48 2017
config:

	NAME											STATE	 READ WRITE CKSUM
	media										   ONLINE	   0	 0	 0
	  raidz1-0									  ONLINE	   0	 0	 0
		gptid/8621c5d2-f271-11e1-97d9-e4115b138d18  ONLINE	   0	 0	 3
		gptid/f249fe7c-f309-11e1-a031-e4115b138d18  ONLINE	   0	 0	 0
		gptid/14d22fbf-f264-11e1-84ee-e4115b138d18  ONLINE	   0	 0	 0
		gptid/4b057049-f27f-11e1-a031-e4115b138d18  ONLINE	   0	 0	 0
	  gptid/0c56691a-b153-11e7-9b30-e4115b138d18	ONLINE	   0	 0	 0

errors: No known data errors


GPTs
Code:
# glabel list
Geom name: ada0p2
Providers:
1. Name: gptid/0c56691a-b153-11e7-9b30-e4115b138d18
   Mediasize: 5999027552256 (5.5T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 11716850688
   length: 5999027552256
   index: 0
Consumers:
1. Name: ada0p2
   Mediasize: 5999027552256 (5.5T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e2

Geom name: ada1p1
Providers:
1. Name: gptid/f249fe7c-f309-11e1-a031-e4115b138d18
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 5860533007
   length: 3000592899584
   index: 0
Consumers:
1. Name: ada1p1
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e2

Geom name: ada2p1
Providers:
1. Name: gptid/14d22fbf-f264-11e1-84ee-e4115b138d18
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 5860533007
   length: 3000592899584
   index: 0
Consumers:
1. Name: ada2p1
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e2

Geom name: ada3p1
Providers:
1. Name: gptid/4b057049-f27f-11e1-a031-e4115b138d18
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 5860533007
   length: 3000592899584
   index: 0
Consumers:
1. Name: ada3p1
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e2

Geom name: ada4p1
Providers:
1. Name: gptid/8621c5d2-f271-11e1-97d9-e4115b138d18
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e1
   secoffset: 0
   offset: 0
   seclength: 5860533007
   length: 3000592899584
   index: 0
Consumers:
1. Name: ada4p1
   Mediasize: 3000592899584 (2.7T)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 65536
   Mode: r1w1e2

Geom name: da0p1
Providers:
1. Name: gptid/f58248e4-82af-11e4-b4e3-e4115b138d18
   Mediasize: 524288 (512K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 1024
   length: 524288
   index: 0
Consumers:
1. Name: da0p1
   Mediasize: 524288 (512K)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0


da0 is the boot volume
ada0 is my new replacement disk
ada1-ada4 are the original disks

Code:
# dmesg | grep "ada.*device"
ada0: <TOSHIBA HDWE160 FS2A> ATA8-ACS SATA 3.x device
ada1: <Hitachi HDS5C3030ALA630 MEAOA5C0> ATA8-ACS SATA 3.x device
ada2: <Hitachi HDS5C3030ALA630 MEAOA5C0> ATA8-ACS SATA 3.x device
ada3: <Hitachi HDS5C3030ALA630 MEAOA5C0> ATA8-ACS SATA 3.x device
ada4: <Hitachi HDS5C3030ALA630 MEAOA580> ATA8-ACS SATA 3.x device
 
Joined
Jul 10, 2016
Messages
521
I was silly and forgot to offline a disk that was throwing errors before replacing it. OK, I figured I'd put the old disk back in, actually offline and remove it, and continue replacing it.

It looks like you striped that replacement disk to your pool. Unfortunately, this cannot be undone.
Back up your data and then read the following threads:

https://forums.freenas.org/index.php?threads/disk-added-as-stripe-instead-of-replacing.22788/
https://forums.freenas.org/index.php?threads/how-to-remove-striped-drive-from-a-zfs-volume.26847/

Welcome to the Forums!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Status
Not open for further replies.
Top