Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zfsvdevs [2017/04/15 04:52] matti.kzfsvdevs [2017/04/15 05:29] (current) matti.k
Line 9: Line 9:
 So I decided to  So I decided to 
  
-# zpool scrub zroot+<code># zpool scrub zroot
  
 # zpool status # zpool status
Line 31: Line 31:
      ada2p3  ONLINE               0      ada2p3  ONLINE               0
      ada3p3  ONLINE               0      ada3p3  ONLINE               0
 +</code>
    
 After the scrub completed I was still getting a lot of i/o errors in /var/log/messages so decided to replace the SATA cable on my ada0 drive  After the scrub completed I was still getting a lot of i/o errors in /var/log/messages so decided to replace the SATA cable on my ada0 drive 
Line 46: Line 46:
  
 The following is referenced from [[http://www.ctyme.com/intr/rb-0606.htm#Table234|External Link]] The following is referenced from [[http://www.ctyme.com/intr/rb-0606.htm#Table234|External Link]]
 +<code>
 00h    successful completion 00h    successful completion
 01h    invalid function in AH or invalid parameter 01h    invalid function in AH or invalid parameter
Line 82: Line 83:
 E0h    status register error (hard disk) E0h    status register error (hard disk)
 FFh    sense operation failed (hard disk) FFh    sense operation failed (hard disk)
 +</code>
 So  So 
 10h    uncorrectable CRC or ECC error on read 10h    uncorrectable CRC or ECC error on read
Line 89: Line 90:
  
 So going back to my original zpool status output So going back to my original zpool status output
 +<code>
 config: config:
  
Line 99: Line 100:
      ada2p3  ONLINE               0      ada2p3  ONLINE               0
      ada3p3  ONLINE               0      ada3p3  ONLINE               0
 +</code>
 If the faulty disk is still running then do this first If the faulty disk is still running then do this first
  
Line 105: Line 106:
  
 Shutdown the system and replace the faulty disk drive, power on the system Shutdown the system and replace the faulty disk drive, power on the system
 +<code>
 # zpool status # zpool status
  
Line 117: Line 118:
      ada2p3  ONLINE               0      ada2p3  ONLINE               0
      ada3p3  ONLINE               0      ada3p3  ONLINE               0
 +</code>
 # zpool online zroot 15788859347225537330 # zpool online zroot 15788859347225537330
  
 +# zpool replace zroot 15788859347225537330 ada0p3
  
 +complains about missing labels so create some
 +
 +# zpool offline zroot 15788859347225537330
 +<code>
 +# ls /dev/ada*
 +/dev/ada0      /dev/ada1p3    /dev/ada2p3    /dev/ada3p3
 +/dev/ada1      /dev/ada2      /dev/ada3
 +/dev/ada1p1    /dev/ada2p1    /dev/ada3p1
 +/dev/ada1p2    /dev/ada2p2    /dev/ada3p2
 +
 +# gpart show
 +=>       40  976773088  ada1  GPT  (466G)
 +         40       1024      freebsd-boot  (512K)
 +       1064        984        - free -  (492K)
 +       2048    4194303      freebsd-swap  (2.0G)
 +    4196352  972576768      freebsd-zfs  (464M)
 +  976773120          8        - free -  (4.0K)
 +  
 +=>       40  976773088  ada2  GPT  (466G)
 +         40       1024      freebsd-boot  (512K)
 +       1064        984        - free -  (492K)
 +       2048    4194303      freebsd-swap  (2.0G)
 +    4196352  972576768      freebsd-zfs  (464M)
 +  976773120          8        - free -  (4.0K)
 +
 +=>       40  976773088  ada3  GPT  (466G)
 +         40       1024      freebsd-boot  (512K)
 +       1064        984        - free -  (492K)
 +       2048    4194303      freebsd-swap  (2.0G)
 +    4196352  972576768      freebsd-zfs  (464M)
 +  976773120          8        - free -  (4.0K)
 +
 +=>       40  976773088  ada0  GPT  (466G)
 +
 +# gpart show -l ada1
 +=>       40  976773088  ada1  GPT  (466G)
 +         40       1024      gptboot1  (512K)
 +       1064        984        - free -  (492K)
 +       2048    4194303      swap1  (2.0G)
 +    4196352  972576768      zfs1  (464M)
 +  976773120          8        - free -  (4.0K)
 +  
 +  
 +# gpart add -a 4k -s 512k -l gptboot0 -t freebsd-boot ada0
 +# gpart add -b 1m -s 2g -l swap0 -t freebsd-swap ada0
 +# gpart add -a 4k -l zfs0 -t freebsd-zfs ada0
 +# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
 +</code>
 +# zpool online zroot 15788859347225537330
  
 +# zpool replace zroot 15788859347225537330 ada0p3
  
 +# zpool status  (should show replacing-0 and ada0p3 resilvering)
  
 +Note: if you stuff up the 'gpart add' partitioning then can delete as follows
 +<code>
 +# gpart delete -i 3 ada0
 +# gpart delete -i 2 ada0
 +# gpart delete -i 1 ada0
 +</code>
  
zfsvdevs.txt · Last modified: 2017/04/15 05:29 by matti.k
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki