コンテンツにスキップ

ZFS

Solaris、OpenSolaris、OpenIndiana、FreeBSD、FreeNASとかで実装されてるFile System。最近はLinuxの方が主っぽいが。

===== 使う =====

  • [[.:version:]]
  • [[.:info:]]
  • [[.:create:]]
    • man読むのが早いよ。(えー

zpool

設定情報取得

# zpool get all rpool1
NAME    PROPERTY       VALUE                SOURCE
rpool1  size           7.94G                -
rpool1  capacity       31%                  -
rpool1  altroot        -                    default
rpool1  health         ONLINE               -
rpool1  guid           17572893505996813045  default
rpool1  version        28                   default
rpool1  bootfs         rpool1/ROOT/solaris  local
rpool1  delegation     on                   default
rpool1  autoreplace    off                  default
rpool1  cachefile      -                    default
rpool1  failmode       wait                 default
rpool1  listsnapshots  off                  default
rpool1  autoexpand     off                  default
rpool1  dedupditto     0                    default
rpool1  dedupratio     1.00x                -
rpool1  free           5.42G                -
rpool1  allocated      2.51G                -
rpool1  readonly       off                  -

履歴

# zpool history zroot | head
History for 'zroot':
2021-02-22.22:17:37 zpool create -o altroot=/mnt -O compress=lz4 -O atime=off -m none -f zroot ada0p3
2021-02-22.22:17:37 zfs create -o mountpoint=none zroot/ROOT
2021-02-22.22:17:37 zfs create -o mountpoint=/ zroot/ROOT/default
2021-02-22.22:17:37 zfs create -o mountpoint=/tmp -o exec=on -o setuid=off zroot/tmp
2021-02-22.22:17:37 zfs create -o mountpoint=/usr -o canmount=off zroot/usr
2021-02-22.22:17:38 zfs create zroot/usr/home
2021-02-22.22:17:38 zfs create -o setuid=off zroot/usr/ports
2021-02-22.22:17:38 zfs create zroot/usr/src
2021-02-22.22:17:38 zfs create -o mountpoint=/var -o canmount=off zroot/var

zfs

設定情報取得

# zfs get all rpool
NAME   PROPERTY                        VALUE                           SOURCE
rpool  type                            filesystem                      -
rpool  creation                        日  2月  6  2:25 2011         -
rpool  used                            14.6G                           -
rpool  available                       4.97G                           -
rpool  referenced                      45.5K                           -
rpool  compressratio                   1.00x                           -
rpool  mounted                         yes                             -
rpool  quota                           none                            default
rpool  reservation                     none                            default
rpool  recordsize                      128K                            default
rpool  mountpoint                      /rpool                          default
rpool  sharenfs                        off                             default
rpool  checksum                        on                              default
rpool  compression                     off                             default
rpool  atime                           on                              default
rpool  devices                         on                              default
rpool  exec                            on                              default
rpool  setuid                          on                              default
rpool  readonly                        off                             default
rpool  zoned                           off                             default
rpool  snapdir                         hidden                          default
rpool  aclinherit                      restricted                      default
rpool  canmount                        on                              default
rpool  xattr                           on                              default
rpool  copies                          1                               default
rpool  version                         5                               -
rpool  utf8only                        off                             -
rpool  normalization                   none                            -
rpool  casesensitivity                 sensitive                       -
rpool  vscan                           off                             default
rpool  nbmand                          off                             default
rpool  sharesmb                        off                             default
rpool  refquota                        none                            default
rpool  refreservation                  none                            default
rpool  primarycache                    all                             default
rpool  secondarycache                  all                             default
rpool  usedbysnapshots                 0                               -
rpool  usedbydataset                   45.5K                           -
rpool  usedbychildren                  14.6G                           -
rpool  usedbyrefreservation            0                               -
rpool  logbias                         latency                         default
rpool  dedup                           off                             default
rpool  mlslabel                        none                            default
rpool  sync                            standard                        default
rpool  org.openindiana.caiman:install  ready                           local

アップグレード

  • OpenIndiana v148を基準にしてみる。
  • 一応ZFSとZPOOLのバージョンは別々。
  • 一般にZFS v28とか言われるものは、ZPOOL v28を指してる。ZFSは大体4とか5です。

zpool

# zpool upgrade -v
This system is currently running ZFS pool version 28.

The following versions are 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.

zfs

# zfs upgrade -v
The following filesystem versions are supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS filesystem version
 2   Enhanced directory entries
 3   Case insensitive and File system unique identifier (FUID)
 4   userquota, groupquota properties
 5   System attributes

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

障害時メモ

パフォーマンス参考

メモ


最終更新日: 2021-05-24 07:18:08