-
polyex
what cmd lets me hash the contents of a file? i wanna manually compare local file contents match the file on a remote server
-
V_PauAmma_V
sha256, sha512, and their friends.
-
polyex
ty!
-
_xor
Good lord.
-
» _xor needs to take a breather
-
RhodiumToad
?
-
_xor
Writing a raw disk image to a drive. Need to do it with a live CD. Was looking for a generic Linux or BSD based live CD that's modern which I can re-use for future purposes.
-
_xor
Found Ventoy, got my USB drive prepared with it (and supposedly "supports" FreeBSD, but the build instructions were way more time than I was willing to invest, so I rebooted into Windows and installed it from there).
-
_xor
Copied the image (Home Assistant, which comes as a raw disk image apparently) to the drive, along with mfsBSD, mfsLinux, UBCD, TuxPE, and Lubuntu for good measure just in case.
-
_xor
Tried to boot TuxPE first, but it failed. Then said screw it and booted mfsBSD, which worked...but then I remembered that the partition on the USB drive is exFAT, and I didn't want to spend the extra time getting that installed in mfsBSD after it was live booted.
-
_xor
So I rebooted again, this time into Lubuntu since I figured there was a greater chance of Linux-land having a bunch of extra tools coming with the distribution (so wouldn't have to install), but turns out...that's not the case. But installing it was pretty easy so I'm thankful for that. I could have probably installed it using mfsBSD, but a lot of
-
_xor
customized BSD-based systems I've used tend to mess with pkg repos and I was getting annoyed as to how long this is taking.
-
_xor
So I'm now at the point where I'm looking at a boot live system of Lubuntu with exFAT mounting available (I think). Now I need to remember / figure out how to list USB drives, mount the exFAT partition, and then dd (or whatever tool) it to the system's hard drive.
-
_xor
dd the raw disk image on the USB drive to the local system hard drive I mean.
-
_xor
...though I wonder how well just using curl + dd to stream the image and write it to disk would work out.
-
_xor
Thoughts?
-
RhodiumToad
worth a try?
-
_xor
I know this isn't the case, but some strange (and illogical) reason my mind feels like that's not a good idea because I'm reminded of back in the 90s when CD writers needed a continuous stream from the buffer due to the fact that the optical write heads couldn't really stop and resume (the first generation hardware anyway).
-
_xor
Don't know why I'm associating it with that.
-
_xor
Hmm, blocksize on dd only matters for the target, right? Is there any kind of input buffer setting for it or would it have to be paired with mbuffer for that?
-
RhodiumToad
dd has three blocksize parameters
-
RhodiumToad
if the input is slow, you do have to be a little careful
-
RhodiumToad
what you probably want is dd obs=128k or similar
-
_xor
Ah that's right, I forgot about the other two.
-
RhodiumToad
note that using bs= is usually wrong when the input reads might come up short, since it'll try and pass through each input block
-
_xor
Hmm, interesting.
-
_xor
I was just looking into optimal bs values a couple of days ago. Had to write a 6gb image to a USB flash drive and wasn't sure whether I should omit bs or set it to 4m or 16m or something.
-
_xor
But that was from a USB3 source, so I wasn't really thinking about input throughput. Was more wondering about writes that would be ok while also not taking forever.
-
_xor
Is fuse included in GENERIC?
-
signalblue
Hey all, had a quick question about virtualizing FreeBSD on Hyper-V. The VM has two disks, one is the boot disk that is unencrypted and is where FreeBSD is installed and boots off of. This works great. However, the other disk is a 60GB disk that is mounted as a ZFS zpool within the OS and will contain email data since this is going to be a mail server. This disk is encrypted and any time I restart the server, and type my password to unencrypt
-
signalblue
it, I notice that the VHDX file size increases in Windows. Additionally, I wgetted a 40GB DD file from the Internet, and deleted it upon download. However, in Windows the VHDX is still showing up as a 42 GB file on my hard drive. Keep in mind that the upper max limit for the VM is a 60GB disk and so while FreeBSD shows it as 0% used, the actual disk on file (on physical drive) is still that 42GB. What should I do?
-
signalblue
sorry for the long wall of text :)
-
_xor
Check if the VHDX is sparse? (or whatever it's called in Hyper-V-land, can't remember anymore)
-
signalblue
it's thin allocated
-
signalblue
meaning not all 60GB is allocated all at once
-
signalblue
so when it hits 60GB, it won't grow any more
-
signalblue
I'd imagine that it would cause all kinds of issues when it happens
-
signalblue
because then I'd have a ZFS drive that is 40% full with emails, and new mail will bounce because the underlying virtual disk can't take it
-
signalblue
IDK if that makes sense?
-
RhodiumToad
hyper-v on what architecture?
-
signalblue
Windows 11 Pro x64
-
signalblue
you want the model of the CPU too?
-
RhodiumToad
no
-
signalblue
yep didn't think so
-
RhodiumToad
so what you're seeing is that the backing file size reflects the amount of non-erased data on the volume
-
RhodiumToad
I don't see why you think there is any issue here
-
signalblue
RhodiumToad: that's the amount of non-wiped data... ok that makes so much more sense
-
signalblue
thank you for your help :)
-
signalblue
so I'd be using the 'wipe' command to I guess write 0's over that data
-
signalblue
but that's not necessary I don't think as even though the backing file size becomes 60GB it won't prevent new writes I wouldn't imagine
-
polyex
trying to use py39-ansible pkg. so i type ansible-galaxy collection install ommunity.general and it says error importlib_resources is not installed and is required. any clue how to fix that?
-
polyex
on 13.2
-
_xor
Hmm
-
» _xor is confused
-
_xor
I booted mfsBSD and it shows tmpfs is mounted at /rw, but /rw doesn't exist.
-
_xor
`df -h` does I mean.
-
_xor
I was going to create a mem disk, but saw tmpfs was already created and it looks like it's sized to use remaining ram (which is fine). Going to copy an image into the disk.
-
» _xor wonders what the underlying differences are between mdfs and tmpfs (aside from the former using the latter as the backing storage, according to the man page)
-
signalblue
RhodiumToad: sorry to be annoying but if I download a 30GB file and then rm -rf it, it's normal for that gain in 30GB to not be reflected on the underlying virtual drive, yes?
-
ewwphoria
If you're looking to shrink the VHDX but it's encrypted, I don't think writing zeros would allow the hypervisor to shrink it.
-
ewwphoria
If it's encrypted, I don't believe the hypervisor would be able to identify any of the data is redundant, as it'll be using a block cipher.
-
ewwphoria
I'm guess VHDX just looks at what blocks get touched. If it can dynamically shrink from the hypervisor, I assume it'd look for contiguous regions of zeroes, but anything touched/written from the guest will appear to be just random data, whether replaced with 0s from the guest or not.
-
ewwphoria
There is likely no benefit to making a sparse file that backs an encrypted filesystem, since the hypervisor can't shrink it. I think it could only possibly worsen performance in such a case.
-
tyler82
Any idea why the guest does not get net on vm-bhyve if vm switch created and activated in ifconfig? No pf of ipfw or ipfilter applied.
-
mushbox
about the weechat version... the ports version was at 3.8 in january, but 13.2 release was made in april and the included ports is 3.7
-
mushbox
is that just part of how ports is maintained?
-
nimaje
ports has a main branch and every quarter a quarterly branch gets cut off; weechat 3.8 was committed to main in january, so q1 still had 3.7, no idea why q2 wasn't in there with freebsd 13.2 when it was in april (q2 should have weechat 3.8)
-
rtprio
what jail helper framework do the cool kids use these days?
-
got0
I play more and more with bastillebsd
-
rtprio
ok, thanks
-
got0
-
VimDiesel
Title: GitHub - illuria/jailer: Minimal, flexible, and easy-to-expand FreeBSD jail manager.
-
got0
but I didn't really tried them yet
-
got0
*try
-
meena
"Jailer is heavily under development and not yet ready for production use."
-
» gjn tunes in
-
angry_vincent
i think best approach is no jail manager at all. pure manual setup. numerous jailers is just a mess. hiding the very guts of what jailing is. well fast and handy, maybe automated but meh.
-
RhodiumToad
signalblue: deleting files does not, on most filesystems by default, do anything that would cause the underlying storage to be released (it'll just be reused as applicable).
-
RhodiumToad
signalblue: on backing stores that support TRIM, which may or may not be the case in your scenario, there's usually a way to cause freed space to be trimmed. for zfs this is via 'zpool trim' or the autotrim property.
-
mushbox
signalblue: from what i've seen before, you would need to zero the deleted space then use a VM tool that trims the image
-
RhodiumToad
depends if the hypervisor is supporting TRIM
-
mushbox
yeah, if it has the tool
-
RhodiumToad
no, I mean if it supports TRIM requests on the virtual block device
-
RhodiumToad
it's not a tool, it's a type of command to the disk
-
mushbox
well, i'm not qualified to talk about it, but you need to zero the data because otherwise it doesn't know what's in use or not
-
RhodiumToad
no you don't, that's the point of TRIM
-
RhodiumToad
it's a request from the filesystem layer that effectively means "I don't need this data anymore"
-
mushbox
the hypervisor would have to be specific to the file system
-
RhodiumToad
no
-
RhodiumToad
TRIM is a block device command
-
mushbox
how would it know what it could trim?
-
mushbox
changing the actual file size of the image
-
RhodiumToad
suppose you're using zfs with autotrim enabled,
-
RhodiumToad
then any time zfs knows that a given block is no longer needed, it issues a TRIM command to the underlying device
-
RhodiumToad
the hypervisor can, if it wants, detect that and do whatever it wants with it
-
mushbox
it's through a VM image though, the VM doesn't know anything specific about zfs
-
mushbox
so then it would have to know about the file system
-
RhodiumToad
it doesn't need to know about zfs or any file system, it only has to know about TRIM commands, which are filesystem-independent
-
mushbox
well how about this then
-
mushbox
if i have a .img file that's 16G, and i fill it full, then delete everything, and make a clone of it, the clone is 16G
-
mushbox
what allows the TRIM command without knowing about the file system
-
RhodiumToad
it's the file system which is responsible for issuing the TRIM command (if configured to do so)
-
RhodiumToad
TRIM is just a request to the underlying block device, just like READ or WRITE
-
mushbox
so either way then
-
mushbox
enable TRIM, or manually zero data
-
mushbox
and the hypervisor would have to support both or either
-
RhodiumToad
there's no reason why the hypervisor would check for zeroed data.
-
mushbox
only to do a 'manual trim'
-
mushbox
to resize the image
-
mushbox
i don't know, but i don't think the TRIM command is issued whenever anything gets deleted, for example
-
RhodiumToad
that depends on the filesystem and its configuration.
-
RhodiumToad
zfs has an autotrim property for zpools, which causes TRIM to be issued for blocks no longer needed
-
RhodiumToad
zfs also has a zpool trim command, which issues TRIM for all blocks not currently in use
-
RhodiumToad
ufs has a flag that sets whether TRIM is issued when deleting files
-
mushbox
all i'm saying is there is a reason the hypervisor would check for zerod data
-
RhodiumToad
no there isn't - it would be silly overhead given that TRIM exists
-
mushbox
not all filesystems use TRIM
-
RhodiumToad
given the increased use of SSDs and assorted flash media, pretty much any filesystem that anyone cares about has the option to use it
-
mushbox
well, hey, the ":" key centers the view
-
signalblue
RhodiumToad: Thank you once again for that
-
signalblue
basically I just didn't think this one through it looks like :)
-
RhodiumToad
signalblue: I also don't see any obvious indication whether the freebsd hyper-v disk driver supports trim.
-
signalblue
There's no need for TRIM in my environment as everything is running off of spinning disks
-
yuripv
diskinfo -v says Yes for TRIM/UNMAP
-
mushbox
my ":" comment is in reference to a chat from yesterday in #cataclysmdda, so i'm leaving the discussion
-
veg
greetings! I created a raidz2 pool with 8 disks displaying "512 bytes logical, 4096 bytes physical" sector size in smartctl, but I didn't set the ashift manually and it is now set to 0 for the pool. How can I make sure the 0 (autodetect) translates to 'ashift=12' in practice?
-
veg
(I already have data on the pool so I would love the ability to not have to recreate it)
-
ted-ious
veg: Did you zpool get yet?
-
veg
ted-ious: yes, I did, but it shows 0
-
veg
I just figured out to get the result of the autodetect through zdb though!
-
veg
and I'm relieved, for I see 'ashift=12' when doing `zdb -C`
-
ted-ious
That's a relief. :)
-
veg
yesss
-
mmlj4
from the docs, I've got ipnat.rules with map dc0 192.168.1.0/24 -> 0/32 portmap tcp/udp auto
-
mmlj4
I can't do outbound ping from a windows machine on the LAN
-
mmlj4
I have no firewall ruls in place yet... but how would I enable outbound ping? is icmp a valid target in the map statement?
-
skered
.vim
-
rtprio
re jails: is unionfs for /usr and stuff still the way to go or each with their own filesystem
-
RhodiumToad
afaik unionfs is still tagged "beware of dog"
-
parv
Is "Here be dragons" not in vogue no more?
-
RhodiumToad
bah, someone removed it from the text
-
RhodiumToad
it used to say this:
-
RhodiumToad
"THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK) AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM. USE AT YOUR OWN RISK. BEWARE OF DOG. SLIPPERY WHEN WET. BATTERIES NOT INCLUDED."
-
RhodiumToad
now it just ends after "OWN RISK."
-
parv
Ok, warning sign is still there
-
polyex
fbsd 13.2, latest pkgs, when trying to use py39-ansible pkg, i type `ansible-galaxy collection install community.general` and it says error importlib_resources is not installed and is required. there's a py39-importlib-resources pkg that i assume i need to install, but i never needed to in the past. is that expected?
-
RhodiumToad
I'm vaguely interested in where the issues are in unionfs, I could have a bash at fixing them
-
scoobybejesus
it's very unprofessional to be removing valuable contributions like that from the documentation :P
-
V_PauAmma_V
But then, everyone knows dogs aren't slippery when wet, they're smelly. :-)
-
polyex
i can't wait to get so high later
-
polyex
doing a half dozen reinstalls to 13.2 then celebration time my G's
-
polyex
k doing a fresh 13.2 install. trying to finish up but when i do pkg install pkg-provides it lists 2 pkgs, pcre and pkg-provides. i say `y` to continue and it fails. for both it says cached package missing or size mismatch
-
polyex
why it do that on fresh install?
-
RhodiumToad
does pkg update -f fix it?
-
polyex
ya it did
-
RhodiumToad
first rule of pkg seems to be "if anything weird happens, try pkg update -f"
-
polyex
:/
-
rtprio
RhodiumToad: nullfs maybe?