ZFS: Difference between revisions

From DWIKI
Line 75: Line 75:
  zpool replace tank /dev/disk/by-id/13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ
  zpool replace tank /dev/disk/by-id/13450850036953119346 /dev/disk/by-id/ata-ST4000VN000-1H4168_Z302FQVZ


 
==Showing information about ZFS pools and datasets==
==Show pools with sizes==
===Show pools with sizes===
  zpool list  
  zpool list  
or
or
  zpool list -H -o name,size
  zpool list -H -o name,size
===Show reservations on datasets===
zfs list -o name,reservations


==Swap on zfs==
==Swap on zfs==

Revision as of 10:18, 19 July 2023

Links

Terms and acronyms

vdev

Virtual Device.

ZFS Virtual disks

HOWTO

Create zfs filesystem

zfs create poolname/fsname

this also creates mountpoint

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

Showing information about ZFS pools and datasets

Show pools with sizes

zpool list 

or

zpool list -H -o name,size


Show reservations on datasets

zfs list -o name,reservations

Swap on zfs

https://askubuntu.com/questions/228149/zfs-partition-as-swap

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