SOLVED Slight problem after installing 9.3, cannot mirror boot drive

Status
Not open for further replies.

Fraoch

Patron
Joined
Aug 14, 2014
Messages
395
I waited until the dust settled on 9.3 before diving in. My concerns were unfounded, a GUI upgrade from 9.2.1.9 went seamlessly.

However there was a minor problem when trying to use my new "64 GB" SanDisk SSD as a boot mirror for my older 64 GB Crucial M4 SSD. Turns out 64 GB =/ 64 GB.

diskinfo on SanDisk:
Code:
63023063040    # mediasize in bytes (58G)
   123091920     # mediasize in sectors

diskinfo on Crucial M4:
Code:
64023257088    # mediasize in bytes (59G)
   125045424     # mediasize in sectors

And that's why I was getting an error that the drive was too small. <smacks self on head>:rolleyes:

Easy solution: install 9.3 fresh onto the SanDisk, import the pool, restore settings from backup, update, attach the Crucial drive and mirror it (mirror smaller onto larger). Should work, no?

Everything worked great up to the last item. When trying to mirror the Crucial M4, I get the following error:
Code:
manage.py: [middleware.exceptions:38] [MiddlewareError: Failed to attach disk: cannot attach ada0p2 to gptid/c5e51315-92b3-11e4-887a-0cc47a0984f3: no such device in pool

I tried zeroeing the M4 as well, but I get the same error.

Do the devices to be mirrored need to be the exact same size or is this error caused by something else?

Thanks for any advice.
 
Last edited:

Fraoch

Patron
Joined
Aug 14, 2014
Messages
395

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I have a Kingston Data Traveler 8GB as the main boot drive, then I added a Sandisk Cruzer 16GB as the mirrored drive, and it works alright for me.
 

Fraoch

Patron
Joined
Aug 14, 2014
Messages
395
Thanks for the reply. It should have worked. I could buy a second absolutely identical SSD (it's on sale this week, plus free shipping) but if I'm just going to encounter the same error again I don't see the point.

Have to wait for progress on the bug I guess?
 

Fraoch

Patron
Joined
Aug 14, 2014
Messages
395
I keep seeing the "no such device" error coming up from time to time in the forums in unrelated issues. For example:

https://forums.freenas.org/index.ph...ice-no-such-device-in-pool.26662/#post-169658

I've seen this problem and the solution a few times - FreeNAS refers to the device by gptid and fails with a "no such device" error, then someone manually intervenes, referring to the device by GUID and it works.

I'm wondering if that's the case here, but I'm not sure how to mirror a device by GUID in the shell. Plus the GUI is sometimes unaware what's being done in the shell "behind its back" and may put me in much worse trouble than I'm in now.

Any thoughts?
 

Fraoch

Patron
Joined
Aug 14, 2014
Messages
395
I managed to get it working - and my suspicions were right, referring to it by GUID worked!

I followed the directions to finding the drive by GUID here:

https://bugs.freenas.org/issues/5035

Code:
# zdb -l /dev/gptid/c5e51315-92b3-11e4-887a-0cc47a0984f3 | grep guid
pool_guid: 17850347948637044446
top_guid: 2103551461850377217
guid: 2103551461850377217
guid: 2103551461850377217
pool_guid: 17850347948637044446
top_guid: 2103551461850377217
guid: 2103551461850377217
guid: 2103551461850377217
pool_guid: 17850347948637044446
top_guid: 2103551461850377217
guid: 2103551461850377217
guid: 2103551461850377217
pool_guid: 17850347948637044446
top_guid: 2103551461850377217
guid: 2103551461850377217
guid: 2103551461850377217


Guessing that the GUID was 2103551461850377217, I then tried:

Code:
# zpool attach freenas-boot 2103551461850377217 ada0p2


which resulted in a 30-second pause, then:

Code:
Make sure to wait until resilver is done before rebooting.

If you boot from pool 'freenas-boot', you may need to update
boot code on newly attached disk 'ada0p2'.

Assuming you use GPT partitioning and 'da0' is your new boot disk
you may use the following command:

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0


I'll look up the bootcode warning next. Edit: easy enough to resolve:

Code:
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
bootcode written to ada0


The GUI is now showing the boot pool resilvering! And after some time:

Code:
# zpool status
pool: freenas-boot
state: ONLINE
status: One or more devices are configured to use a non-native block size.
Expect reduced performance.
action: Replace affected devices with devices that support the
configured block size, or migrate data to a properly configured
pool.
scan: resilvered 2.11G in 0h0m with 0 errors on Wed Jan 14 11:12:44 2015
config:

NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/c5e51315-92b3-11e4-887a-0cc47a0984f3 ONLINE 0 0 0
ada0p2 ONLINE 0 0 0 block size: 512B configured, 4096B native

errors: No known data errors


(I'll solve the block size problem next).

The GUI now indicates a normal mirrored boot pool.

I think that solves it!
 
Status
Not open for further replies.
Top