[zfs-discuss] question about replacing a GPT partition with a device

riwi1967 at gmail.com riwi1967 at gmail.com
Sat Sep 7 16:41:55 EDT 2013


I created a raidz1 pool with ZFS Fuse and am now using it with ZoL 0.6.2
It is created from 8x 1.5TB disks. I meant to use whole disks, but one of 
the disks accidentally had a GPT partition leftover from an earlier 
experiment.

Anyway now my pool is made of 7 disks with whole disk=0 and 1 disk with 
whole disk=1 

It looks like this :

root at riwilinux:~# zpool status raid2
  pool: raid2
 state: ONLINE
  scan: resilvered 7K in 0h0m with 0 errors on Sat Sep  7 22:23:29 2013
config:

        NAME                                    STATE     READ WRITE CKSUM
        raid2                                   ONLINE       0     0     0
          raidz1-0                              ONLINE       0     0     0
            ata-ST31500341AS_9VS0Y93N           ONLINE       0     0     0
            ata-ST31500341AS_9VS0XY1G           ONLINE       0     0     0
            ata-ST31500341AS_9VS1G4TY           ONLINE       0     0     0
            ata-ST31500341AS_9VS1G3PW           ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J1LS720273  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J1LS720274  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J90S815655  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J90S815628  ONLINE       0     0     0

root at riwilinux:~# zdb | egrep "path|whole"
                path: '/dev/disk/by-id/ata-ST31500341AS_9VS0Y93N'
                whole_disk: 0
                path: '/dev/disk/by-id/ata-ST31500341AS_9VS0XY1G'
                whole_disk: 0
                path: '/dev/disk/by-id/ata-ST31500341AS_9VS1G4TY'
                whole_disk: 0
                path: '/dev/disk/by-id/ata-ST31500341AS_9VS1G3PW-part1'
                whole_disk: 1
                path: '/dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6J1LS720273'
                whole_disk: 0
                path: '/dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6J1LS720274'
                whole_disk: 0
                path: '/dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6J90S815655'
                whole_disk: 0
                path: '/dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6J90S815628'
                whole_disk: 0

The problem is that after every reboot the disk ata-ST31500341AS_9VS1G3PWis not found and the pool is degraded.

root at riwilinux:~# zpool status raid2
  pool: raid2
 state: DEGRADED
status: One or more devices could not be used because the label is missing 
or
        invalid.  Sufficient replicas exist for the pool to continue
        functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: resilvered 7K in 0h0m with 0 errors on Sat Sep  7 22:23:29 2013
config:

        NAME                                    STATE     READ WRITE CKSUM
        raid2                                   DEGRADED     0     0     0
          raidz1-0                              DEGRADED     0     0     0
            ata-ST31500341AS_9VS0Y93N           ONLINE       0     0     0
            ata-ST31500341AS_9VS0XY1G           ONLINE       0     0     0
            ata-ST31500341AS_9VS1G4TY           ONLINE       0     0     0
            ata-ST31500341AS_9VS1G3PW           UNAVAIL      0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J1LS720273  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J1LS720274  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J90S815655  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J90S815628  ONLINE       0     0     0

errors: No known data errors

What I do to repair is simply :

root at riwilinux:~# zpool replace raid2 ata-ST31500341AS_9VS1G3PW
cannot replace ata-ST31500341AS_9VS1G3PW with ata-ST31500341AS_9VS1G3PW: 
ata-ST31500341AS_9VS1G3PW is busy
root at riwilinux:~# zpool online raid2 ata-ST31500341AS_9VS1G3PW

Which brings it all back. A single zpool online does not work. The zpool 
replace is needed eventhough it produces an error.

root at riwilinux:~# zpool status
  pool: raid2
 state: ONLINE
  scan: resilvered 0 in 0h0m with 0 errors on Sat Sep  7 22:32:54 2013
config:

        NAME                                    STATE     READ WRITE CKSUM
        raid2                                   ONLINE       0     0     0
          raidz1-0                              ONLINE       0     0     0
            ata-ST31500341AS_9VS0Y93N           ONLINE       0     0     0
            ata-ST31500341AS_9VS0XY1G           ONLINE       0     0     0
            ata-ST31500341AS_9VS1G4TY           ONLINE       0     0     0
            ata-ST31500341AS_9VS1G3PW           ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J1LS720273  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J1LS720274  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J90S815655  ONLINE       0     0     0
            ata-SAMSUNG_HD154UI_S1Y6J90S815628  ONLINE       0     0     0

errors: No known data errors

I have tried to replace the partition with the full disk but it does not 
work:
 root at riwilinux:~# zpool replace raid2 ata-ST31500341AS_9VS1G3PW-part1 
ata-ST31500341AS_9VS1G3PW
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/ata-ST31500341AS_9VS1G3PW-part1 is part of active pool 
'raid2'

Is there a way to fix this?
By the way this is a test setup, but I have another NAS PC with 3 pools 
with 67T in 24 disks so I would like to get more experience by fixing this 
without destroying the pool.
Thanks for reading, sorry for the long post.
Richard

To unsubscribe from this group and stop receiving emails from it, send an email to zfs-discuss+unsubscribe at zfsonlinux.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20130907/3f93efc1/attachment.html>


More information about the zfs-discuss mailing list