c3d2-wiki/ZFSonLinux.mw

145 lines
3.4 KiB
Plaintext

== Debian ==
* unter Debian 8 (Jessie)
<source lang="bash">
cd /root
wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_4_all.deb
dpkg -i zfsonlinux_4_all.deb
</source>
<source lang="bash">
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 -
</source>
SPL/ZFS installieren:
<source lang="bash">
apt-get update
apt-get install debian-zfs
vi /etc/modules
### ZFS //
spl
zfs
### // ZFS
update-initramfs -u -k all
</source>
FIX: zfs-mount.service
<source lang="bash">
cat /lib/systemd/system/zfs-mount.service
which zfs
which zpool
</source>
falls zfs/zpool unter /usr/local liegen, dann nach /sbin kopieren
ZFS:
<source lang="bash">
lsmod | egrep "spl|zfs"
zpool status
</source>
== Debian 8 (Jessie) System mit (systemd-sysv/sysvinit-core) ==
<source lang="bash">
modprobe spl
modprobe zfs
modprobe: ERROR: could not insert 'spl': Exec format error
modprobe: ERROR: could not insert 'zfs': Exec format error
</source>
<source lang="bash">
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
</source>
<source lang="bash">
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
</source>
<source lang="bash">
apt-get install debian-zfs
</source>
=== unterschiedliche version magic ===
Fehler:
<source lang="bash">
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 '
</source>
Laden erzwingen bei "Versionsbezeichungsdifferenz"
<source lang="bash">
modprobe --force-vermagic spl
modprobe --force-vermagic zfs
zpool status
</source>
=== 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"
<source lang="bash">
touch /etc/modprobe.d/spl.conf
touch /etc/modprobe.d/zfs.conf
</source>
<source lang="bash">
vi /etc/modules
### ZFS //
spl # force=1
zfs # force=1
### // ZFS
</source>
=== zpool mirror erstellen ===
<source lang="bash">
zpool create -o ashift=12 zbackup mirror /dev/mapper/vg-zstorage1 /dev/mapper/vg-zstorage2
lxc-ls | xargs -L1 -I {} zfs create zbackup/lxc/{}
</source>