Відмінності між версіями «Zfs»

Матеріал з Wiki Welard
Перейти до навігації Перейти до пошуку
 
(Не показано 7 проміжних версій цього користувача)
Рядок 1: Рядок 1:
 
# read [http://FAQ%20ZFS%20on%20Linux http://zfsonlinux.org/faq.html]
 
# read [http://FAQ%20ZFS%20on%20Linux http://zfsonlinux.org/faq.html]
−
# read [ZFS%20Archlinux https://wiki.archlinux.org/index.php/ZFS]
+
# read [ZFS Archlinux https://wiki.archlinux.org/index.php/ZFS]
 +
# read [ZFS Getting Started https://openzfs.github.io/openzfs-docs/Getting%20Started/RHEL-based%20distro/index.html]
 
# install ZFS [Install%20ZFS http://zfsonlinux.org/epel.html]
 
# install ZFS [Install%20ZFS http://zfsonlinux.org/epel.html]
 +
dnf install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm
 
  yum install epel-release
 
  yum install epel-release
−
  yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release.el7.noarch.rpm
+
 
−
  yum install kernel-devel zfs
+
 
−
   
+
Встановлення з допомогою dkms
−
systemctl enable dkms
+
  dnf install -y epel-release
 +
  dnf install -y kernel-devel
 +
  dnf install -y zfs
  
 
  rpm -qd zfs
 
  rpm -qd zfs
Рядок 12: Рядок 16:
 
  man zfs
 
  man zfs
 
  man zfs-module-parameters
 
  man zfs-module-parameters
 +
 +
Встановлення з zfs-kmod
 +
yum-config-manager --enable zfs-kmod
 +
yum-config-manager --disable zfs
 +
yum install -y zfs
  
 
# create zpool
 
# create zpool
Рядок 51: Рядок 60:
 
  '''# zpool set listsnapshots=off tank'''
 
  '''# zpool set listsnapshots=off tank'''
  
−
Подивития які є доступні features але не активні  
+
Подивития які є доступні features але не активні [https://docs.oracle.com/cd/E19253-01/820-0836/gcvit/index.html doc(ru)]
 
  '''# zpool upgrade'''  
 
  '''# zpool upgrade'''  
 
  This system supports ZFS pool feature flags.
 
  This system supports ZFS pool feature flags.
Рядок 127: Рядок 136:
 
  For more information on a particular version, including supported releases,
 
  For more information on a particular version, including supported releases,
 
  see the ZFS Administration Guide.
 
  see the ZFS Administration Guide.
 +
 +
How do I recover a ZFS 7.x system with 6.5.8 LiveCD?
 +
[https://xyinn.org/gentoo/livecd/ liveCD]
 +
 +
[https://xyinn.org/ Xyinn completes the Gentoo base system to turn it into a complete operating system. It does this by providing the following]

Поточна версія на 16:51, 19 липня 2023

  1. read http://zfsonlinux.org/faq.html
  2. read [ZFS Archlinux https://wiki.archlinux.org/index.php/ZFS]
  3. read [ZFS Getting Started https://openzfs.github.io/openzfs-docs/Getting%20Started/RHEL-based%20distro/index.html]
  4. install ZFS [Install%20ZFS http://zfsonlinux.org/epel.html]
dnf install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm
yum install epel-release


Встановлення з допомогою dkms

dnf install -y epel-release
dnf install -y kernel-devel
dnf install -y zfs
rpm -qd zfs
man zpool
man zfs
man zfs-module-parameters

Встановлення з zfs-kmod

yum-config-manager --enable zfs-kmod
yum-config-manager --disable zfs
yum install -y zfs
  1. create zpool
ls -lh /dev/disk/by-id/
zpool create -n -o ashift=12 -O compression=lz4 -O atime=off -m /tank tank mirror ata-HGST_HUS724040ALA640_PN2331PBG32EMT-part4 ata-HGST_HUS724040ALA640_PN2334PBH1TR5R-part4
zfs create -b 4K -o primarycache=metadata -o com.sun:auto-snapshot=false -V 128G tank/swap
mkswap /dev/zvol/tank/swap

Add a line to /etc/fstab:

/dev/zvol/tank/swap none swap discard 0 0

swapon -a

  1. add ZIL and L2ARC

parted -s /dev/sdc mklabel msdos parted -s /dev/sdd mklabel msdos

  1. ZIL partititon, size: 8G
# c 2048 + (8 * 1024 * 1024 * 1024/512)-1
parted -s /dev/sdc -- mkpart primary 2048s 16779263s
parted -s /dev/sdd -- mkpart primary 2048s 16779263s
  1. L2ARC partition, size: all rest
parted -s /dev/sdc -- mkpart primary 16779264s -1s
parted -s /dev/sdd -- mkpart primary 16779264s -1s

ls -lh /dev/disk/by-id/
zpool add tank log mirror ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYADA01822-part1 ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYADA01826-part1
zpool add tank cache ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYADA01822-part2 ata-SAMSUNG_MZ7WD240HAFV-00003_S16LNYADA01826-part2
zpool scrub tank
zpool status
arcstat.py
arc_summary.py | less

Показувати при zfs list dataset'и і snapshot'и

# zpool set listsnapshots=off tank

Подивития які є доступні features але не активні doc(ru)

# zpool upgrade 
This system supports ZFS pool feature flags.
All pools are formatted using feature flags.
Some supported features are not enabled on the following pools. Once a
feature is enabled the pool may become incompatible with software
that does not support the feature. See zpool-features(5) for details.
POOL  FEATURE
---------------
tank
     filesystem_limits
     large_blocks
# zpool upgrade -a активувати всі 
# zpool upgrade -v
This system supports ZFS pool feature flags.
The following features are supported:
FEAT DESCRIPTION
-------------------------------------------------------------
async_destroy                         (read-only compatible)
Destroy filesystems asynchronously.
empty_bpobj                           (read-only compatible)
Snapshots use less space.
lz4_compress
LZ4 compression algorithm support.
spacemap_histogram                    (read-only compatible)
Spacemaps maintain space histograms.
enabled_txg                           (read-only compatible)
Record txg at which a feature is enabled
hole_birth
Retain hole birth txg for more precise zfs send
extensible_dataset
Enhanced dataset functionality, used by other features.
embedded_data
Blocks which compress very well use even less space.
bookmarks                             (read-only compatible)
"zfs bookmark" command
filesystem_limits                     (read-only compatible)
Filesystem and snapshot limits.
large_blocks
Support for blocks larger than 128KB.

The following legacy versions are also supported:
VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS version
 2   Ditto blocks (replicated metadata)
 3   Hot spares and double parity RAID-Z
 4   zpool history
 5   Compression using the gzip algorithm
 6   bootfs pool property
 7   Separate intent log devices
 8   Delegated administration
 9   refquota and refreservation properties
 10  Cache devices
 11  Improved scrub performance
 12  Snapshot properties
 13  snapused property
 14  passthrough-x aclinherit
 15  user/group space accounting
 16  stmf property support
 17  Triple-parity RAID-Z
 18  Snapshot user holds
 19  Log device removal
 20  Compression using zle (zero-length encoding)
 21  Deduplication
 22  Received properties
 23  Slim ZIL
 24  System attributes
 25  Improved scrub stats
 26  Improved snapshot deletion performance
 27  Improved snapshot creation performance
 28  Multiple vdev replacements

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

How do I recover a ZFS 7.x system with 6.5.8 LiveCD? liveCD

Xyinn completes the Gentoo base system to turn it into a complete operating system. It does this by providing the following