summaryrefslogtreecommitdiff
path: root/docs/zeearchive/ZFS/ZFSNightmaresPorted2Linux.md
blob: 0a27fba541896dcf7a8f466b5bb3caf6d265a3c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!-- ZFSNightmaresPorted2Linux, Version: 1, Modified: 2018/12/02, Author: trac -->
# ZFS IS ALL THE RAGE
Zfs is recomended  by the UBUNTU team for LXC/LXD and it has its positives but just like everything else the damned kids fixed is pleanty fucking broke. It does not play well with others and it will fuck you in the most subtle and substantial ways.

Look at the disks.
	
	root@bs2020:~# fdisk -l
	Disk /dev/sda: 136.8 GiB, 146815733760 bytes, 286749480 sectors
	Units: sectors of 1 * 512 = 512 bytes
	Sector size (logical/physical): 512 bytes / 512 bytes
	I/O size (minimum/optimal): 512 bytes / 512 bytes
	Disklabel type: dos
	Disk identifier: 0x264ef27d
	
	Device     Boot Start       End   Sectors   Size Id Type
	/dev/sda1        2048 286749479 286747432 136.7G 83 Linux
	
	
	Disk /dev/sdb: 136.8 GiB, 146815733760 bytes, 286749480 sectors
	Units: sectors of 1 * 512 = 512 bytes
	Sector size (logical/physical): 512 bytes / 512 bytes
	I/O size (minimum/optimal): 512 bytes / 512 bytes
	Disklabel type: dos
	Disk identifier: 0xc06248cd
	
	Device     Boot    Start       End   Sectors  Size Id Type
	/dev/sdb1           2048  85448703  85446656 40.8G 83 Linux
	/dev/sdb2       85450750 286748671 201297922   96G  5 Extended
	/dev/sdb5       85450752 286748671 201297920   96G 82 Linux swap / Solaris
	
	
	Disk /dev/sdc: 136.8 GiB, 146815733760 bytes, 286749480 sectors
	Units: sectors of 1 * 512 = 512 bytes
	Sector size (logical/physical): 512 bytes / 512 bytes
	I/O size (minimum/optimal): 512 bytes / 512 bytes
	Disklabel type: gpt
	Disk identifier: 037F919F-B203-449D-A74D-9F285A3B89BD
	
	Device     Start       End   Sectors   Size Type
	/dev/sdc1   2048 286749446 286747399 136.7G Linux filesystem
	
	
	Disk /dev/sde: 136.8 GiB, 146815733760 bytes, 286749480 sectors
	Units: sectors of 1 * 512 = 512 bytes
	Sector size (logical/physical): 512 bytes / 512 bytes
	I/O size (minimum/optimal): 512 bytes / 512 bytes
	Disklabel type: gpt
	Disk identifier: 66247EC5-E595-44A0-B6B8-F4A18179D457
	
	Device     Start       End   Sectors   Size Type
	/dev/sde1   2048 286749446 286747399 136.7G Linux filesystem
	
	
	Disk /dev/sdd: 465.8 GiB, 500107862016 bytes, 976773168 sectors
	Units: sectors of 1 * 512 = 512 bytes
	Sector size (logical/physical): 512 bytes / 512 bytes
	I/O size (minimum/optimal): 512 bytes / 512 bytes
	Disklabel type: gpt
	Disk identifier: C1068A13-6375-48DE-A72B-0F9B3223B6DE
	
	Device     Start       End   Sectors   Size Type
	/dev/sdd1   2048 976773134 976771087 465.8G Linux filesystem
	
	
	root@bs2020:~# 
	
There is no connection between this and zfs.
	
	root@bs2020:~# zpool status
	  pool: lxd4dev
	 state: ONLINE
	  scan: scrub repaired 0 in 0h4m with 0 errors on Sun Jan 14 00:28:08 2018
	config:
	
		NAME        STATE     READ WRITE CKSUM
		lxd4dev     ONLINE       0     0     0
		  sdc1      ONLINE       0     0     0
	
	errors: No known data errors
	
	  pool: lxd4infra
	 state: ONLINE
	  scan: scrub repaired 0 in 0h0m with 0 errors on Sun Jan 14 00:24:49 2018
	config:
	
		NAME        STATE     READ WRITE CKSUM
		lxd4infra   ONLINE       0     0     0
		  sda1      ONLINE       0     0     0
	
	errors: No known data errors
	root@bs2020:~# 
	

if either of these are missing you need to zpool import the disk in its new location. In the long term the disks should be set up to reference their UUIDs but this requires that the pools not be in use (IE Single user mode). This is further complicated by the fact that the pools had to be created in completely different way for lxc and lxd. Hope they fix this in 18.04

## Linkdump
### Good ones
* http://kbdone.com/zfs-snapshots-clones/
* http://manpages.ubuntu.com/manpages/xenial/man8/zfs.8.html
* https://www.howtoforge.com/tutorial/how-to-use-snapshots-clones-and-replication-in-zfs-on-linux/
* 
### Fodder
* https://www.thegeekdiary.com/zfs-tutorials-creating-zfs-snapshot-and-clones/
* http://lxd.readthedocs.io/en/latest/backup/#container-backup-and-restore
* https://forums.freenas.org/index.php?threads/zfs-send-to-external-backup-drive.17850/
* https://www.freebsd.org/cgi/man.cgi?query=zfs
* https://www.datto.com/uk/blog/four-ways-to-use-zfs-snapshots
* https://forum.proxmox.com/threads/adding-ssd-for-cache-zil-l2arc.25187/
* https://www.freebsd.org/cgi/man.cgi?query=zfs