ZFS: Difference between revisions

From DWIKI
mNo edit summary
(9 intermediate revisions by the same user not shown)
Line 12: Line 12:
*[http://wintelguy.com/zfs-calc.pl ZFS calculator]  
*[http://wintelguy.com/zfs-calc.pl ZFS calculator]  
*[https://bm-stor.com/index.php/blog/Linux-cluster-with-ZFS-on-Cluster-in-a-Box/ ZFS clustering]  
*[https://bm-stor.com/index.php/blog/Linux-cluster-with-ZFS-on-Cluster-in-a-Box/ ZFS clustering]  
*{[https://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/ https://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/] ZFS and ECC]  
*[https://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/ https://jrs-s.net/2015/02/03/will-zfs-and-non-ecc-ram-kill-your-data/] ZFS and ECC]  


*[https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement ZFS troubleshooting/disk replacement]  
*[https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement ZFS troubleshooting/disk replacement]  
*[http://www.raidz-calculator.com/raidz-types-reference.aspx raidz types reference]
*[https://linuxhint.com/configure-zfs-cache-high-speed-io/ Using and tuning ARC]


 
 


= HOWTO =
== Replace disk in zfs ==


= HOWTO =
=== Some links ===
 
*[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


== Replace disk ==
zpool offline poolname ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5RLZC6V


===Some links ===
Get the disk guid:
*https://itectec.com/ubuntu/ubuntu-replacing-a-dead-disk-in-a-zpool/


zdb


zpool offline poolname diskname
guid: 15233236897831806877


Get list of disk by id:
Get list of disk by id:
Line 34: Line 53:
  ls -al /dev/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 /dev/disk/by-id/13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ
 
===FAQ===
====invalid vdev specification====
Probably means you need -f
 
== Tuning arc settings ==


Find uid of disk to replace
arcstat
arc_summary
grep c_max /proc/spl/kstat/zfs/arcstats
echo 5368709120 > /sys/module/zfs/parameters/zfs_arc_max


zdb
maybe you need


  zpool replace tank 13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ
  echo 3 > /proc/sys/vm/drop_caches


= FAQ =
= FAQ =


== show status ==
== show status and disks ==


  zspool status
  zpool status


== show drives/pools ==
== show drives/pools ==

Revision as of 17:13, 30 June 2022

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 ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M5RLZC6V

Get the disk guid:

zdb

guid: 15233236897831806877

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 /dev/disk/by-id/13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ

FAQ

invalid vdev specification

Probably means you need -f

Tuning arc settings

arcstat
arc_summary
grep c_max /proc/spl/kstat/zfs/arcstats
echo 5368709120 > /sys/module/zfs/parameters/zfs_arc_max

maybe you need

echo 3 > /proc/sys/vm/drop_caches

FAQ

show status and disks

zpool status

show drives/pools

zfs list
      

check raid level

zfs list -a