-
FUZxxl
Greetings!
-
FUZxxl
I recently noticed that FreeBSD no longer creates /dev/ada0p0 and similar device nodes
-
FUZxxl
when did this change? What can I do to reenable them?
-
FUZxxl
(instead it now only creates /dev/diskid/... nodes which sucks)
-
RhodiumToad
it creates both by default
-
FUZxxl
not on this system (13.2-RELEASE
-
FUZxxl
)
-
RhodiumToad
what's the output of geom -t ?
-
FUZxxl
-
RhodiumToad
and ls -l /dev/*da* ?
-
FUZxxl
# ls -l /dev/*da*
-
FUZxxl
crw-r----- 1 root operator 0x7d 8 Sep. 00:26 /dev/ada0
-
FUZxxl
crw-r----- 1 root operator 0x81 8 Sep. 00:26 /dev/ada1
-
RhodiumToad
so. what's happening here is that zfs thinks it owns the whole of /dev/ada0,
-
FUZxxl
this is correct, it does
-
FUZxxl
I am asking about ada1
-
RhodiumToad
and zfs also ended up tasting the p3 partition on ada1 via the diskid label before finding the direct ada1p3 entry, so it opened the disk that way, which disables the partition entries for ada1
-
FUZxxl
(I said ada0p0 before as to not open questions about device numbers)
-
FUZxxl
oh for fucks sake
-
FUZxxl
why does it do this shit
-
FUZxxl
why does opening the partition one way disable the other entries?
-
FUZxxl
Shouldn't they be symlinks or something?
-
RhodiumToad
this is why the installer turns off diskid and gptid if you install as zfs
-
FUZxxl
well this explains why I have no swap at least
-
RhodiumToad
it's to do with the "exclusive open" flag in geom
-
RhodiumToad
zfs opens the partition exclusively, so glabel (providing the diskid/* entry) passes that down to its open of ada1,
-
RhodiumToad
which prevents gpart from opening ada1 itself
-
FUZxxl
this is a shit design
-
RhodiumToad
not at all
-
RhodiumToad
geom is a very good design, the problem is that zfs thinks it knows better
-
FUZxxl
then ZFS must be patched
-
RhodiumToad
(though to be fair, some geom classes have a similar issue)
-
RhodiumToad
anyway, diskid and gptid can be disabled via sysctl
-
FUZxxl
I want both
-
FUZxxl
I want the issue fixed, not a workaround
-
RhodiumToad
as far as I know, zfs doesn't have a way to tell it which provider to use by name (rather than by content)
-
FUZxxl
I see the problem in that geom has to propagate the exclusiveness down to the root
-
FUZxxl
when it should suffice to have this one partition be exclusive
-
RhodiumToad
(and if zfs did open /dev/ada1p3, that would make the /dev/diskid/* entry for the disk go away, because again, exclusive open)
-
FUZxxl
shit design
-
RhodiumToad
the problem with your idea is this:
-
RhodiumToad
if /dev/ada1p3 is open exclusively but gpart didn't propagate the exclusive open to /dev/ada1, then /dev/diskid/xxp3 could be opened as well, violating the exclusion
-
FUZxxl
the problem is
-
FUZxxl
that diskid appears to be implemented as an interposer
-
RhodiumToad
diskid is part of the glabel class
-
FUZxxl
instead there should be some sort of aliasing system
-
FUZxxl
and diskid/whatever should be implemented by creating aliases for other geoms
-
FUZxxl
so this issue does not appear
-
FUZxxl
(normal glabel nodes cannot be aliases because they are shorter than the underlying provider as they eat a sector for the label iirc)
-
FUZxxl
this could even be reflected by having /dev/diskid/foo be a symlink in devfs
-
RhodiumToad
that's just one of the cases glabel implements
-
FUZxxl
so?
-
FUZxxl
what sort of reasoning is that?
-
FUZxxl
that's like saying "oh we couldn't be arsed to do that right because this is one instance of a bunch of things we couldn't be arsed to do right"
-
RhodiumToad
what I meant was that "normal" is not the wrong term
-
RhodiumToad
*not the right term
-
FUZxxl
RhodiumToad: I suppose sure they are all implemented the same way
-
FUZxxl
shows that they maybe should not be
-
RhodiumToad
glabel implements labels based on disk id, partition id, filesystem id, filesystem volume label, etc. and the explicit labels are just one additional option
-
FUZxxl
you don't need to explain that to me
-
FUZxxl
what point are you trying to make?
-
RhodiumToad
also you'll note that DEV (which creates /dev/blah for geoms) is just another geom class
-
RhodiumToad
the whole thing is highly modular
-
FUZxxl
once again, you don't seem to be making a point
-
RhodiumToad
the point is that there are reasons for the design
-
FUZxxl
doesn't change that the design apparently has an idiotic flaw
-
FUZxxl
just because a design is complex doesn't mean that it is unchangable
-
FUZxxl
I see no technical reason why this cannot be fixed
-
RhodiumToad
the design is not at all complex, it's very simple in fact
-
FUZxxl
that once again does not change my point
-
FUZxxl
just because a design is simple doesn't mean that it is unchangable
-
RhodiumToad
adding the kind of aliases you're talking about would actually make it substantially more complex, because it's a major layering violation
-
FUZxxl
you just need to find the right place to implement these
-
FUZxxl
or rethink how the mapping of geoms to device nodes work
-
FUZxxl
hardlinks are also a layering violation
-
FUZxxl
yet they work
-
FUZxxl
and I'm not even asking for hardlinks...
-
RhodiumToad
right now a device node exists for each provider (that's not exclusively open by another class). for a provider to have multiple aliases in /dev would require some mechanism for getting all aliases suggested by classes further down the tree, and dealing with the resulting combinatorial explosion
-
FUZxxl
so what
-
FUZxxl
then such a change may have to be done
-
FUZxxl
just because the design doesn't account for a solution to the problem right now doesn't mean it cannot be changed to do so
-
FUZxxl
I'm sure nobody is going to DOS your system by creating too many nested aliases
-
FUZxxl
plus you can resolve the combinatorial explosion by e.g. linking to paths in subdirectories that can in turn by symlinks
-
FUZxxl
such that each alias is represented by a single symlink in the end
-
RhodiumToad
that would require for example changing the way *pN and other suffixes work
-
FUZxxl
e.g. (ignoring compatibility for now), one could have the canonical device node be /dev/ada1/p4
-
RhodiumToad
right
-
FUZxxl
and then have /dev/diskid/foo be a symlink to ../ada1
-
RhodiumToad
which prevents you having /dev/ada1
-
FUZxxl
I specifically said to ignore compatibility for now, but I guess you don't care
-
FUZxxl
Now the design can be made compatible by having the system generate symlinks from the old names to the new path-like names when they are accessed
-
FUZxxl
just like /dev/dsp is only generated when you access it
-
FUZxxl
(of course you need to chose file names for the new stuff that do not clash with the old stuff)
-
FUZxxl
e.g. if you access /dev/ada1p2 the OS parses the name and tells you "it's a symlink to dsk/ada1/p2"
-
FUZxxl
and then the usual path resolution rules apply
-
RhodiumToad
by all means implement it and see whether anyone likes it enough to allow it in
-
FUZxxl
too much other stuff to do
-
FUZxxl
and I am not familiar with the subsystem
-
» RhodiumToad has contributed small patches to geom code
-
FUZxxl
nice
-
RhodiumToad
specifically, the allow_nesting options in gpart
-
FUZxxl
and quite useful
-
RhodiumToad
hm. it looks like about half the infrastructure needed for what you want is already in place
-
RhodiumToad
there's support for this case: a disk device driver (e.g. nda) can create an alias (e.g. nvd0 -> nda0)
-
RhodiumToad
and geom classes will respect that by creating their own aliases (e.g. nvd0p1 -> nda0p1)
-
xulfer
Hey all
-
FUZxxl
RhodiumToad: sounds like it could work
-
FUZxxl
so glabel would have to be modified to inject aliases into other geoms?
-
RhodiumToad
something along those lines. but the trick will be to make it work more dynamically, I think currently it only checks for aliases when initially attaching the device
-
RhodiumToad
basically it looks like enough work was done to allow the specific case of nvd -> nda
-
RhodiumToad
(which is why I said its only about half the infrastructure, that's not counting the actual work of choosing aliases)
-
FUZxxl
hm hm I see
-
RhodiumToad
maybe exposing the aliases as a named attribute, and posting an attrchanged event when aliases are changed, and having providers react to that
-
FUZxxl
could work
-
adilix
hi all
-
FUZxxl
hi
-
kenrap
I hope the cybersecurity job I get will let me use FreeBSD
-
kenrap
(in the future)
-
kenrap
I wouldn't want to use Ubuntu or Parrot.
-
FUZxxl
it depends
-
kenrap
Although to make the boss happy, I could convince them that I can run them in Linux jails.
-
kenrap
If the jails get compromised, easier to recover from
-
kenrap
and use ZFS snapshots of the jail(s) for the forensics of them.
-
FUZxxl
not if the kernel gets compromised
-
FUZxxl
though this is the same situation as with Docker on Linux
-
kenrap
Then I have to suck it up.
-
xulfer
Hm anyone else use synth? It's getting hung up on a port that has no pkg alternative.
-
xulfer
namely textproc/obsidian
-
FUZxxl
what do you mean by "no pkg alternative"?
-
xulfer
there is nothing for it in pkg. So in synths case (and maybe poudriers?) it seems to be skipping it because pkg complains about it.
-
xulfer
don't think it's a bug. feels like i'm missing something obvious here
-
FUZxxl
oh you mean no package+
-
xulfer
oh yes sorry
-
FUZxxl
let me check
-
RhodiumToad
it has a restrictive license
-
RhodiumToad
what do you mean by "hung up"? it may need you to accept a license or somesuch
-
RhodiumToad
(that's why there's no pkg for it, because packages are only built for ports whose licenses permit distribution of packages...)
-
xulfer
I'm checking on that
-
xulfer
on the accepting the license being a potential issue
-
xulfer
Yeah it isn't even producing a package for it. Which makes sense. Is there no way around it then you think?
-
xulfer
Mostly asking out of curiousity. I can install it by just using make just fine. If there's a step that would enable me to let synth handle it in the future all the better.
-
FUZxxl
xulfer: fix the license so FreeBSD can redistribute a binar
-
FUZxxl
y
-
xulfer
yeah thought as much
-
angry_vincent
would /dev/dsp4 be the one for dev.pcm.4? ( in my case )
-
angry_vincent
pcm4: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default
-
RhodiumToad
xulfer: LICENSES_ACCEPTED+= whatever in make.conf
-
RhodiumToad
where "whatever" is the license name used in the port
-
RhodiumToad
that satisfies poudriere, I dunno about synth
-
RhodiumToad
angry_vincent: yes, though /dev/dsp* nodes are created on the fly
-
RhodiumToad
angry_vincent: and /dev/dsp without suffix refers to the default unit
-
angry_vincent
great
-
angry_vincent
i am fiddling with sndio and hence the questions
-
xulfer
ohh thanks
-
xulfer
don't suppose anyone might be familiar with why i3 hjkl bindings don't seem to be working?
-
xulfer
seems to be a common problem i guess? worked for me before. just checking to see if mayhaps anyone in here might know exactly what i'm talking about.
-
dvl
S3 option added to bacula11 and bacula13 FreeBSD ports.
-
scoobybejesus
anyone use syncthing on their freebsd box(es) and get the kqueue warning (notice)?
forum.syncthing.net/t/warning-of-hi…despite-small-amount-of-files/19994 . I'm curious if the knowledgeable folks here do any tuning/etc
-
VimDiesel
Title: Warning of high usage / system slow down despite small amount of files? - Support - Syncthing Community Forum
-
meena
hrm…
-
meena
RhodiumToad might know something, but, RhodiumToad has been looking for some alternatives to kqueue for specific tasks
-
meena
scoobybejesus: ^
-
scoobybejesus
I'll keep an eye out! Thanks!
-
dstolfa
scoobybejesus: depending on what kqueue is watching, it can use a lot of file descriptors. the only thing a kqueue can tell you about a directory is that a file was created/deleted/etc on it, but it cannot tell you what file was modified and how. if you want to monitor all files within a specific directory recursively, and that happens to be many files, kqueue will use up a file descriptor for every
-
dstolfa
single file because you will need to open it in order to listen for changes on those files. kqueue is really not a great way to monitor directories sadly.
-
dstolfa
by contrast, inotify on linux can handle that fine, but because it treats the filesystem as a tree rather than a DAG, inotify breaks with hardlinks
-
dstolfa
a couple of years ago i've extended kqueue to insert additional per-event data but the locking required was extremely messy (and probably racy) and the performance was likely unacceptable so i scrapped the whole idea of making it more generic to support filesystems
-
scoobybejesus
i've got about 40k files in there now. it grows fairly slowly, and the box is a little oversized for its load, but still. i'd like to think 115G of data wouldn't cause the system to run out of file descriptors and come to a halt .. or whatever would happen
-
meena
I'm surprised there's no tunable to raise any potential kqueue limites
-
CueXXIII
hi, i wonder if there still is an upstream for ee. i tried to build it on linux out of curiosity and ran into some bugs…
-
CueXXIII
or should i submit the patches to freebsd?
-
pstef_
what kind of bugs? Or just system incompatibilities?
-
CueXXIII
pstef_: it has an unguarded __FBSDID() macro in ee.c and when building with new_curse.c a struct gets declared twice
-
pstef_
the latter might be a bug
-
CueXXIII
pstef_:
bsd.to/prvZ would be the patch to the 2nd issue
-
VimDiesel
Title: dpaste/prvZ (Diff)
-
pstef_
from our point of view, ee is supposed to have an upstream, but I can see that we've applied numerous fixes over the years
-
CueXXIII
and the upstream page i found (
mahon.cwx.net ) seems to be down
-
CueXXIII
last upstream version also was imported in 2010
-
pstef_
I wonder how much has happened upstream since then
-
pstef_
CueXXIII: what is the warning/error that you get without this patch?
-
CueXXIII
pstef_:
bsd.to/0vBq - since new_curse.h gets included in both new_curse.c and ee.c
-
VimDiesel
Title: dpaste/0vBq (Plain Text)
-
meena
pstef_: given that upstream is defunct, i don't think much has happened upstream
-
pstef_
new_curse.c doesn't seem to get compiled under FreeBSD
-
CueXXIII
pstef_: yeah, freebsd configures ee to build against ncurses
-
meena
Also, we probably need to get rid of
github.com/freebsd/freebsd-src/blob/main/contrib/ee/ee.c#L58 like we got rid of the others. but this is in contrib, which is the reason it wasn't axed
-
VimDiesel
Title: freebsd-src/contrib/ee/ee.c at main · freebsd/freebsd-src · GitHub
-
meena
So with upstream defunct, we'd move it to usr.bin/ee and remove new_curse.(c/h)
-
pstef_
patches welcome :) Best sent via phab
-
CueXXIII
meena: ah, so you are removing new_curse for good?
-
meena
CueXXIII: i don't have commit, but that's what i would do
-
meena
I am busy doing other things, for which i (luckily) also don't have commit (because I have no idea what I'm doing)
-
meena
but! there's always reviews!
-
pstef_
why remove new_curse?
-
meena
if we're moving it usr.bin/ee and not using, that seems sensible, but maybe I'm shooting too fast from the hip here and not looking at the bigger picture
-
meena
-
VimDiesel
Title: PKGBUILD - aur.git - AUR Package Repositories
-
» _xor is going through storage boxes
-
_xor
So far I've found my original Walnut Creek FreeBSD CD sets (2.1.7, 2.1.8, etc). Red Hat Linux 5.0, some ZIP disks, a few JAZ disks. I also have my original Sun SPARC workstation.
-
CrtxReavr
_xor, which sparc?
-
rtprio
haha, i had a sparcstation10 5? maybe one of each