如何根据IP挂载分区?

如何根据IP挂载分区?

我已经设置了一个家庭服务器,我想知道是否可以设置为fstab当我在家时使用家庭网络 IP 自动安装网络驱动器,以及当我不在家里时使用我的 Tailscale IP 安装它网络。

这是我目前的fstab

#
# /etc/fstab
# Created by anaconda on Tue Jun 21 16:36:27 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=[REDACTED] /                       btrfs   subvol=root,compress=zstd:1 0 0
UUID=[REDACTED] /boot                   ext4    defaults        1 2
UUID=[REDACTED] /boot/efi               vfat    umask=0077,shortname=winnt 0 2
UUID=[REDACTED] /home                   btrfs   subvol=home,compress=zstd:1 0 0
# BEGIN ANSIBLE MANAGED BLOCK
[HOMENETWORK]:/homeserver/encrypted/backups   /mnt/backups            nfs     defaults 0 0
# END ANSIBLE MANAGED BLOCK

相关内容