-
weust
with Boot Environments being cloned during a freebsd-update, am I right I should want the last created clone to be Active? Because right now my Active (default) is from mid-2020 whlie the newest is of today
-
weust
Using zfs destroy -nrv on each clone shows there is nothing in them, even though there is space alocated, up to 962M
-
CmdLnKid
weust, you realize -n is a no-op though right ?
-
weust
CmdLnKid: yes, I was following this:
dan.langille.org/2021/04/15/deleting-old-freebsd-boot-environments which mentions a dry-run using -n.
-
VimDiesel
Title: Deleting old FreeBSD boot environments – Dan Langille's Other Diary
-
jwmaag
weust: I'm pretty sure it makes changes to the current dataset/BE and creates those snapshots as a means to get back before the changes
-
jwmaag
having to call bectl activate after every call to freebsd-update would be annoying
-
CmdLnKid
still on root with ufs here. commonly writable areas for me are mounted via a dataset from a seperate disk
-
CmdLnKid
no bectl here. no need for it tho it would be nice for critical servers
-
CmdLnKid
i find ufs easier to recover
-
CmdLnKid
tho i can't think of one time in the last 10 years ive had to do so
-
weust
OK, but is there some kind of rotation where it cleans up after x amount or something? Because only adding and taking up space doesn't sound too good either.
-
weust
I feel a guide on this and how to deal with it is missing, at least I can't find it. Only on how to remove them.
-
CmdLnKid
that space can free when its needed. if you need confirmation of space removal "reboot" itll come up clean after
-
CmdLnKid
a couple sync calls or a zpool scrup may do it as well
-
CmdLnKid
if it doesn't then i would say there still has to be something there somewhere
-
rtprio
weust: do you have old snapshots taking up space?
-
weust
Let me paste that on pastebin. one sec
-
CmdLnKid
inspect zfs list -t snap
-
weust
-
VimDiesel
Title: dpaste/BZLg (Plain Text)
-
weust
-
VimDiesel
Title: dpaste/iWs1 (Plain Text)
-
weust
same output, kinda
-
weust
nvm de icinga setup of course
-
CmdLnKid
so you do have snapshots sitting around
-
CmdLnKid
that would be your goal
-
CmdLnKid
just remove em and youll see a diff results
-
CmdLnKid
they look like automated snapshots
-
weust
They are automated. Created during a freebsd-update
-
CmdLnKid
962M was approximately what you were seeing un'freed
-
weust
So that is wasted space right now, or not?
-
CmdLnKid
the BE was claiming zero because it was removing exactly what it was in control of
-
CmdLnKid
not if you zfs destroy zroot/ROOT/default@2022-10-29-17:42:28-0
-
CmdLnKid
etc... etc...
-
weust
but without using -R it will shows that it cannot destroy the snapshot: snapshot has dependent clones
-
CmdLnKid
is it listed in bectl list -a ?
-
CmdLnKid
if it is destroy it there
-
jwmaag
weust: its only "wasted" if you never intend on going back
-
CmdLnKid
@channel isn't there a bectl maintenance facility in ports ? maybe included ?
-
weust
In my first pastebin link I would say so? zfs list -t snapshot -o name,clones -r zroot/ROOT shows this too
-
jwmaag
bectl destroy can remove the environments and the snapshot
-
weust
-
VimDiesel
Title: dpaste/zdt6 (Plain Text)
-
weust
ah ok
-
CmdLnKid
yeah
-
weust
So, to destroy the oldest I would do: bectl destroy -o 13.1-RELEASE-p2_2023-03-16_201934
-
CmdLnKid
personally i prefer creating snapshots in unix time and calculating ... "is older than" and automatically removing them
-
CmdLnKid
if a systems been running for 14 days then i don't need any older snapshots
-
weust
blame that on the one that build that into freebsd-update ;-)
-
jwmaag
i'm not even sure if you need the -o but sure
-
weust
the -o comes from the website I mentioned earlier
-
CmdLnKid
weust, pretty sure that behavior cam from opensolaris bectl
-
CmdLnKid
we followed
-
jwmaag
you mean beadm
-
weust
aah
-
CmdLnKid
yes
-
weust
-
VimDiesel
Title: Deleting old FreeBSD boot environments – Dan Langille's Other Diary
-
weust
But, I know my server boots fine, so I can destroy all except default, right?
-
CmdLnKid
right
-
weust
or perhaps leave the last one from today
-
CmdLnKid
you can do that too
-
CmdLnKid
unless you are dying for space ...
-
CmdLnKid
that in itself is really uncommon these days
-
weust
Home server. zroot has 22G in use of 185G. space it not an issue.
-
weust
Like I said, I am missing som documentation on how to handle this. It's cool that it's done, but only taking up space isn't imo.
-
weust
assuming freeb
-
weust
assuming freebsd-update doesn't handle it itself, which I doubt it does atm.
-
yuripv
it doesn't and it shouldn't
-
CmdLnKid
no thats not up to that utility
-
CmdLnKid
in a bsd way of thinking that would be hazordous
-
CmdLnKid
unless you feel like creating something that creates a record of previous recorded snapshots
-
CmdLnKid
but specifically thats for backup tools
-
weust
OK. Then I am missing a part in the documentation that mentions what to do after an upgrade. maintenance thing. at least to check it out, etc.
-
CmdLnKid
that might be a worthwhile contribution to the documentation
-
weust
anyway, I will write it down in my own notes
-
CmdLnKid
when you ... freebsd-update --- keep in mind this is what happens and you may want to remove them
-
weust
awareness would be the better term, perhaps. know it's being done, know space is being used.
-
weust
yes
-
weust
now it just tells you to do a install after a upgrade/fetch, reboot and run install again. that's it.
-
CmdLnKid
haven't read the man pages in depth so those should definately be considered
-
CmdLnKid
see also sections may be needed
-
CmdLnKid
or examples
-
weust
yeah. right now man freebsd-update doesn't mention it at all.
-
CmdLnKid
pin the contributors with committers lines in git/svn [blame]
-
weust
I did read in
forums.freebsd.org/threads/zfs-how-…snapshots-and-not-damage-data.85436 that you can set an option in freebsd-update.conf. CreateBootEnv no" to precent automatic creation of boot environments.
-
VimDiesel
Title: ZFS: How to properly remove unnecessary snapshots and not damage data? | The FreeBSD Forums
-
CmdLnKid
"with suggestions"
-
weust
will do
-
CmdLnKid
ooooh that thread
-
CmdLnKid
sheeesh
-
weust
hehe
-
CmdLnKid
no dougbt you are using zfs on root FFS
-
CmdLnKid
best laugh ive had today
-
weust
well, I did mention that several times? my pastebins showed it.
-
CmdLnKid
lol yeah assumptions... seem to be a problem there
-
CmdLnKid
gotta verify
-
weust
Only my OPNsense on my thin client is running UFS atm. The new OPNsense server is running ZFS as well. should swap them this weekend.
-
» CmdLnKid high fives weust for opnsense
-
CmdLnKid
rather than pfsense
-
weust
Been using that since very early 2015
-
weust
yeah, was fed up with the forums there. very toxic because of a certain individual. went to OPNsense it was nice and relaxed. happy ever since.
-
CmdLnKid
yeah used to be involved with a pro php dev, he at one point pointed out all the problems with pfsense and said he'd rather be running opnsense
-
CmdLnKid
that was my changing point
-
CmdLnKid
i use both now as pfsense being my backup firewall in the most basic sense if there is a problem not fixed as fast as it probably should be ill fall back on pfsense until its fixed
-
CmdLnKid
eggs ==> baskets and all that BS
-
weust
both work fine for what they do. but knowing the history on why opnsense was made and the crap they got, which was insane, I stay away from pfsense for that reason.
-
CmdLnKid
yep
-
CmdLnKid
just shows what a corp influence can have on a project
-
weust
yeah, but also especially that one person. and some fanboy on twitter at the time. that guy was nuts.
-
weust
his bio mentioned he was there to disprove anything opnsense did. anything.
-
CmdLnKid
ignorance is bliss
-
weust
yup
-
weust
need to head out. thanks for the help once again, everyone.
-
CmdLnKid
have a good one man
-
polyex
are jails only for daemons or can we put a single command in a jail that we want to run more locked down?
-
dkeav
yes
-
polyex
?
-
dkeav
you can do both
-
polyex
ty!
-
debdrup
they sometimes get called service jails if they're just for a single command
-
debdrup
typically you'd want to build something statically, so that there's only a single file in the jails filesystem that needs to be run without any sort of dynamic libraries
-
polyex
why call it a service jail when it's not persistent like a daemon is? isn't daemon synonymous with service on other OS's?
-
kevans
it's as persistent as the command (perhaps a daemon) it's running
-
RhodiumToad
fair amount of stuff doesn't work well with static linking
-
RhodiumToad
kevans: who can I interest in my automount bug, which I would argue has at least mild security implications (but not enough that I made it private)
-
RhodiumToad
#272446 / D40961
-
RhodiumToad
(the security impact is that it arbitrarily turns off important flags like "readonly", "nosuid", "noexec")
-
kevans
hmm
-
kevans
trasz would also have been a good candidate, but I think he's been largely not around as of late-ish
-
otis
yeah, almost all commits were by trasz, one by rew
-
debdrup
polyex: no idea of the etymology, just giving something to use as a keyword
-
debdrup
kevans: yeah the last time i heard from trasz was when he released me from my mentorship
-
meena
Linux uses /proc/<pid>/environ to get the a process Environment. How can we do that on FreeBSD?
-
RhodiumToad
procstat has an option for it, but iirc it relies on the process not having clobbered it
-
rtprio
Mem: 2502M Active, 53M Inact, 1491M Wired, 955M Buf, 277G Free
-
rtprio
what a satisfying upgrade
-
meena
RhodiumToad: cool, thank you
-
otis
meena: i even introduced "penv", "pargs" and "pwdx" shortcuts
-
otis
all in /usr/bin
-
meena
otis: how long have we had --libxo in procstat?
-
otis
meena: since 2015
-
meena
cool
-
polyex
libxo is so cool
-
polyex
to run a command in a service jail we use jexec right?
-
nimaje
you could also have it defined in jails.conf
-
polyex
the base jails that reuse userland, are they reusing the host userland or a jail's userland?