On Fri, Jun 10, 2022 at 02:56:15PM -0400, Andrew Cagney wrote:
> On Fri, 10 Jun 2022 at 12:21, Claudio Jeker <[email protected]> wrote:
>
> > > > Try:
> > > >
> > > > / 1g-* 100%
> > > > swap 1g 0%
> > >
> > > That worked:
> > >
> > > [root@openbsd root]# disklabel sd0
> > > ...
> > > # size offset fstype [fsize bsize cpg]
> > > a: 18874240 64 4.2BSD 2048 16384 12960 # /
> > > b: 2097152 18874304 swap # none
> > > c: 20971520 0 unused
> > >
> > > Thanks!
> > >
> > > Can I suggest adding this as an example to disklabel(8). I suspect
> > > assigning the entire disk to / is a common scenario, and would help
> > > clarify how * and % interact.
>
> ... at least for anyone automating an install as part of a virtual
> test framework; and finding that the default partition size for
> /usr/src was too small :-( :-)
>
> (for what it's worth, the other "disks" are NFS and are added later so
> don't appear in dmesg; and I habitually delete dmesg)
>
> > That is a bad advice. Using single / is just bad habit and does not allow
> > to limit mountpoints with nodev, nosuid or wxallowed. For disks in the 10G
> > space I would make sure that /var, /tmp, /usr, /home are different
> > partitions.
>
> Here's some of the text from disklabel(8)
>
> [...] giving mount point, min-max size range, and percentage of disk,
> space-separated. Max can be unlimited by specifying '*'. If only mount
> point and min size are given, the partition is created with that exact
> size.
>
> from my POV, an example clarifying this would have helped.
>
> take care
>
The allocation proces *is* described in the section above and below it
is an example.
-Otto