Zfs
Версія від 20:35, 5 листопада 2017, створена WikiSysop (обговорення | внесок)
- read http://zfsonlinux.org/faq.html
- read [ZFS%20Archlinux https://wiki.archlinux.org/index.php/ZFS]
- install ZFS [Install%20ZFS http://zfsonlinux.org/epel.html]
yum install epel-release yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release.el7.noarch.rpm yum install kernel-devel zfs systemctl enable dkms
rpm -qd zfs man zpool man zfs man zfs-module-parameters
- 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
- add ZIL and L2ARC
parted -s /dev/sdc mklabel msdos parted -s /dev/sdd mklabel msdos
- 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
- 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.