OpenZFS

Aus C3D2
Zur Navigation springen Zur Suche springen

Probleme wegen Aberglauben (Lizenz foo)

https://www.fsf.org/licensing/zfs-and-linux

ZFSonLinux

Debian

  • unter Debian 8 (Jessie)
cd /root
wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_4_all.deb
dpkg -i zfsonlinux_4_all.deb
vi /etc/apt/sources.list.d/zfsonlinux.list

## This file is installed by the zfsonlinux package.
#
#/ deb [arch=amd64] http://archive.zfsonlinux.org/debian jessie main
### deb-src http://archive.zfsonlinux.org/debian jessie main
#
# !! Enable these ONLY if you want/need the dailies - latest ZoL code !!
deb [arch=amd64] http://archive.zfsonlinux.org/debian jessie-daily main
### deb-src http://archive.zfsonlinux.org/debian jessie-daily main
# EOF

wget http://zfsonlinux.org/4D5843EA.asc -O - | apt-key add -

SPL/ZFS installieren:

apt-get update
apt-get install debian-zfs

vi /etc/modules

### ZFS //
spl
zfs
### // ZFS

update-initramfs -u -k all

FIX: zfs-mount.service

cat /lib/systemd/system/zfs-mount.service

which zfs
which zpool

falls zfs/zpool unter /usr/local liegen, dann nach /sbin kopieren

ZFS:

lsmod | egrep "spl|zfs"

zpool status

Debian 8 (Jessie) System mit (systemd-sysv/sysvinit-core)

modprobe spl
modprobe zfs

modprobe: ERROR: could not insert 'spl': Exec format error
modprobe: ERROR: could not insert 'zfs': Exec format error
ls -all /sbin | egrep "fsck.zfs|zdb|zed|zfs|zhack|zinject|zpios|zpool|zstreamdump|ztest"

cp /sbin/fsck.zfs /usr/local/sbin
cp /sbin/zdb /usr/local/sbin
cp /sbin/zed /usr/local/sbin
cp /sbin/zfs /usr/local/sbin
cp /sbin/zhack /usr/local/sbin
cp /sbin/zinject /usr/local/sbin
cp /sbin/zpios /usr/local/sbin
cp /sbin/zpool /usr/local/sbin
cp /sbin/zstreamdump /usr/local/sbin
cp /sbin/ztest /usr/local/sbin
apt-get install zfsonlinux

apt-get update; apt-get upgrade; apt-get dist-upgrade
apt-get remove --purge debian-zfs libnvpair1 libuutil1 libzfs2 libzpool2 spl spl-dkms zfs-dkms zfsutils dkms
apt-get update; apt-get upgrade; apt-get dist-upgrade
apt-get install debian-zfs
unterschiedliche version magic

Fehler:

zavl: version magic '3.18.7-grsecwetu+ SMP mod_unload modversions KERNEXEC_BTS UDEREF REFCOUNT GRSEC ' should be '3.18.7-grsecwetu+ SMP mod_unload modversions KERNEXEC_BTS UDEREF REFCOUNT STACKLEAK_PLUGIN GRSEC '
grsec: more alerts, logging disabled for 10 seconds
zavl: version magic '3.18.7-grsecwetu+ SMP mod_unload modversions KERNEXEC_BTS UDEREF REFCOUNT GRSEC ' should be '3.18.7-grsecwetu+ SMP mod_unload modversions KERNEXEC_BTS UDEREF REFCOUNT STACKLEAK_PLUGIN GRSEC '

Laden erzwingen bei "Versionsbezeichungsdifferenz"

modprobe --force-vermagic spl
modprobe --force-vermagic zfs

zpool status
module laden erzwingen
  • trotz unterschiedlicher Versionsangabe (ignores vermagic and modversion attributes)

damit sind nicht die module optionen (parameter) gemeint z.B. bei "modinfo MODULNAME -F parm"

touch /etc/modprobe.d/spl.conf
touch /etc/modprobe.d/zfs.conf
vi /etc/modules

### ZFS //
spl # force=1
zfs # force=1
### // ZFS
zpool mirror erstellen
zpool create -o ashift=12 zbackup mirror /dev/mapper/vg-zstorage1 /dev/mapper/vg-zstorage2

lxc-ls | xargs -L1 -I {} zfs create zbackup/lxc/{}

Red Hat

Ubuntu

Kompatibilität

Eine der nennenswerten Vorteile von ZFS ist die Verfügbarkeit bei vielen Betriebssystemen. Eigentlich ist daher auch Kompatibilität - über das einzelne Betriebssystem hinweg - eines der großen Ansprüche. Dies ergibt sich schon allein durch das allgemeine Organisation von ZFS als Gemeinschaft als OpenZFS.

Aber es kann - wegen fehlenden Funktionstonalität in der Implementierung bei den verschiedenen Betriebssystemen - zu Problemen bei der Kompatibilität kommen. ZFS erkennt das und benennt die Funktionstonalität, die Probleme bei der Kompatibilität verursacht.

Ein kleines Beispiel:

  • Erstellen des Pools (zfs create) mit Fedora (26)
  • Importieren des Pools (zfs import) mit TrueOS stable (FreeBSD 12.0-CURRENT #66)
This pool uses the following feature(s) not supported by this system:
        org.zfsonlinux:userobj_accounting (User/Group object accounting.)
All unsupported features are only required for writing to the pool.
The pool can be imported using '-o readonly=on'.

Kompatibilität bei Bootloadern

Kompatibilität bei GRUB 2

Verbünde

aka Cluster

podcasting

Siehe auch