Package: fai-setup-storage
Version: 5.8.4
Severity: wishlist
File: /usr/sbin/setup-storage
Tags: upstream

The setup-storage(8) command has the following grammar for tmpfs
blocks:

    volume ::= tmpfs <mountpoint> <tmpfs_size> <mount_options>
    tmpfs_size ::= <sizespec>
    sizespec ::= RAM:[[:digit:]]+%|[[:digit:]]+[kKMGTP%iB]*

This forces a line that looks like the examples in the manpage:

    tmpfs   /tmp    RAM:20% defaults
    tmpfs   /scratch        3GiB    defaults

... which is great if you want to control that. But in our
configuration, we're happy to delegate the decision of how big a tmpfs
should be to the kernel, which has its own defaults (50% of RAM at the
time of writing, I believe).

It seems there's no way to do that delegation in setup-storage(8)
right now: if I use `-` as a <sizespec>, I get the following error:

    # setup-storage -f "disk-config/gnt-fsn" -X
    Starting setup-storage 2.2
    Using config file: disk-config/gnt-fsn
    
          ERROR (line 15):  invalid tmpfs size near " - defaults disk_config
                           nvme0n1 disklabel:gpt-bios gpt_bios_part:1 bootable:2
          [...]
    
          ERROR (line 15): Invalid volume: Was expecting tmpfs size but found "-
                           defaults" instead
    
          ERROR (line 15): Invalid line: Was expecting '\n' but found "tmpfs 
/tmp -
                           defaults" instead
    Syntax error

(I'll also note the duplicate errors, with the first strangely
containing the entire configuration after the tmpfs keyword, stripped
here for brievety.)

It seems to me "-" should be allowed here, like this:

    disk_config tmpfs
    tmpfs   /tmp    -       defaults

It's allowed in fstab and just worked fine in our previous
configuration.

Thanks!

-- System Information:
Debian Release: 10.3
  APT prefers stable-debug
  APT policy: (500, 'stable-debug'), (500, 'stable'), (1, 'experimental'), (1, 
'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fai-setup-storage depends on:
ii  e2fsprogs                 1.44.5-1+deb10u3
ii  liblinux-lvm-perl         0.17-2
ii  libparse-recdescent-perl  1.967015+dfsg-2
ii  parted                    3.2-25
ii  perl                      5.28.1-6

Versions of packages fai-setup-storage recommends:
ii  lvm2   2.03.02-3
ii  mdadm  4.1-1

Versions of packages fai-setup-storage suggests:
ii  cryptsetup     2:2.1.0-5+deb10u2
ii  dmsetup        2:1.02.155-3
ii  dosfstools     4.1-2
pn  jfsutils       <none>
ii  ntfs-3g        1:2017.3.23AR.3-3
ii  reiserfsprogs  1:3.6.27-3
ii  xfsprogs       4.20.0-1

-- no debconf information

Reply via email to