home.nas: prepare for new NAS disks

This commit is contained in:
Franzi 2024-02-25 14:47:55 +01:00
parent c6552e8dd2
commit 02e25f89ff
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -4,6 +4,7 @@ nodes['home.nas'] = {
'hostname': '172.19.138.20', 'hostname': '172.19.138.20',
'bundles': { 'bundles': {
'backup-client', 'backup-client',
'dm-crypt',
'jellyfin', 'jellyfin',
'lm-sensors', 'lm-sensors',
'mixcloud-downloader', 'mixcloud-downloader',
@ -66,6 +67,26 @@ nodes['home.nas'] = {
'/storage/nas/normen', '/storage/nas/normen',
}, },
}, },
'dm-crypt': {
'encrypted-devices': {
'/dev/disk/by-id/ata-ST18000NM0092-3CX103_ZVV06JV7-part1': {
'dm-name': 'sg-ZVV06JV7-1',
'passphrase': bwpass.password('bw/home.nas/dmcrypt/sg-ZVV06JV7-1'),
},
'/dev/disk/by-id/ata-ST18000NM0092-3CX103_ZVV06JV7-part2': {
'dm-name': 'sg-ZVV06JV7-2',
'passphrase': bwpass.password('bw/home.nas/dmcrypt/sg-ZVV06JV7-2'),
},
'/dev/disk/by-id/ata-ST18000NM0092-3CX103_ZVV06SLR-part1': {
'dm-name': 'sg-ZVV06SLR-1',
'passphrase': bwpass.password('bw/home.nas/dmcrypt/sg-ZVV06SLR-1'),
},
'/dev/disk/by-id/ata-ST18000NM0092-3CX103_ZVV06SLR-part2': {
'dm-name': 'sg-ZVV06SLR-2',
'passphrase': bwpass.password('bw/home.nas/dmcrypt/sg-ZVV06SLR-2'),
},
},
},
'groups': { 'groups': {
'nas': {}, 'nas': {},
}, },
@ -162,9 +183,13 @@ nodes['home.nas'] = {
'disks': { 'disks': {
'/dev/nvme0', '/dev/nvme0',
# encrypted disks
'/dev/disk/by-id/ata-ST18000NM0092-3CX103_ZVV06JV7',
'/dev/disk/by-id/ata-ST18000NM0092-3CX103_ZVV06SLR',
# ZFS cache disks # ZFS cache disks
'/dev/disk/by-id/ata-TS64GSSD370_B807810503', #'/dev/disk/by-id/ata-TS64GSSD370_B807810503',
'/dev/disk/by-id/ata-TS64GSSD370_B807810527', #'/dev/disk/by-id/ata-TS64GSSD370_B807810527',
}, },
}, },
'sysctl': { 'sysctl': {
@ -245,26 +270,67 @@ nodes['home.nas'] = {
'/dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V8J8ZKRR', '/dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V8J8ZKRR',
}, },
}, },
{ # {
'type': 'log', # 'type': 'log',
'devices': { # 'devices': {
'/dev/disk/by-id/ata-TS64GSSD370_B807810503-part1', # '/dev/disk/by-id/ata-TS64GSSD370_B807810503-part1',
'/dev/disk/by-id/ata-TS64GSSD370_B807810527-part1', # '/dev/disk/by-id/ata-TS64GSSD370_B807810527-part1',
}, # },
}, # },
{ # {
'type': 'cache', # 'type': 'cache',
'devices': { # 'devices': {
'/dev/disk/by-id/ata-TS64GSSD370_B807810503-part2', # '/dev/disk/by-id/ata-TS64GSSD370_B807810503-part2',
'/dev/disk/by-id/ata-TS64GSSD370_B807810527-part2', # '/dev/disk/by-id/ata-TS64GSSD370_B807810527-part2',
}, # },
}, # },
], ],
'ashift': 12, 'ashift': 12,
}, },
}, },
'encrypted': {
'when_creating': {
'config': [
# These are new and fancy "dual actuator"
# drives, partitioned into two partitions
# taking 50% of the disk each.
{
'type': 'mirror',
'devices': {
'/dev/mapper/sg-ZVV06JV7-1',
'/dev/mapper/sg-ZVV06SLR-1',
},
},
{
'type': 'mirror',
'devices': {
'/dev/mapper/sg-ZVV06JV7-2',
'/dev/mapper/sg-ZVV06SLR-2',
},
},
],
'ashift': 12
},
'needs': {
'action:dm-crypt_open_sg-ZVV06JV7-1',
'action:dm-crypt_open_sg-ZVV06JV7-2',
'action:dm-crypt_open_sg-ZVV06SLR-1',
'action:dm-crypt_open_sg-ZVV06SLR-2',
},
# see comment in bundle:backup-server
'unless': 'zpool import encrypted',
},
}, },
'datasets': { 'datasets': {
'encrypted': {
'primarycache': 'metadata',
},
'encrypted/nas': {
'acltype': 'off',
'atime': 'off',
'compression': 'off',
'mountpoint': '/media/nas',
},
'storage': { 'storage': {
'primarycache': 'metadata', 'primarycache': 'metadata',
}, },