Felhasználói eszközök

Eszközök a webhelyen


Oldalsáv

Index menü


Tagek listája

Szavak listája

tudasbazis:linux:zfs

ZFS

Quota

Snapshotok

Teljesítmény javítás

Cache

Replikálás

# For example, on a system containing a ZFS dataset name src, the following command transfers the snapshot to the dataset hierarchy at dst on the target system.
zfs send -R src_data_pool@TOSNAP | ssh 'target-machine' zfs receive -F dst_data_pool
 
# If the above command is interrupted, type the following command to resume the interrupted transfer.
ssh 'target-machine' zfs receive -C dst_data_pool | zfs send -RC src_data_pool@TOSNAP | ssh 'target-machine' zfs receive -F dst_data_pool

Mirror bővítése

zpool add \
    data_pool \
    mirror \
    /dev/disk/by-id/ata-WDC_WD20EZAZ-00L9GB0_WD-WXW2AA046VL5-part1 \
    /dev/disk/by-id/ata-WDC_WD20EZAZ-00GGJB0_WD-WXJ2A9058FDS-part1

Hibás lemez cseréje

  1. Jelenlegi pool állapotának lekérdezése:
    zpool status -stv
      pool: backup_pool
     state: DEGRADED
    status: One or more devices has experienced an error resulting in data
            corruption.  Applications may be affected.
    action: Restore the file in question if possible.  Otherwise restore the
            entire pool from backup.
       see: http://zfsonlinux.org/msg/ZFS-8000-8A
      scan: scrub repaired 212K in 0 days 03:44:08 with 34 errors on Wed Nov 10 04:55:23 2021
    config:
    
            NAME                                              STATE     READ WRITE CKSUM  SLOW
            backup_pool                                       DEGRADED     0     0     0     -
              ata-WDC_WD60EZRZ-00GZ5B1_WD-WX31D96RP4EP-part1  DEGRADED     0     0     0     0  too many errors  (trim unsupported)
    
    errors: Permanent errors have been detected in the following files:
    
            backup_pool/restic:/data/3e/3eac085714f593e3ada48aa88b562eecae09dfab1d0ab2120b006a8662a57d2b
            backup_pool/restic:/data/2e/2ed3eb09103030fd890a8a4df23b44e274170a5fd0fedad0710ebc51df312aab
            backup_pool/restic:/data/1e/1eea1754cf4fd2cc66cf3881dcb4d22418a0e227c903ed642346d7b5852e5f5d
            backup_pool/restic:/data/0e/0e6af1fa3c4a6624f5d712b91cedac382099d777d1e44f06ec54671e547bd5e5
            backup_pool/restic:/data/62/62ea5d8ff86019b607bfb1c826c462888c8122fc26a20b24ebb8f7529cce2746
            backup_pool/restic:/data/b7/b7603740916f2f1deec3dd05f0037a5bcfa2d27b36d5c9701baa9d2f7c926411
            backup_pool/restic:/data/bd/bddfcea36cb9d732c688d3f3dff2b5fb98d553efc0a690ece16729e5b6d06b33
  2. Lemezcsere indítása:
    zpool replace <pool> <hibás_lemez> /dev/disk/by-id/<új_lemez>
    # zpool replace backup_pool ata-WDC_WD60EZRZ-00GZ5B1_WD-WX31D96RP4EP-part1 /dev/disk/by-id/ata-WDC_WD60EZAZ-00SF3B0_WD-WX22D51FH5N3-part1

Partíció bővítés

  1. Automatikus pool kiterjesztés bekapcsolása:
    zpool set autoexpand=on <zpool_name>
  2. Partíció / LVM logikai kötet kiterjesztése:
    lvextend -L 700G /dev/<lvm_group>/<lvm_volume>
    # vagy
    lvextend -L +100G /dev/<lvm_group>/<lvm_volume>
  3. Opcionális: ayutomatikus pool kiterjesztés kikapcsolása:
    zpool set autoexpand=off <zpool_name>

TRIM-elés

zpool trim private_pool my_private
tudasbazis/linux/zfs.txt · Utolsó módosítás: 2022.07.13 15:03 szerkesztette: tia