我有一个 btrfs 子卷结构,可以让我轻松地拍摄目标文件夹的快照,但我的一个 btrfs 子卷似乎根本没有安装。这很奇怪,考虑到其他嵌套子卷(即@git
在 内@opt
)工作没有问题。
$ btrfs subvolume list /
ID 256 gen 7946 top level 5 path @rootfs
ID 260 gen 6537 top level 5 path @snapshots
ID 261 gen 4407 top level 5 path @swap
ID 262 gen 7934 top level 5 path @root
ID 263 gen 7939 top level 5 path @home
ID 264 gen 7946 top level 5 path @tmp
ID 265 gen 6542 top level 5 path @pkg
ID 266 gen 7946 top level 5 path @log
ID 267 gen 7937 top level 5 path @etc
ID 268 gen 7472 top level 5 path @opt
ID 269 gen 7475 top level 5 path @www
ID 270 gen 7473 top level 5 path @git
ID 271 gen 7492 top level 5 path @minecraft
ID 272 gen 7491 top level 5 path @minecraft-dynmap
ID 273 gen 7460 top level 5 path @factorio
ID 274 gen 7464 top level 5 path @openttd
$ cat /etc/fstab
/dev/mapper/vg1-lv1 / btrfs defaults,subvol=@rootfs 0 0
/dev/mapper/vg1-lv1 /.snapshots btrfs defaults,subvol=@snapshots 0 0
/dev/mapper/vg1-lv1 /.swap btrfs subvol=@swap 0 0
# /.swap/swap.img none swap sw 0 0
/dev/mapper/vg1-lv1 /root btrfs defaults,subvol=@root 0 0
/dev/mapper/vg1-lv1 /home btrfs defaults,subvol=@home 0 0
/dev/mapper/vg1-lv1 /tmp btrfs defaults,subvol=@tmp 0 0
/dev/mapper/vg1-lv1 /var/cache/apt btrfs defaults,subvol=@pkg 0 0
/dev/mapper/vg1-lv1 /var/log btrfs defaults,subvol=@log 0 0
/dev/mapper/vg1-lv1 /etc btrfs defaults,subvol=@etc 0 0
/dev/mapper/vg1-lv1 /opt btrfs defaults,subvol=@opt 0 0
/dev/mapper/vg1-lv1 /var/www btrfs defaults,subvol=@www 0 0
/dev/mapper/vg1-lv1 /opt/git btrfs defaults,subvol=@git 0 0
/dev/mapper/vg1-lv1 /opt/factorio btrfs defaults,subvol=@factorio 0 0
/dev/mapper/vg1-lv1 /opt/minecraft btrfs defaults,subvol=@minecraft 0 0
/dev/mapper/vg1-lv1 /opt/minecraft/plugins/dynmap btrfs defaults,subvol=@minecraft-dynmap 0 0
/dev/mapper/vg1-lv1 /opt/openttd btrfs defaults,subvol=@openttd 0 0
$ cat /proc/mounts | grep subvol=
/dev/mapper/vg1-lv1 / btrfs rw,relatime,ssd,space_cache,subvolid=256,subvol=/@rootfs 0 0
/dev/mapper/vg1-lv1 /.snapshots btrfs rw,relatime,ssd,space_cache,subvolid=260,subvol=/@snapshots 0 0
/dev/mapper/vg1-lv1 /.swap btrfs rw,relatime,ssd,space_cache,subvolid=261,subvol=/@swap 0 0
/dev/mapper/vg1-lv1 /home btrfs rw,relatime,ssd,space_cache,subvolid=263,subvol=/@home 0 0
/dev/mapper/vg1-lv1 /etc btrfs rw,relatime,ssd,space_cache,subvolid=267,subvol=/@etc 0 0
/dev/mapper/vg1-lv1 /opt btrfs rw,relatime,ssd,space_cache,subvolid=268,subvol=/@opt 0 0
/dev/mapper/vg1-lv1 /tmp btrfs rw,relatime,ssd,space_cache,subvolid=264,subvol=/@tmp 0 0
/dev/mapper/vg1-lv1 /root btrfs rw,relatime,ssd,space_cache,subvolid=262,subvol=/@root 0 0
/dev/mapper/vg1-lv1 /var/cache/apt btrfs rw,relatime,ssd,space_cache,subvolid=265,subvol=/@pkg 0 0
/dev/mapper/vg1-lv1 /var/log btrfs rw,relatime,ssd,space_cache,subvolid=266,subvol=/@log 0 0
/dev/mapper/vg1-lv1 /var/www btrfs rw,relatime,ssd,space_cache,subvolid=269,subvol=/@www 0 0
/dev/mapper/vg1-lv1 /opt/factorio btrfs rw,relatime,ssd,space_cache,subvolid=273,subvol=/@factorio 0 0
/dev/mapper/vg1-lv1 /opt/git btrfs rw,relatime,ssd,space_cache,subvolid=270,subvol=/@git 0 0
/dev/mapper/vg1-lv1 /opt/minecraft btrfs rw,relatime,ssd,space_cache,subvolid=271,subvol=/@minecraft 0 0
/dev/mapper/vg1-lv1 /opt/openttd btrfs rw,relatime,ssd,space_cache,subvolid=274,subvol=/@openttd 0 0
$ journalctl -xb | grep minecraft
Aug 22 17:06:36 primary systemd[1]: Mounting /opt/minecraft...
░░ Subject: A start job for unit opt-minecraft.mount has begun execution
░░ A start job for unit opt-minecraft.mount has begun execution.
Aug 22 17:06:36 primary systemd[1]: Mounted /opt/minecraft.
░░ Subject: A start job for unit opt-minecraft.mount has finished successfully
░░ A start job for unit opt-minecraft.mount has finished successfully.
正如您所看到的,minecraft-dynmap
子卷没有被安装,并且不会出现在 中/proc/mounts
,这与其他可以正常安装的嵌套子卷不同。
尽管自然地,按预期挂载子卷mount -t btrfs -o defaults,subvol=@minecraft-dynmap /dev/mapper/vg1-lv1 /opt/minecraft/plugins/dynmap
或mount -a
按预期工作,但在重新启动后不会持续存在。
每个自我中可以嵌套的子卷数量是否有限制?即@rootfs/@opt/@git/
可以@rootfs/@opt/@minecraft/
工作,但@rootfs/@opt/@minecraft/@minecraft-dynmap
会中断?
我已经搜索过dmesg
和journalctl -xb
/journalctl -xe
但没有找到可以解释这种行为的条目。