-
hernan
does /etc/sysctl.conf.local works just like /etc/sysctl.conf ?
-
tm512
so I've managed to narrow things down regarding these DRM fault errors when using picom. it's picom's vsync stuff that triggers it
-
rwp
hernan, It's supposed to work just the same. The system ships with a template /etc/sysctl.conf so you can use the .local file to avoid modifying it though I modify it here.
-
hernan
rwp: thanks
-
tm512
so I'm wanting to try out 15-CURRENT to see if the drm-61-kmod drivers have this same issue, but I can't seem to jump up to 15-CURRENT through pkgbase, running env ABI=freebsd:15:amd64 pkg-static upgrade -r pkgbase
-
tm512
gives "an error occured while fetching package" and "repository pkgbase has no meta file, using default settings"
-
tm512
eventually just spitting out "unable to update repository pkgbase" and erroring out
-
tm512
gives a warning to consider running pkg bootstrap -f, but that tries to install pkg through the pkgbase repo which fails
-
tm512
it seems like the mirror is giving a 404 error on GET /freebsd:15:amd64/base_weekly/meta.conf
-
tm512
weird, just manually using curl on meta.conf gives a 404 on my laptop, but on my (Linux) desktop I get the file
-
tm512
oh, it's case-sensitive
-
tm512
now it's proceeding. I've heard about CURRENT having a bunch of debug options enabled. is that true for the binaries in pkgbase, or just for the traditional builds?
-
tm512
either way, should be sufficient for testing this
-
tm512
also, if I decide to start tweaking the settings for i915, which sysctl namespace do I use? I'm seeing i915's tunables at both hw.i915kms.* and compat.linuxkpi.i915_*
-
mason
Woot, first server of the day made the migration from Debian to FreeBSD. Made me think that it'd be cool if the installer could configure bridges out of the box, and also if it could throw and enable in cpu-microcode.
-
mason
throw in and enable*
-
tm512
so at least first impression of drm-61-kmod is that it doesn't throw the fault errors, though this could just be a case like 510 on 14-STABLE where it seems fine at first and then suddenly it starts to throw them
-
tm512
I don't really want to run CURRENT though
-
mason
tm512: STABLE is a development branch, remember.
-
tm512
mason: I'm aware, I dunno what point you're trying to make
-
tm512
so nevermind, fault errors with drm-61-kmod as well
-
tm512
I have no idea why these are so inconsistent. ends up getting my hopes up when they don't happen for a couple boots
-
tm512
apparently has nothing to do with vblank scheduling, because disabling frame pacing in picom has no effect on it
-
tm512
and evidently it's not even related to vsync? earlier the errors were going away when I disabled vsync in picom
-
tm512
forcing picom to use DRI2 rather than DRI3 seems to fix the issue, hmm
-
tm512
kind of a garbage solution though since that makes picom take considerably more CPU which basically has this CPU running constantly around 55-60C even without other load
-
johnjaye
>STABLE is a development branch
-
johnjaye
yes the terminology is a bit... confusing
-
tm512
I still don't really understand the point of bringing it up. I'm quite familiar with running STABLE
-
johnjaye
does picom have some advantage vs xorg?
-
johnjaye
i've never heard of it
-
tm512
it's a compositor for X11, it's not something mutually exclusive with it
-
tm512
it's the only way I've found to reliably fix screen tearing on X11
-
johnjaye
different topic. i'm struggling to understand how port building works
-
johnjaye
the Makefiles define a variable WWW to be a github repo. But I can't find a reference to that variable anywhere else
-
johnjaye
this is in the lsof port. i'm guess MASTER_SITES is just set to ${WWW} somewhere I can't see.
-
kevans
johnjaye: WWW is an informational-only thing
-
johnjaye
very mysterious. the lsof port has no mention of where to actually get the source code
-
kevans
it used to be in the pkg-descr, but it got moved into a make var to make it easier for some tooling to get at for display or something like that
-
johnjaye
or rather it has WWW but then doesn't use it.
-
kevans
-
VimDiesel
Title: Makefile « lsof « sysutils - ports - FreeBSD ports tree
-
kevans
USE_GITHUB=yes, GH_ACCOUNT=lsof-org
-
kevans
the project defaults to the port name, so you'll probably find it at github.com/lsof-org/lsof
-
johnjaye
meaning USE_GITHUB is used elsewhere to get the source from the WWW var?
-
kevans
no, WWW isn't used by anything in the process
-
kevans
USE_GITHUB says "it's a github thing, setup master sites and whatnot accordingly"
-
johnjaye
ok. i can't find that var in /usr/share/mk or in the source tree of bmake anywhere
-
kevans
ports has their own framework built atop bmake
-
kevans
look in Mk/ in the ports repo
-
johnjaye
wow
-
kevans
this is a correct response :-)
-
johnjaye
studying bsd ports is like reading a detective novel
-
johnjaye
every answer leads to another level of question
-
kevans
just don't read bsd.port.mk too hard
-
johnjaye
i am in fact reading it right now
-
johnjaye
or rather i spent the last hour reading it carefully
-
kevans
there's some really fun shit in there where a port can include bsd.port.pre.mk and bsd.port.post.mk separately, and parts of bsd.port.mk will be excluded based on which one you've included in which position
-
johnjaye
i see
-
johnjaye
i'm also trying to wrap my head around makefile being so complicated
-
johnjaye
it has a bunch of weird pseudo-shell like features like variables and for each loops
-
johnjaye
it's also called Mk not mk....
-
johnjaye
i guess now i know why there is an entire manual on this
-
tm512
weird, so sometimes, FreeBSD reports the bluetooth chip as "Realtek Bluetooth Radio", but then other times it reports it as a "Realtek 802.11ac" something or other
-
tm512
also, picom seems fine on drm-515-kmod with Xorg using the intel DDX, even with DRI3 enabled. I seem to recall the exact same issue happening regardless of whether I used intel or modesetting, though, both produced fault errors
-
tm512
all of these inconsistencies with this laptop are really getting to me
-
parv
tm512, Which laptop is it?
-
tm512
a first-gen ThinkPad E14
-
parv
tm512, Thanks
-
parv
tm512, Both bluetooth & Wifi most likely are on the same card. One or the other component is likely being identified first
-
tm512
parv: they're on the same card, but they're separate devices. wifi is connected over PCIe, bt over USB
-
tm512
another thing I'm dealing with are these "acpi_ec0: EcCommand: no response to 0x84" messages, seemingly mostly when my system is under load
-
mason
tm512: The obvious reason to note that it's a development branch is that you should expect inconsistency and failed experiments from time to time, as compared with a RELEASE branch which is intended for production by dint of an expectation of reliability. Nothing too mysterious.
-
tm512
feels kinda dismissive tbh, also these packages are the exact same I'd be using on RELEASE
-
tm512
same exact drm drivers
-
tm512
same version of picom
-
tm512
and from what I understand, STABLE is an "officially supported" branch anyway, unlike CURRENT
-
tm512
mason: also, even if the issues I'm having, particularly with the pipe errors, aren't present in 14-RELEASE (kind of a big if since the drivers aren't in base), it's still important to catch regressions
-
johnjaye
hrm. so i thought to build a port you go into the port directory and type 'make install' or 'make'
-
johnjaye
but if it's using variables like USE_GITHUB or SR or what not from the ../Mk dir how is it finding those
-
tm512
for these fault errors I have no idea where the blame lays. I dunno if it's i915kms, which ultimately gets fault errors, or if it's mesa's iris driver, or if it's the Xorg DDX drivers
-
tm512
I don't think it's ultimately picom's fault because it doesn't seem to be doing anything all too weird
-
kenrap
is there a way to change the label of an existing fat filesystem without reformatting with newfs_msdos(8) again?
-
mage
if I'd like PGSQL support in libreoffice do I have any other choice than recompiling the whole stuff ...?
-
tm512
kenrap: dosfslabel/fatlabel, though that seems to be a Linux utility, hrm
-
tm512
ports has it (from dosfstools) but it's for the linuxulator
-
lw
emulators/mtools can do that (with mlabel)
-
lw
mage: if there's no subpackage/flavour with postgres support, then yes. or else you could open a bugzilla PR and ask for pgsql to be enabled by default
-
lw
-
VimDiesel
Title: Mtools 4.0.20: mlabel
-
adilix
hi all
-
kenrap
damn, GNU to rescue then, thanks lw
-
kenrap
*to the rescue
-
kenrap
Time for me to pass out, zzz...
-
saohh
Hello guys, when i try e.g. zpool create example /dev/da2 and zpool responds: "cannot use '/dev/da2': must be a block device or regular file
-
saohh
what would i have to do different?
-
lw
saohh: normally you just use 'da2', not '/dev/da2', but i'd still expect that to work. what does 'ls -l /dev/da2' say?
-
saohh
hello thank you for helping, let me check ;)
-
saohh
da2 does exist in the folder /dev if thats the question xD
-
lw
saohh: does it work if you just do 'zpool create example da2'?
-
saohh
crw-r----- 1 root operator 0x8e Feb 20 11:41 /dev/da2
-
saohh
this is what it replies
-
saohh
with "just" da2 also same answer (block device or regular file)
-
lw
are you root?
-
saohh
no but i use sudo to have permissions to run the command
-
lw
can you paste the entire command you're running?
-
saohh
just as written (simple to test / identify the issue): zpool create example da2
-
lw
that's not the exact command though since you said you used sudo?
-
saohh
yes i did -.- shame on me somewhere running through handbook etc. i saw so many different ways i lost the sudo in front of the commands -.-
-
saohh
erasing the example pool is sudo zpool delete example ?
-
saohh
bcs. i would like to try a raidz2 pool with 4 disks
-
lw
(sudo) zpool destroy example
-
saohh
da2, 3, 4 and 5 ;)
-
saohh
ok mom
-
saohh
do you use ZFS yourself?
-
saohh
maybe you can give me a recommendation, i have 6 disks completely for my homeserver and i would like to use ZFS
-
saohh
question is what is the best way of doing that raidz2? bcs. of 2 disks can fail?
-
lw
yes, i use zfs on my desktop (2 disks in separate pools) and on a fileserver with 8 disks in a raidz2. if you have four disks, assuming they're reasonably large (>2TB) i would go with raidz2, but if you don't mind an increased risk of disk failure on rebuild (e.g. if you have backups or the data or not important) then a mirror-stripe will give better performance
-
lw
wait, do you have 4 disks or 6 disks? you said both
-
saohh
well xD right now i have 2 SSDs as a mirror for the OS (FreeBSD) and 4 DELL SAS 1.8TB Harddisks but i wait for 2 more chassies to end up having 6 for the data pool (possibly then raidz2)
-
saohh
if i create that raidz2 now with 4 disks can i expand it later by 2 more?
-
lw
sorry, i need to do a work thing, i'll be back in ~10 mins if no one else answers
-
saohh
sure thank you anyhow you helped me already
-
lw
saohh: yes, you can add additional devices to a raidz pool, see 'man zpool-attach'. i think (?) this feature is new in freebsd 14.0. i've never tried it so i can't say how well it works
-
saohh
well thats awesome, once i have the additional two caddies with me, i will put the two disks in the server and let you know
-
saohh
we can find out together i run 14.0 ;)
-
lw
be very careful when doing this because if you add the disks in the wrong way (e.g. adding them as top-level vdevs instead of adding them to the raidz) it's annoying to remove them
-
lw
(although that's not as bad as it used to be where if you accidentally added a disk you could never remove it)
-
saohh
i will get back here once i have them as i mentioned ;) so we can figure out, the offical way and if it works, maybe interesting for others facing that too
-
saohh
and a knowledgeable guy like you could then confirm that to them directly here ;)
-
saohh
I am back and i received the additional drives
-
saohh
lw are you there? if yes, we could try together adding the two disks now to the raidz2 pool ;)
-
lw
saohh: i am around but i've never done this before so i might not be the best person to help ...
-
saohh
i tried it zpool attach poolname device_to_add
-
saohh
but it also wants a "new device" as argument, whatever that will be?
-
saohh
attach [-fsw] [-o property=value] <pool> <device> <new-device>
-
saohh
as i have no data on it, its just an experiment, to let you know if it works, if it doesnt it doesnt, i delete the pool and build a new one with all 6 disks
-
lw
saohh: you need to specify the raidz vdev to attach to, so say you had a pool like this:
le-fay.org/tmp/30d/mR9nDX.txt - the raidz vdev here is "raidz2-0" so you want "zpool attach data raidz2-0 <new-device>"
-
lw
(i see this pool has suffered the native encryption bug again, i should get around to rebuilding it from scratch without encryption...)
-
saohh
ah alright mom
-
lw
let me point out again that i've never actually done this and am just reading the manpage and telling you what i think it says :-)
-
lw
if there's no data on the pool i guess it doesn't matter if it breaks though
-
saohh
exactly the point
-
saohh
right now nothing is on it ;)
-
CrtxReavr
lw, can you read a manpage and tell me what to do?
-
lw
CrtxReavr: depends, what are you trying to do? have you tried "rm -rf /"?
-
CrtxReavr
lw, six times!
-
saohh
funny xP
-
lw
wow you must have found a bug in rm if that didn't fix the problem
-
CrtxReavr
Tried of re-installing BTW. .. FreeBSD sucks!
-
lw
"rm" = "remove malfunction" btw, it normally fixes all your problem
-
CrtxReavr
That's the "read mail real fast" utility, right?
-
saohh
cannot attach da6 to raidz2-0: can only attach to mirrors and top-level disks
-
lw
hmm
-
lw
saohh: i'm on 15.0, let me see what the 14.0 manpage says about this, one sec
-
lw
saohh: ok, seems like 14.0 does not have this feature :-( sorry, i really thought it was in 14 already (ref:
man.freebsd.org/cgi/man.cgi?query=z…+and+Ports&arch=default&format=html)
-
VimDiesel
Title: zpool-attach
-
lw
saohh: so you'd have to destroy the pool and recreate it from scratch with the new disks
-
saohh
but when i do zpool --help it shows attach as a possible option oO
-
lw
seems like it's not in 14-STABLE either so it won't be in 14.1, that's a shame
-
lw
saohh: attach has existed forever, but it could only attach devices to a mirror, not a raidz. attaching to a raidz is the new functionality in 15.0
-
saohh
oh holy moly alright
-
saohh
as someone wanting to build a homeserver while learning BSD its better to stick to the stable right?
-
lw
stick with -RELEASE if you're new, e.g. 14.0-pX
-
CrtxReavr
Probably the security branch, which is release+security patches.
-
saohh
yeah i use the 14 release p5 ;)
-
lw
14-STABLE is okay for experienced users, i would never recommend 15-CURRENT unless you feel comfortable fixing bugs in the source code :-)
-
CrtxReavr
Mostly security patches. . . sometimes functionality patches.
-
CrtxReavr
"STABLE" is a development branch. . . they try to behave with it, but shit happens.
-
lw
it is a development branch but at least most of the changes have been tested for a week or two in current, so it's a bit less likely to break
-
» CrtxReavr is a 13.2p9 luddite.
-
saohh
ok so destroy it is then
-
lw
CrtxReavr: i think you've been using freebsd a while... remember when we didn't have patch releases and you had to run -stable if you wanted security fixes? :-)
-
CrtxReavr
I do.
-
lw
after that changed i guess they got more adventerous with merging changes into current
-
CrtxReavr
And it wasn't bad, really.
-
CrtxReavr
Things were fixed quickly.
-
» CrtxReavr cut his teeth on 3.0 FWIW.
-
lw
CrtxReavr: my primary memory from those days is sshd having a new security vulnerability every other week
-
lw
at one point it seemed like telnetd might be more secure
-
CrtxReavr
I rememeber a telnetd RCE as root exploit.
-
CrtxReavr
It was fun. . . the PoC code even had a curses "progress bar" - it was all very hollywood.
-
lw
a few systems had the LD_PRELOAD issue, and there was the Solaris -l-froot issue... did freebsd have one?
-
CrtxReavr
It was. . . I think in the early 4.x days.
-
CrtxReavr
Back then, so many people ran both telnet & ssh - with telnet as a sort of backup.
-
CrtxReavr
lw, that solaris -froot thing is present in un-patched Solaris 10. . . which still runs in a scary number of places.
-
saohh
how old are you guys?
-
saohh
i had expected over 40 i would be the grandfather here xD
-
» CrtxReavr is just south of dirt.
-
CrtxReavr
54 if it matters.
-
lw
CrtxReavr: anyone still running that version must not have upgraded for ~20 years... which, yeah, that's probably believable
-
lw
saohh: i'm 20 and i've been 20 for 20 years
-
CrtxReavr
If we're counting that, way, I've been twelve for 32 years.
-
CrtxReavr
s/\,//
-
saohh
that sounds lovely xD healthy attitude i suppose
-
saohh
you guys use freebsd professionally or say more likely unix(es)? or just home usage?
-
lw
both, although we're mostly Windows at work (our entire business is built around supporting a specific niche Windows application) most of the support infrastructure runs freebsd, websites etc
-
saohh
interesting as i plan to look into webserver
-
saohh
Nginx or Apache?
-
tercaL
freenginx
-
lw
both, but i'm thinking about switching to Apache exclusively as nginx has basically no advantage for us and has fewer features
-
nerozero
+1 to apache
-
nerozero
less weird staff, better documented, more predictable
-
CrtxReavr
I don't currently use FreeBSD professionally, but I've certainly deployed it for many services at scale and places all around the world.
-
tercaL
isn't Apache way too slower than nginx?
-
saohh
isnt it supposed to be better with higher load (Nginx bcs. of its design)? propably anyhow at numbers a normal privat person using it at home will never matter
-
nerozero
I didn't notice that
-
lw
tercaL: it's not "way slower". it's less scalable in some workloads (but much less so with the event mpm), but that only matters if you're serving very high volumes of traffic
-
lw
like, if i was serving static files or proxy traffic at 10Gbps... i'd probably lean towards nginx... but there's nothing like our workload. and if you're running PHP or something, PHP itself is going to be the bottleneck
-
saohh
in nginx you pass the php over a socket no?
-
nerozero
agree, and if used php - use fpm instead of mod_php
-
saohh
i found that concept interesting fpm php or so no?
-
lw
it's not like in 2002 when Apache required a separate worker process for every incoming connection
-
lw
saohh: you do it that way in Apache as well, with php-fpm
-
lw
i mean, you can still use mod_php in Apache if you really need to but that's basically just worse in every way, so don't do that
-
saohh
aha so basicly apache took over this idea from NGinx and now its equally scalable, with the lack of being as quick as NGinx for static content?
-
CrtxReavr
Web servers are something I've never run at scale. . . just one-off deployments, for relatively low traffic.
-
CrtxReavr
I am kind of an Apache luddite though.
-
lw
i wouldn't say it came "from nginx", the idea was well known long before nginx existed. it just took Apache a while to adopt it because it's a large and complicated piece of software
-
saohh
and for that you use CrtxReavr? Apache?
-
CrtxReavr
Look back two lines.
-
lw
fwiw, i used to work at an extremely large and well known website based on a PHP app with Apache (and this was back in the Apache 1.3 days, so not event mpm) and Apache was *never* the bottleneck.
-
saohh
oh yeah you wrote that while i wrote the question xD
-
lw
not to say that there's never any reason to use nginx, but i think people wrongly dismiss Apache based on 20-year-old information without properly considering their requirements. Apache can do a lot of stuff nginx can't
-
saohh
is both equally complex when it comes to running multiple sites?
-
saohh
or is one easier then the other in that regard?
-
saohh
on FreeBSD that is ;)
-
lw
that's just down to what you prefer, both of them can do virtual hosting and the total lines of configuration isn't that different between them
-
lw
try both, see what you like
-
CrtxReavr
lw, that race-condition thing I brought up yesterday with named & dhcp6c. . . never did get that sorted in a clean way:
bpa.st/5EPQ
-
VimDiesel
Title: View paste 5EPQ
-
lw
CrtxReavr: what was the actual problem?
-
CrtxReavr
I'm think I'm facing doing something ugly like adding a 'sleep 10' to the beginning of the named startup script.
-
lw
you want named to depend on DHCP? why?
-
CrtxReavr
lw, when named starts, it bitches that it can't create its v6 interfaces. . . . but if I restart named, it's fine.
-
lw
i've never used named on a dhcp system, but it should recognise new addresses when dhcp adds them and reconfigure itself
-
CrtxReavr
relying dhcp6c to pull DHCPv6-PD and configure an external and internal interface.
-
lw
(maybe this doesn't work as well with ipv6?)
-
lw
or are you using listen-on{} in named.conf? i guess that would not work like this
-
lw
CrtxReavr: fwiw this might not work because just because dhcp6c has started, doesn't mean it acquired and assigned the address
-
lw
this feels like a fragile configuration in general, like what if your isp's dhcp server is slow one time? ... i'd rather fix the root cause i think
-
CrtxReavr
listen-on { any; };
-
CrtxReavr
listen-on-v6 { any; };
-
CrtxReavr
Yep.
-
RoyalYork
Hello. Quick question on the default install and config with FreeBSD14. /etc/ssh/sshd_config has the following commented: "#PermitRootLogin no". I am attempting to harden my system, but with the default, i am not able to log in as root. Is there another setting elsewhere that is closing the ability to log in as root? It s
-
CrtxReavr
Someone suggested using netwait, but its v6 support seems. . . poor.
-
lw
ooi, why do you want named to listen on a DHCP-PD prefix? does your ISP guarantee the prefix will never change?
-
lw
RoyalYork: what's in sshd_config, commented out, is the default settings. so the default setting is "PermitRootLogin no".
-
nerozero
RoyalYork, U dont have to
-
nerozero
use "su" to elevate to root
-
CrtxReavr
lw, no. . . but it will be mostly stable - and that's okay, I can deal with it changing in an automated fashion.
-
nerozero
create user in wheel group
-
CrtxReavr
su is bush league - use sudo.
-
saohh
su would not work for me too you can not login as root over remote, thats what i had
-
RoyalYork
Okay, so if I leave it uncommented, then users will *not* be able to login as root directly? Good. Because I thought I had to uncomment the line myself for it to take affect
-
tercaL
nerozero is right. and then, do: su -
-
lw
CrtxReavr: all the cool kids use doas now, apparently
-
saohh
yeah i used my IDrac and as Root installed SUDO, added my user done ;)
-
nerozero
u can do basically everything with build in su
-
» CrtxReavr still uses screen instead of tmux, so I've given up on being cool.
-
lw
RoyalYork: if you leave it *commented* the default is not to permit root login. if you uncomment it, nothing changes as you are explicitly specifying the default. to allow root login, you would have to uncomment it and change it to say "PermitRootLogin yes" (or "PermitRootLogin without-password")
-
» CrtxReavr litterally has three decades of muscle memory for screen.
-
RoyalYork
Thank you, lw. Is there some master config with the those defaults enabled and uncommented?
-
saohh
is this the case under FreeBSD now too (doas vs sudo)?
-
CrtxReavr
o_O
-
lw
RoyalYork: no, the defaults are built into the sshd binary. but /etc/ssh/sshd_config lists all the default values, so that's the file you're looking for
-
RoyalYork
Thanks
-
lw
like if you're looking for something similar to /etc/rc.conf vs /etc/defaults/rc.conf, sshd doesn't have that
-
RoyalYork
Ya that was what I thinking of. Thanks for clarifying
-
mason
Oh, weird. 14.0, just installed on my T480, and the after-install shell doesn't have the network configured.
-
mason
dhclient to the rescue, but I don't think I've seen it unconfigured before.
-
CrtxReavr
You do have to pick that option during the install, unless you intend to set it up yourself.
-
mason
CrtxReavr: Where during install? I didn't do it last night and the network remained configured. Same install stick.
-
lw
i was going to say, maybe an obvious question, but did you actually pick the option to configure networking in the installer
-
ridcully_
RoyalYork: you can also check `sshd -T` for the effective settings (which of course is not 100% safe, but a good start, if you assume the system is un-tampered)
-
mason
I did.
-
RoyalYork
ridcully_, thank you
-
RoyalYork
shows everything that is set
-
RoyalYork
:D
-
ridcully_
shows `permitrootlogin no` for me - so maybe _is_ set on your machine?
-
babz
that's the deault value
-
mason
Oof. And, the installed T480 doesn't boot. Haven't dug into why yet. Just used the installer, nothing custom.
-
mason
Hm. It popped in a fallback bootloader properly.
-
mason
I don't see the NVMe disk in the boot order priority list, oddly.
-
ivaat
this isnot freebsd related but with freebsd nginx/1.24.0 package i experince this weird thing that /robots.txt is not matched, request goes to proxy pass. here is my conf:
paste24.net/p/egXK6a
-
VimDiesel
Title: Troubleshoot IT easily - paste service
-
ivaat
can someone verify perhaps?
-
ivaat
with stable nginx version and freebsd 13.2-RELEASE-p9
-
thumbs
ivaat: There is #nginx
-
ivaat
i was there
-
ivaat
guy who tested has ver nginx/1.25.2
-
ivaat
anyways i tested angie and in there same conf works
-
patanga
what can happen if a device is unplugged/disconnected without being unmounted on the supposition that no read/write is going on?
-
ivaat
i tought to let know of maintainer since im not going to open bug in nginx own tracker
-
ivaat
if no read and write then issue command sync before unplugging
-
patanga
web forums paint a bleak picture, but i cannot logically imagine that it can do a harm to the file system
-
lw
patanga: data can be in the kernel buffer cache and not yet written to the disk, so you could lose some amount of data that was written since the last sync
-
lw
depending on the filesystem, this could cause metadata corruption if the metadata changes hadn't been fully written (this should not happen on modern journaled filesystems, but could on FAT or older UFS)
-
patanga
lw: ivaat: ok, i understand that. my question is: can there be done any harm to the file system, apart from losing data still in the cache?
-
lw
patanga: yes, if the cache in the cache is filesystem metadata.
-
lw
s/cache in the/data in the
-
ivaat
sync is not writing cache to disk?
-
patanga
lw: oh, metadata. huh, i dont know if i ever changed the metadata of a fs
-
lw
this is why fsck exists, to give metadata errors caused by unclean dismounting of a filesystem (usually on a crash, but disconnecting a mount drive is semantically the same as a crash in many ways)
-
lw
patanga: every time you write to a file, create a file, delete a file, you change the fs metadata
-
lw
the only exception there is on many filesystems, overwriting existing data of a file in-place (i.e., not changing the file size) might not require a metadata update
-
lw
even reading a file can change the fs metadata if atime is enabled
-
patanga
lw: seems that i have to study file systems and metadata. however what you say seems to confirm that unmounting is important
-
lw
patanga: it is, yes, in the sense that there's no reason not to do it. in practice, many/most of these errors can be fixed by fsck, but that only guarantees that the filesystem is internally consistent, not that all data could be recovered
-
patanga
lw: thanks for the elaborate explanation
-
rwp
patanga, Additionally one of the kernel thread processes is the syncer thread which looks for modified cached pages (dirty pages) that are candidates for writing to disk. If a page is modified/dirty and IIRC aged more than 30 seconds then the syncer thread will queue those pages to be written to disk.
-
rwp
Meaning that if one writes a bunch of data and then let's the system idle for a while then in the background all of the modified pages will be written to disk.
-
rwp
At some point all queued work will be done and finished. At that point a power failure or a detach of the storage device won't have much outstanding and it is unlikely that any data would be lost or any serious corruption. fsck can fix everything.
-
rwp
But if the storage device is detached before all of these dirty blocks have been written then data loss is almost assured. And depending upon the file system the corruption might be large.
-
rwp
Gracefully unmounting will sync the data explicitly and wait for the pages to be written before detaching. Then it will mark the mount as being cleanly unmounted. If not marked as cleanly unmounted then the mount point will remain marked as dirty and will want an fsck before mounting again.
-
rwp
That description is a little fuzzy being off the top of the head. But the concepts are there. One should always unmount explicitly and allow it to sync queued data and mark it as cleanly unmounted.
-
mason
Next excitement, for some reason saying nvd0p1:/efi/freebsd/loader.efi failed. gpt/efiboot0:/efi/freebsd/loader.efi worked.
-
mason
(saying this to efibootmgr(8) that is)
-
rwp
It's a terrible thing but of my systems with UEFI firmware most of mine are buggy in various ways. Only my one laptop booting CoreBoot seems to work correctly for UEFI. The others all have problems.
-
mason
This one, despite presenting a couple funny tricks on install, appears to be booting successfully now that I've manually popped in a boot variable.
-
mason
I should write a patch though. This is a pretty common laptop, especially since they're now coming off corporate leases.
-
mason
I should write up a wiki page noting how to install, also.
-
rwp
My imperfect-by-a-lot understanding is that UEFI requires both the on disk files and the on motherboard non-volatile EFI VARS to be in sync. Which means that one can't just move a disk from one system to another and boot it because the new system won't have a matching EFI VAR to configure booting that disk.
-
rwp
Which is different from Legacy BIOS which would just boot the disk if it was moved into the system.
-
mason
rwp: Typically you can use the fallback naming and that'll work.
-
mason
Boot variables sometimes don't work at all - not common lately, but it's been the case - in which case the fallback naming is required. This is probably why FreeBSD opts for it.
-
rwp
I have a handful of HP z210 workstations and exactly one of them seems to work okay. But the rest have this UEFI bug that resets the efi vars after the boot. Meaning that after changing the efibootmgr settings it will boot once and once exactly and the second boot afterward will fail.
-
mason
The notion is that lacking a boot variable to direct what runs, the fallback file (\EFI\BOOT\BOOTX64.EFI) is tried
-
mason
Even your z210s ought to work with this. Of course, my ThinkPad T480 appears not to, which would make it the very first system I've seen fail this particular way.
-
rwp
This is mostly a problem if trying to multi-boot. That's basically impossible on this HP firmware. Requiring the fallback. Which means only one system can boot. Requiring a multiboot helper like rEFInd to boot.
-
mason
Yep.
-
mason
GRUB ends up being able to do this as well.
-
mason
-
VimDiesel
Title: MasonLoringBliss/BootingFreeBSDfromUEFIGRUB - FreeBSD Wiki
-
rwp
On my HP z210 firmware even trying to use the FreeBSD default installation with it as the single booting OS would not boot. This was 12 and 13. I haven't tried 14 on the problematic machines.
-
rwp
Instead I went ahead and installed them using Legacy BIOS booting. Which of course works and is well tested.
-
mason
rwp: I wonder if you hit the same thing I just did.
-
mason
Ah, yeah, that's probably simpler.
-
rwp
But at the time I was trying to exercise UEFI since that is the new path that all machines will have at some point.
-
mason
I'll make a note to write up install notes.
-
rwp
UEFI only requires this for regular booting storage. But it allows us to boot removable storage without corresponding efi vars. I have this fuzzy memory reading that someone suggested that we could configure internal storage to be removable and then on that system it could boot internal disks as if they were removable without corresponding efi vars. I have been wanting to try that.
-
rwp
Because if that worked then it would make UEFI more robust for booting systems. Then one could migrate disks from say a failed motherboard into another system and then boot the system without needing to boot rescue media and configuring the efi vars.
-
rwp
Life and time is what keeps everything from happening all at once. I haven't had time to work on it more. The systems are running now. Can't disrupt the running systems. I will need a new system to try this on at some point.
-
mason
rwp: Ah, removable storage, yeah. I believe the UEFI firmware looks for the fallback naming on whatever disk you select, in non-legacy boot mode where you choose a disk.
-
johnjaye
so i see pkg lists a lot of different types of emacs but i only see one emacs in ports tree
-
johnjaye
does that mean the different versions are made from having some parameters or config files or something like this?
-
nimaje
flavours, but there are only three full, canna and nox
-
patanga
rwp: thanks for your explanations! what i still somehow fail to grasp is "if the storage device is detached before all of these dirty blocks have been written ... the corruption might be large"; how could other data than the one still not written to the device be affected? will its metadata interfere with the metadata of the data written before safely?