OK @hcvv, I get it. Sorry for side notes… Then let’s go in my original post direction.
My filesystem is BTRFS as returned by mount command:
srv-intranet:~ # mount | grep sda
/dev/sda2 on / type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/.snapshots/1/snapshot)
/dev/sda2 on /.snapshots type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/.snapshots)
/dev/sda2 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/boot/grub2/x86_64-efi)
/dev/sda2 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/boot/grub2/i386-pc)
/dev/sda2 on /opt type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/opt)
/dev/sda2 on /home type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/home)
/dev/sda2 on /var type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/var)
/dev/sda2 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/usr/local)
/dev/sda2 on /srv type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/srv)
/dev/sda2 on /tmp type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/tmp)
/dev/sda2 on /root type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/root)
/dev/sda2 on /opt/sentinelone/rpm_mount type btrfs (ro,relatime,space_cache,subvolid=268,subvol=/@/.snapshots/1/snapshot)
I then suggest the following detailed plan. Does it sound good to you?
srv-intranet:~ # swapoff
srv-intranet:~ # vim /etc/fstab
# Comment swap line
srv-intranet:~ # fdisk /dev/sda
#Delete sda3 partition
Command: d
Partition number: 3
#Delete sda2 partition
Command: d
Partition number: 2
# Create sda2 partition again (larger)
Command: n
Partition type: p
Partition number: 2
First sector: 18432
Last sector: +18G
# Type of new sda2 partition (Linux filesystem)
Command: t
Partition number: 2
Hex code: 20
# Create sda3 partition again (swap)
Command: n
Partition type: p
Partition number: 3
First sector: Default
Last sector: Default
# Type of new sda3 partition (swap)
Command: t
Partition number: 3
Hex code: 19
# Save changeset
Command: w
# Update kernel
srv-intranet:~ # partprobe
# Extend filesystem to new sda3 partition
srv-intranet:~ # btrfs filesystem resize max /
# Note UUID of new swap partition
srv-intranet:~ # lsblk
# Update fstab file with new UUID and uncomment swap line
srv-intranet:~ # vim /etc/fstab
# Format swap partition
srv-intranet:~ # mkswap /dev/sda3
# Enable swap
srv-intranet:~ # swapon
# Restart system
srv-intranet:~ # reboot
Thanks again!