ZFS: Difference between revisions

From DWIKI
mNo edit summary
mNo edit summary
Line 22: Line 22:
= HOWTO =
= HOWTO =


== Replace disk ==
 
== Replace disk in zfs ==


=== Some links ===
=== Some links ===
Line 28: Line 29:
*[https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/ https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/]  
*[https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/ https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/]  


 
Get information first:
 
Name of disk
 
zpool status
Find uid of disk to replace
 


take it offline
  zpool offline poolname diskname
  zpool offline poolname diskname
Get the disk guid:
zdb


Get list of disk by id:
Get list of disk by id:
Line 36: Line 48:
  ls -al /dev/disk/by-id
  ls -al /dev/disk/by-id


Find uid of disk to replace


zdb
Save the id, shutdown, replace disk, boot:


Save the id, shutdown, replace disk, boot:
Find the new disk:
Find the new disk:
  ls -al /dev/disk/by-id
  ls -al /dev/disk/by-id


The id is the ID of the old disk, name is of the new disk
 
Run replace command. The id is the guid of the old disk, name is of the new disk


  zpool replace tank 13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ
  zpool replace tank 13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ

Revision as of 11:31, 1 January 2021

Links

 

 

HOWTO

Replace disk in zfs

Some links

Get information first:

Name of disk

zpool status

Find uid of disk to replace


take it offline

zpool offline poolname diskname

Get the disk guid:

zdb

Get list of disk by id:

ls -al /dev/disk/by-id


Save the id, shutdown, replace disk, boot:

Find the new disk:

ls -al /dev/disk/by-id


Run replace command. The id is the guid of the old disk, name is of the new disk

zpool replace tank 13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ

FAQ

show status

zspool status

show drives/pools

zfs list
      

check raid level

zfs list -a