-
tm512
I'm gonna have to test it further, but it seems like setting compat.linuxkpi.semaphores=1 in /boot/loader.conf has maybe made an impact on the fault errors
-
tm512
I feel like this requires a pretty firm knocking on wood though, since several things so far have given the impression that the fault errors are fixed
-
rtprio
oh good
-
johnjaye
anybody know the answer to my earlier question of gstat vs camcontrol?
-
johnjaye
basically i added a sata, ide, and scsi drive to this vm but i'm not sure how to identify that in freebsd
-
johnjaye
i gave them different sizes so i can cheat though
-
rtprio
sata comes up as vtbd0
-
rwp
I prefer camcontrol because it identifies the device by model. If I want the serial number though I query the device with "smartctl -i /dev/...". There is also "geom -t" which is very useful after it has been partitioned.
-
rwp
Let's not forget diskinfo -cit /dev/... either.
-
rtprio
do virtual sata disks have a serial ?
-
johnjaye
i see
-
johnjaye
rtprio: that'
-
johnjaye
s part of the problem, vm's aren't exactly making it easy to identify the drive
-
johnjaye
it just says VIRTUAL DRIVE or QEMU DISK
-
tm512
bit weird how many dropped frames I get on youtube under firefox on FreeBSD, even with hardware accelerated decoding, while on my PC, using firefox on Linux, with a CPU from the same exact generation, I basically get a small fraction of this number despite using software decoding
-
rtprio
where are you trying to identify th drive? what's the vm guest?
-
rtprio
freebsd?
-
johnjaye
yes
-
tm512
like here I've got about 120 dropped out of about 6300 total frames
-
johnjaye
i realized i couldn't tell sata from ide or whatnot unless maybe it gave it a different device type
-
rtprio
and what vm host?
-
johnjaye
i use virtualbox on windows and libvirt on linux. linux in this case
-
rwp
I am looking at my vm and I cannot run smartctl on a virtual drive. diskinfo -v /dev/vtbd0 does not report any id information.
-
johnjaye
i couldn't either
-
rwp
Maybe it would be good to add the devices one at a time and then get them configured with a UUID so that the confusion is avoided. :-)
-
rtprio
johnjaye: do they not iterate in order?
-
johnjaye
sure. but i wanted to know the way to do it for real in freebsd
-
rwp
But you said they were different sizes. So you can tell them apart that way, right?
-
johnjaye
they do. in this case
-
johnjaye
well yes. but that's because i did that on purpose
-
johnjaye
i was trying to see if i could tell them apart based on the type of device
-
rwp
On bare metal systems which I assume is what is meant by "for real" then the devices do have models and serial numbers.
-
johnjaye
ah ok
-
rtprio
yep, they do.
-
johnjaye
as in the device id and vendor id too right
-
rtprio
$ sudo camcontrol devlist
-
rtprio
<WDC WD4005FZBX-00K5WB0 01.01A01> at scbus0 target 0 lun 0 (pass0,ada0)
-
tm512
seems picom is responsible for a lot of these frame drops. guess I shouldn't be surprised
-
johnjaye
what is ada vs da again?
-
rwp
johnjaye, Two examples:
bsd.to/06in/raw
-
VimDiesel
Title: 06in
-
rtprio
da is scsi, ada is sata
-
rwp
SATA controllers are adaX and SCSI controllers are daX.
-
johnjaye
is 'attachment' the type of controller?
-
rwp
Generally random desktop hardware will have SATA controllers and use ada names. Fancy systems with high performance SAS/SATA/SCSI and use da names.
-
johnjaye
ok. i think libvirt got that right because it made the scsi one da0
-
rwp
But... USB drives also use da names too. So... I wish USB controllers were different.
-
johnjaye
eh
-
johnjaye
ok
-
rwp
On my desktop when I plug in a USB SD card then I get /dev/da0 for it and my SATA disks are /dev/ada0 and /dev/ada1 so there is no confusing. But on my NAS with the SAS controller all of the disks have /dev/da0 through da5 names and plugging in a USB there results in a /dev/da6 name. And I am VERY careful about which is which.
-
rtprio
rwp: same: ada0 and ada1, ada4-7 ar the onboard controller here, and ada2,ada3 are the expansion card? for some reason?
-
rwp
rtprio, No idea. But they don't have names unless something is attached there, right? What are those?
-
rtprio
yes, i have 8 drives.
-
rwp
You have 8 drives so it makes sense you would have /dev/ada0 through ada7 then, right? What am I missing?
-
rtprio
that the expansion card is assigned ada2 and 3 rather than ada0,1 or ada 6,7
-
rwp
What does "sysctl kern.disks" say?
-
rtprio
kern.disks: ada6 ada5 ada4 ada0 ada7 ada1 ada3 ada2
-
rwp
That looks perfectly regular to me. Out of order, yes, but all of the devices are there. Those are the dynamically assigned kernel names anyway. Which is why UUIDs or gpt labels are recommended.
-
rtprio
i labeled the OS drives, but one label was lost
-
rwp
Very likely your motherboard is using two different SATA controllers, at the least. It would be good to check that all are 6Gbs as many motherboards might only have that for two of the ports.
-
rtprio
yes, it is, the onboard controller only has 6 ports
-
rwp
One of my motherboards has huge silk screen lettering 6Gbps SATA! but only two of the ports are 6 and the rest on that motherboard are 3.
-
rtprio
i don't recall seeing that
-
rtprio
i have " block size: 512B configured, 4096B native " also, which i expect is not doing me any favors either
-
rwp
For the SATA port speed the best I know is smartctl for example:
bsd.to/hVUe/raw
-
VimDiesel
Title: hVUe
-
rtprio
i'll be damned
bsd.to/7Bep
-
VimDiesel
Title: dpaste/7Bep (Plain Text)
-
rwp
And here is a 3Gbs here too:
bsd.to/JynG/raw
-
VimDiesel
Title: JynG
-
johnjaye
my motherboard is like that. half the sata ports are 6Gb the other 3Gb
-
johnjaye
why? no idea.
-
rwp
Honestly that is pretty typical vendor marketing. It's a buyer beware market.
-
rwp
And also honestly it must be fast enough because it wasn't stopping any of us from using it. Sorry to disillusion.
-
rtprio
'current' does that mean the drive supports 6 but the controller does not?
-
rwp
Yes.
-
rtprio
you can see which drives i've updated over time with that too
-
rwp
Yes. By the different SATA versions. However that is going to be fuzzy because it all depends upon vendor and such.
-
rtprio
they're all wd. the oldest drives sadly have 94500 hours
-
rwp
I have a couple of Hitachis that are past 100,000 hours!
-
rtprio
i'm impressed
-
rwp
I assume these are in a RAID configuration running zfs? If so then there is no concern even if one turns up failed. Just replace it when it does. Until then use it until it fails.
-
rtprio
2 os drives, mirrored. 6 raidz2. yep.
-
rtprio
at some point i need to buy a whole set of drives and migrate because i'm out of space and this sector size thing is annoying and can't be repaired
-
rwp
On 2022-10-18 I recorded this for one of the drives: "9 Power_On_Hours 0x0012 085 085 000 Old_age Always - 108935" that's 109k hours! One of the drives in that pair did start to throw an error last year.
-
rtprio
12.4 years. oof
-
rwp
A 1TB Deskstar. Those Hitachis were awesomely good.
-
rwp
The other one in the pair on that day was recorded at 102878 hours.
-
rwp
Oh, and it was the 102k hour drive that started to throw errors. The 109k drive is still going. I just don't have it plugged into anything at the moment. 1TB is so small now afterall. :-)
-
rtprio
yeah it is
-
rwp
To avoid the "slow" 3Gbps port problem I am using three different LSI SAS 2008 HBA cards running with IT Initiator Target firmware. Mine are Dell surplus. You can get them inexpensively surplus now. Those are SAS/SATA controllers and will provide 6Gbps to 8 ports using multiple aggregated PCI channel bandwidth. If you have a spare PCI-e slot then that's a good option for increasing disk I/O performance.
-
rtprio
i actually had a dell hba card in this, which freebsd casually dropped support for between 13 and 14
-
rtprio
twa i believe it was. that's what started my whole mess
-
rwp
That's so annoying when things are working and then support is dropped for it. I have been there many times and find it terribly frustrating.
-
rtprio
yeah, just a harmless buildworld/installworld and ... where's the pool
-
rwp
Oh that would be annoying. But you can boot to the previous boot environment and get back going again. But not able to upgrade. Drat!
-
rwp
I think I was able to buy each of these Dell LSI HBA adaptor cards for less than US$50 each at different times. It's a way forward.
-
rwp
And there are fancier cards for more dollars too.
-
rtprio
my other system has a mfi one and sas drives, using hardware raid since passthrough on that card seemed annoying
-
rwp
Note that these do get hot without airflow. I have ensured a fan for them in order to keep the temperature down. With a fan they are fine. Without they became so hot that I could not keep a finger on the heat sink.
-
RoyalYork__
When it comes to CVEs in packages, who is responsible to updating the package. The security team or the package manager?
-
kevans
port maintainer generally
-
andjjj23
remiliascarlet: tykling: yep, same zfs code used for linux and freebsd. but linux and freebsd are different kernels, so freebsd-only and linux-only zfs bugs are possible if they involve some kernel-specific interaction
-
andjjj23
someone (can't remember who offhand) was asserting that no one on freebsd had encountered the zfs encryption + snapshotting + zfs send issue, and there was speculation that it was all due to a linux kernel specific interaction of some kind
-
andjjj23
but i think that's been disproven
-
andjjj23
i mean, some freebsd users have seen the same problem right?
-
lw
andjjj23: yes, i'm having that exact problem right now on 14.0
-
mage
I'm sending unencrypted data snapshots to a remote encrypted dataset (trough zrepl) and I don't have any problem (13.2)
-
mage
(offsite backup)
-
knidos
5
-
lw
mage: the problem seems to be if the sending side is encrypted
-
remiliascarlet
andjjj23: I wonder what about the ZFS in OpenIndiana?
-
remiliascarlet
Or the one in the mother of ZFS, Sun Solaris?
-
mason
remiliascarlet: Pretty sure that's still Illumos-based and hasn't moved to OpenZFS.
-
mason
Or rather, the new definition of OpenZFS.
-
johnjaye
is openindiana reengineered all the code or is it just Sun's code?
-
mason
Sun's largely as I understand it.
-
johnjaye
ok. so kinda different to linux and the *bsds which reengineered all the original AT&T stuff over time
-
johnjaye
That's part of the unix history I didn't understand initially. That the CSRG rewrote the entire system
-
mason
Might be more accurate to say they zealously wrote so much that there wasn't a lot of AT&T left that mattered.
-
lw
CSRG didn't rewrite the entire system, they just released a non-functional OS called 4.4BSD-Lite which removed the remaining AT&T code but as a result didn't compile or boot
-
lw
386BSD and others rewrote the removed code to make it functional again
-
mason
That's the last chapter. CSRG did a ton before then.
-
lw
yeah, i mean at that point the vast majority of the code was probably CSRG, just not all of it
-
mason
Yeah.
-
lw
i wonder what BSD/OS was based off... did they have a UNIX source license to use the full 4.4BSD code? or did they start from 386BSD
-
lw
that was mostly ex-CSRG people, right
-
mason
They had tapes from AT&T.
-
mason
The legality of the arrangement was all very relaxed in the very early days.
-
mason
lw: If you haven't read it, you'd love Salus.
-
mason
There's a digital copy available on ... um. Forgetting the name. TUHS?
-
johnjaye
mason: hmm, that's an interesting way to look at it. so if i join your open source project and write 10x as much code as you have... now it's my project?
-
lw
-
VimDiesel
Title: publications:quarter_century_of_unix [Unix Heritage Wiki]
-
mason
johnjaye: Licensing isn't done on the project level.
-
remiliascarlet
mason: Forked from OpenSolaris's last (and half broken) release, and continued work more or less independently from there on.
-
mason
lw: That's the one. I'd recommend a paper copy if you can get one, but that works.
-
lw
mason: i'll have a look, ty
-
lw
i started using BSD around 1996 so i just missed a lot of this earlier stuff (and wasn't really paying attention at the time)
-
johnjaye
mason: i'm not saying you're wrong. it's an interesting idea
-
remiliascarlet
I started using Linux in the early 1990s, and only recently discovered BSD.
-
mason
johnjaye: Not even an idea so much as a description of what happened.
-
dstolfa
lw: Kirk McKusick and Michael Karels have given talks at BSD confs that were recorded about a lot of the history
-
mason
There's a good textual example at the beginning of D&I.
-
lw
i lost my copy of D&I :-( probably time to replace it with the new freebsd edition anyway
-
remiliascarlet
Well, I know FreeBSD existed much earlier on, but I thought "FreeBSD runs Gnome, and so does Debian, so what's even the difference?" at that time. But I recently found out that in order to appreciate FreeBSD and OpenBSD, you need to use it for at least a while, and now I love both of them more than Linux.
-
lw
lost my two volumes of UNP and TAOCP at the same time, that was annoying, they're all a bit dated but still useful references
-
johnjaye
the TLAs are getting a bit heavy. what's UNP?
-
lw
johnjaye: "UNIX Network Programming", a popular book on writing network applications for Unix
-
aquamo4k
Richard Stevens' books, yes.
-
CrtxReavr
What happened to to "TCP/IP Illustrated?"
-
mason
Stevens passed I think.,
-
mason
-
VimDiesel
Title: W. Richard Stevens - Wikipedia
-
mason
So he's not writing more.
-
lw
mason: yes, i believe someone else updated the books for a new edition a few years back though
-
mason
Ah, I'd missed that.
-
aquamo4k
yes, RIP Richard Stevens. I have I think all his editions.
-
aquamo4k
-
aquamo4k
all those books helped with my early career. the magic garden books were useful when working on SGI/MIPS/IRIX.
-
paulf
There were 2 new editions of APUE with Seven Rago (?) writing the updates - Pearson has the copyright.
-
paulf
Steven Rago
-
aquamo4k
Another great early Linux book is "Operating Systems - Design and Impl" by Andrew S. Tannenbaum
-
paulf
OK it's Stepehen
-
aquamo4k
I got my copy when I bought Minix for ATART ST. Took all weekend to build Minux from source on an ATARI but was super fun.
-
aquamo4k
Tannenbaum is Minix oops, not Linux but Linus used that book too IIRC
-
lw
am i missing something incredibly obvious here? /dev/md0s2 exists, but mount says no such file or directory...
le-fay.org/tmp/30d/M026Wo.txt
-
lw
oh, it's md0s2a, stupid BSD labels
-
lw
weird error though as md0s2 clearly does exist
-
lw
-
VimDiesel
Title: 277264 – mount(8)ing incorrect device gives confusing ENOENT
-
lw
am i missing something or is there no way to tell wireguard what address to listen / bind on?
-
rtprio
it can be any address you want, as long as the one you want is *
-
lw
yeah, might go back to IPsec if this isn't supported...
-
lw
or, considerig all my traffic should be encrypted anyway, maybe i'll just stop using a vpn and run over ipv6
-
kevans
right, you get just the port at best
-
nimaje
why would you not use ipv6 over that vpn?
-
lw
nimaje: i am using ipv6 over the vpn?
-
lw
nimaje: what i'm considering is to just not use a vpn at all and use ipv6 directly between the two hosts
-
lw
because all the traffic is over tls or ssh anyway, so... what's the vpn really giving me in terms of security
-
nimaje
ok, that 'maybe i'll just stop using a vpn and run over ipv6' read like it was a choise between vpn and ipv6
-
lw
oh, no
-
lw
the choice is vpn-over-ipv6 + ipv6-over-vpn vs just ipv6-over-internet
-
lw
i think i set up these vpns initially because a) ipv4 brain (everything goes over vpn) and b) it means everything can have an address in my local /48, but neither of those are really valid reasons
-
spmzt
Hi, I have a jail inside a zfs dataset. think of it as tank/jails/jail01 and I want my jail to be able to manage its own dataset, for example create dataset under its dataset like tank/jails/jail01/test. the zfs device has been unhided with devfs.rules, and all of the allow.mount, allow.mount.zfs parameters are have been set. However my jail can't create a dataset under its own. I read the jailed property
-
spmzt
of the zfs. But when I want to set it, it need to remount the dataset and obviously it is not possible when the jail is alive. even before starting the jail, you can not use the jailed property because the it will be hide from the host point of view and you can not start the jail because the root directory of it is not mounted.
-
spmzt
s/it need/it needs/g s/because the it/because it/g
-
jbo
lw, I need a C++ library that does utf-8 which comes with algorithms such as starts_with(), ends_with(), substring(), replace(), count_occurrences() and that sort of thing. Ideally with conversion to/from other encodings but that is optional. Any recommendations?
-
jbo
lw, I was looking at
github.com/tzlaine/text but...
-
VimDiesel
Title: GitHub - tzlaine/text: What a c++ standard Unicode library might look like.
-
lw
jbo: i don't know, i was in the middle of writing my own but got distracted. there was a reference implementation of std::text i came across once but i could never find it again
-
jbo
:<
-
Remilia
spmzt: pretty sure jailed=on should be set before starting the jail
-
Remilia
or before attaching the dataset to it
-
Remilia
you will probably need to add `zfs jail ....` to exec.poststart
-
lw
i've never had any luck delegating zfs to a jail - even if you get the jail to start, it hangs on shutdown because it doesn't unmount the filesystems properly (zfs unmount rc script is disabled for jails)
-
lw
would be very interested if anyone got that working, even though i've mostly migrated to bhyve now
-
Remilia
use exec.*stop
-
Remilia
I had no issues running poudriere in a jail with ZFS
-
Remilia
and poudriere loves managing dataset
-
lw
Remilia: what do you put in exec.stop?
-
Remilia
you can use zfs.unjail
-
Remilia
er
-
lw
does that unmount the filesystems?
-
Remilia
`zfs unjail` obviously
-
Remilia
lw: I forgot since poudriere unmounts everything after a run
-
Remilia
so maybe I never considered that myself
-
debdrup
It'd be pretty annoying if it didn't clean up after itself.
-
Remilia
but if you are *attaching* a dataset you do not need to unmount it
-
lw
ah yeah. i wanted to run an app that just had a filesystem and some children
-
Remilia
you need to detach it
-
lw
'detach'?
-
Remilia
zfs unjail
-
lw
so unjail unmounts the filesystems?
-
Remilia
it detaches the dataset from the jail
-
lw
but does it unmount the filesystems? the problem i had is the jail was stuck in dying state because the zfs filesystems were still mounted
-
lw
as soon as i manually unmounted them, the jail would stop
-
Remilia
if you are mounting them manually, unmount them in jail.stop
-
lw
i was not mounting them manually, the jail did that from rc.d
-
Remilia
I think we had very different scenarios
-
Remilia
and right now it is way too late for me to start experimenting with this, maybe I will try tomorrow
-
lw
loooking at /etc/rc.d/zfs, it seems like this is *meant* to work, there is specific support for unmounting filesystems in jail
-
lw
well, i don't use jails anymore, but maybe i'll have another poke at it one day
-
Remilia
I am guessing in my case it just called rc.d/zfs
-
spmzt_
Remilia: you can't set it before starting the jail. check this:
bsd.to/1V2c
-
VimDiesel
Title: dpaste/1V2c (Bash)
-
debdrup
Yea, zfs jail and unjail needs to be done exec.poststart and exec.prestop respectively.