Package: fai-setup-storage
Version: 5.8.4

Hi,

When creating BTRFS subvolumes with setup-storage, in some cases a sub-
subvolume gets created before primary subvolume gets created. For example, /
var subvolume gets created before / subvolume has been created.

Following disk_config tries to create  @/var subvolume before @/, causing 
subvolume creation to fail due missing directory:

# Disk layout for our FAI server.
#
# <type> <mountpoint> <size>   <fs type> <mount options> <misc options>
#
# This is tailored for a disk with size about 100 GB.

disk_config disk1 disklabel:msdos fstabkey:uuid

primary     -               35G-80G     -           -                           
        
createopts="-L System"
primary     swap            200-4000    swap        sw
primary     /home           10G-        xfs         rw,noatime,nosuid,nodev     
        
createopts="-L 'Homedirs'"
primary     /srv/fai        45G-        xfs         rw,noatime                  
        
createopts="-L 'FAI data'"

disk_config tmpfs
tmpfs       /tmp            1G                      
nodev,nosuid,noexec,mode=1777

disk_config btrfs fstabkey:uuid
btrfs single /              disk1.1                 noatime,subvol=@/
btrfs single /var           disk1.1                 
noatime,nodatacow,subvol=@/var
btrfs single /opt           disk1.1                 noatime,subvol=@/opt
btrfs single /root          disk1.1                 noatime,subvol=@/root
#btrfs single /usr/local     disk1.1                 noatime,subvol=@/usr/
local

Reply via email to