Create Samba Domain Controller

Quicksteps

apt install acl attr samba winbind krb5-config krb5-user
systemctl disable --now systemd-resolved.service
rm /etc/samba/smb.conf
samba-tool domain provision --use-rfc2307 --interactive

systemctl disable nmbd
systemctl disable smbd
systemctl unmask samba-ad-dc.service
systemctl mask smbd nmbd winbind
systemctl stop smbd
systemctl stop nmbd
systemctl stop winbind
systemctl enable --now samba-ad-dc.service 

Change Network Device Name in Linux

In my use case I needed to boot my server either as a physical host or as a VM under ESXi using RDM mapping. Needed to make sure that the same network configuration can be used in both cases

root@pve4:/etc/udev/rules.d# vi /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0f:53:2c:e9:001", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="enp1s0f0np0"

The following minimal line is also supposed to work:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"

Add cache to Ceph OSD

Create the logical volume to use as a cache

Here I use the space from my Proxmox boot SSD. If you have a dedicated SSD you can skip this section and add the whole device as lvm physical volume

lvcreate -l 100%FREE -n cachedev pve

Edit /etc/lvm/lvm.conf find line global_filter

Add a/dev/mapper/pve-cachedev| entry to the existing ones. Below is the example of the line

 global_filter = [ "a|/dev/mapper/pve-cachedev|", "r|/dev/zd.*|", "r|/dev/mapper/pve-.*|" "r|/dev/mapper/.*-(vm|base)--[0-9]+--disk--[0-9]+|"]

Quicksteps: Add and configure the cache device

Note: use lvdisplay to get the names of your VG and LV

pvcreate /dev/mapper/pve-cachedev

VG=ceph-6e0a76c7-9c67-4f4b-bd63-523dd2ce3e9e
LV=osd-block-67d5264a-0933-4946-bdac-fa9f4a23326d
vgextend $VG /dev/mapper/pve-cachedev 
lvcreate -L 130M -n cache_meta $VG /dev/mapper/pve-cachedev
pvdisplay /dev/mapper/pve-cachedev
lvcreate -L 130G -n cache $VG /dev/mapper/pve-cachedev

lvconvert --type cache-pool --cachemode writeback --poolmetadata $VG/cache_meta $VG/cache

lvconvert --type cache --cachepool $VG/cache $VG/$LV