meta data for this page
  •  

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:fs:zfs:move_to_zfs [2021/02/14 18:29] niziaklinux:fs:zfs:move_to_zfs [2021/05/14 16:06] (current) niziak
Line 6: Line 6:
   * [[https://www.tomica.net/blog/2019/02/moving-ubuntu-to-root-on-zfs/]]   * [[https://www.tomica.net/blog/2019/02/moving-ubuntu-to-root-on-zfs/]]
   * [[https://blog.heckel.io/2016/12/31/move-existing-linux-install-zfs-root/]]   * [[https://blog.heckel.io/2016/12/31/move-existing-linux-install-zfs-root/]]
 +  * [[https://wiki.debian.org/ZFS|ZFS - Debian Wiki]]
  
 ===== Prepare system ===== ===== Prepare system =====
Line 27: Line 28:
 <code bash> <code bash>
 zpool create \ zpool create \
-    -o ashift=12 -d \+    -o ashift=13 -d \
     -o feature@async_destroy=enabled \     -o feature@async_destroy=enabled \
     -o feature@bookmarks=enabled \     -o feature@bookmarks=enabled \
     -o feature@embedded_data=enabled \     -o feature@embedded_data=enabled \
-    -o feature@empty_bpobj=enabled \+    -o feature@empty_bpobj=enabled \rapidly and thoroughly than you'd think.
     -o feature@enabled_txg=enabled \     -o feature@enabled_txg=enabled \
     -o feature@extensible_dataset=enabled \     -o feature@extensible_dataset=enabled \
Line 46: Line 47:
 </code> </code>
  
-==== create root pool ====+==== Create root pool ====
  
 <code bash> <code bash>
 zpool create \ zpool create \
-    -o ashift=12 \+    -o ashift=13 \
     -O acltype=posixacl -O canmount=off -O compression=lz4 \     -O acltype=posixacl -O canmount=off -O compression=lz4 \
     -O dnodesize=auto -O normalization=formD -O relatime=on \     -O dnodesize=auto -O normalization=formD -O relatime=on \
Line 57: Line 58:
 </code>     </code>    
  
-=== prepare filesystem ===+===== prepare filesystem =====
  
 <code bash> <code bash>
Line 102: Line 103:
 </code> </code>
  
-=== Move filesystem ===+==== Move filesystem ====
  
 <code bash> <code bash>
Line 114: Line 115:
 </code> </code>
  
-=== update filesystem ===+==== update filesystem ====
  
 <code bash> <code bash>
Line 138: Line 139:
 </code> </code>
  
-=== Enable importing bpool ===+==== Enable importing bpool ====
  
 <file /etc/systemd/system/zfs-import-bpool.service> <file /etc/systemd/system/zfs-import-bpool.service>
Line 173: Line 174:
  
 <code bash>update-initramfs -c -k </code> <code bash>update-initramfs -c -k </code>
 +
 +==== Update GRUB ====
  
 === EFI boot === === EFI boot ===
Line 283: Line 286:
 </code> </code>
  
 +==== Install grub on 2nd disk ====
 +
 +
 +=== legacy  ===
 +
 +<code bash>dpkg-reconfigure grub-pc</code>
 +Hit enter until you get to the device selection screen. Select (using the space bar) all of the disks (not partitions) in your pool.
 +
 +or
 +
 +<code bash>grub-install $DISK</code>
 +
 +=== For UEFI booting ===
 +
 +<code bash>umount /boot/efi</code>
 +
 +<code bash>
 +dd if=/dev/disk/by-id/scsi-SATA_disk1-part2 \
 +   of=/dev/disk/by-id/scsi-SATA_disk2-part2
 +
 +efibootmgr -c -g -d /dev/disk/by-id/scsi-SATA_disk2 \
 +    -p 2 -L "debian-2" -l '\EFI\debian\grubx64.efi'
 +
 +mount /boot/efi
 +</code>
 +
 +==== add ZIL and L2ARC  ====
 +
 +<code bash>
 +zpool add rpool log c2980761-ed99-4af3-8519-f03ed43fbefe
 +</code>
 +
 +<code bash>
 +zpool add rpool cache 3b42df2e-2923-464c-92d6-8d629252727d
 +</code>
  
-==== issue: No pool imported ====+===== issue: No pool imported =====
  
 <code> <code>
Line 310: Line 348:
 </code> </code>
  
-==== issue ? ====+===== issue ? =====