SOLVED Mirroring boot device doesn't use GPT?

Status
Not open for further replies.

fta

Contributor
Joined
Apr 6, 2015
Messages
148
I mirrored my boot device today. However, I notice that one of the disks in the pool is not using the GPT label. Is this expected, and won't it cause a problem if that disk gets a different device?

Code:
    NAME                                            STATE     READ WRITE CKSUM
    freenas-boot                                    ONLINE       0     0     0
     mirror-0                                      ONLINE       0     0     0
       gptid/a8198b56-92cf-11e4-828c-d050995042cd  ONLINE       0     0     0  block size: 512B configured, 4096B native
       ada2p2                                      ONLINE       0     0     0  block size: 512B configured, 4096B native
 
Joined
Jan 9, 2015
Messages
430
Did you add the device through the GUI or the command line?
 

fta

Contributor
Joined
Apr 6, 2015
Messages
148
GUI. Followed the instructions in the 9.3 freenas guide.

I looked at the code, it does the following:

Code:
proc = self._pipeopen('/sbin/zpool attach freenas-boot %s %sp2' % (label, devname))


So it appears it is hardcoded to use the /dev/ada*p2 device.
 

fta

Contributor
Joined
Apr 6, 2015
Messages
148
I fixed this using the command line (since you can't even detach a boot device from the GUI).

Code:
root@freenas:~# zpool detach freenas-boot /dev/ada2p2
root@freenas:~# reboot


Then (retrieve the gpt id using "gpart list"):

Code:
root@freenas:~# zpool attach freenas-boot gptid/a8198b56-92cf-11e4-828c-d050995042cd /dev/gptid/d60f2400-2cec-11e5-9bcc-d050995042cd
root@freenas:~# zpool status freenas-boot
  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 1.50G in 0h0m with 0 errors on Fri Jul 17 18:47:12 2015
config:

    NAME                                            STATE     READ WRITE CKSUM
    freenas-boot                                    ONLINE       0     0     0
     mirror-0                                      ONLINE       0     0     0
       gptid/a8198b56-92cf-11e4-828c-d050995042cd  ONLINE       0     0     0  block size: 512B configured, 4096B native
       gptid/d60f2400-2cec-11e5-9bcc-d050995042cd  ONLINE       0     0     0  block size: 512B configured, 4096B native


I'm relying on the fact that the disk was all set up (GPT partitions, etc) by the previous attach.
 

BigDave

FreeNAS Enthusiast
Joined
Oct 6, 2013
Messages
2,479
I fixed this using the command line (since you can't even detach a boot device from the GUI).
@fta I'm just curious, but does this "fix" survive a re-boot?
 

fta

Contributor
Joined
Apr 6, 2015
Messages
148
@fta I'm just curious, but does this "fix" survive a re-boot?

Yes. I looked at the code to verify the config database wasn't modified when creating a boot mirror. This is a zfs operation so it is permanent. I also tested using the new disk (after the fix) as the boot device, and it worked fine.
 
Status
Not open for further replies.
Top