User Tools

Site Tools


software:zfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
software:zfs [2016/07/26 18:20] – created Michele Porellisoftware:zfs [2021/12/05 21:59] (current) – [ZFS] Michele Porelli
Line 1: Line 1:
 ====== ZFS ====== ====== ZFS ======
 +===== Start ZFS after iscsi =====
 +  * Add a drop-in file for the zfs-import-cache service<code>$ sudo systemctl edit zfs-import-cache.service</code>
 +  * Add dependencies<code>[Unit]
 +Requires=open-iscsi.service iscsi.service
 +After=open-iscsi.service iscsi.service
 +</code>
 ===== How-Tos ===== ===== How-Tos =====
 ==== Clone a pool without losing snapshots ==== ==== Clone a pool without losing snapshots ====
Line 5: Line 11:
 You have just to create a snapshot and send it to the new pool. All the previous snapshots will be sent preserving dates and names. You have just to create a snapshot and send it to the new pool. All the previous snapshots will be sent preserving dates and names.
 <code>zfs send -R MY_OLD_POOL@MY_LATEST_SNAPSHOT | zfs receive -F MY_NEW_POOL</code> <code>zfs send -R MY_OLD_POOL@MY_LATEST_SNAPSHOT | zfs receive -F MY_NEW_POOL</code>
 +==== Compile latest release for Debian ====
 +<code>
 +# apt install --yes debootstrap gdisk dpkg-dev linux-headers-$(uname -r) \
 +  git-buildpackage build-essential dkms libaio-dev \
 +  libattr1-dev libelf-dev libblkid-dev libselinux1-dev libssl-dev \
 +  libudev-dev python3-cffi python3-setuptools python3-sphinx \
 +  python3-all-dev uuid-dev zlib1g-dev
 +# git clone https://salsa.debian.org/zfsonlinux-team/zfs.git
 +# cd zfs
 +# git checkout pristine-tar
 +# git checkout master
 +# gbp buildpackage -uc -us
 +# cd ..
 +# dpkg --install \
 +  libnvpair1linux_0.8.1-4_amd64.deb \
 +  libuutil1linux_0.8.1-4_amd64.deb \
 +  libzfs2linux_0.8.1-4_amd64.deb \
 +  libzpool2linux_0.8.1-4_amd64.deb \
 +  zfs-dkms_0.8.1-4_all.deb \
 +  zfsutils-linux_0.8.1-4_amd64.deb \
 +  zfs-zed_0.8.1-4_amd64.deb
 +# modprobe zfs
 +</code>
 +==== Expand zpool to size ====
 +This command works with the volume, not the pool. You will need to execute it for every volume if you pool has more than one.
 +<code>sudo zpool online -e zpool-docker nvme-Amazon_Elastic_Block_Store_volxxxxxxxxx</code>
software/zfs.1469557257.txt · Last modified: (external edit)