I’m attempting to setup a shared volume across three Fedora Server nodes. I’m using a Synology NAS as the iSCSI target. I have all three nodes setup in the iSCSI setup and Synology is showing them as registered. All three nodes see the device as /dev/sda
.
Here are the steps that I’ve attempted:
On the first node, create an LVM partition:
node1:$ sudo fdisk /dev/sda
new partition
set type to 44 (Linux LVM)
Installed lvmlockd and sanlock and started the services on all nodes:
node*:$ sudo dnf install -y lvmlockd sanlock
node*:$ sudo systemctl enable --now lvmlockd sanlock
On the first node, created a new shared volume group:
node1:$ sudo vgcreate --shared svg1 /dev/sda1
Enabling sanlock global lock
Device /dev/sda1 has no PVID (devices file ch1fvyTrHW6uFbAJXxeDYSgdPOWV55KO)
Physical volume "/dev/sda1" successfully created.
Logical volume "lvmlock" created.
Volume group "svg1" successfully created
VG svg1 starting sanlock lockspace
Starting locking. Waiting until locks are ready...
Checking lock status:
node1:$ sudo lvmlockctl -i
VG svg1 lock_type=sanlock FYsFon-K4no-EikA-zQtX-V22e-V2Kt-b2Pb2U
LS sanlock lvm_svg1
LK VG un ver 0
LK GL un ver 0
Checking for device:
node1:$ sudo lvs -a -o +devices
Skipping global lock: lockspace not found or started
Reading VG svg1 without a lock.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvol0 fedora -wi-ao---- <221.89g /dev/nvme0n1p3(3840)
root fedora -wi-ao---- 15.00g /dev/nvme0n1p3(0)
[lvmlock] svg1 -wi-ao---- 256.00m /dev/sda1(0)
And now when I attempt to activate the lock on either node 2 or 3, I get the error below:
node2:$ sudo vgchange --lock-start
Skipping global lock: lockspace not found or started
I tried running sudo lvmlockctl --gl-enable
resulting the same thing.
pvs on node1 shows the pv but pvs does not show the iscsi pv and says something about the lockspace isn’t found.
node1:$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/nvme0n1p3 fedora lvm2 a-- <236.89g 0
/dev/sda1 svg1 lvm2 a-- <200.00g <199.75g
node2:$ sudo pvs
Skipping global lock: lockspace not found or started
PV VG Fmt Attr PSize PFree
/dev/nvme0n1p3 fedora lvm2 a-- <236.89g 0
I feel like I’m missing something really stupid. Any ideas?