I was getting messages like this from sanoid: I was sure it was related to my recent zfs clone when I was I broke my FreeBSD MySQL jail; got it working again by using a snapshot This is the raw set of commands I ran, presented without commentary.
snapshots
I broke my FreeBSD MySQL jail; got it working again by using a snapshot
I was upgrading a host the other day. The mysql02 (that’s the hostname) jail broke. I suspect I did something like upgrading the package while the server was in use. I noticed LibreNMS wasn’t running: *** /var/log/librenms/librenms-service.log *** Feb 10 18:37:30 besser librenms[23957]: MainThread(CRITICAL):ERROR: Could not connect to MySQL database! (2003, “Can’t connect to MySQL server on ‘mysql02.int.unixathome.org’ ([Errno 61] Connection refused)”) Feb 10 18:37:30 besser librenms[23957]: (2003, “Can’t connect to MySQL server
I broke my FreeBSD MySQL jail; got it working again by using a snapshot Read More »
Copying everything off a zpool, destroying it, creating a new one, and copying everything back
I have a problem with a zpool. To be clear, this really isn’t a problem. I’m not aware of any I/O throttling etc. It is just something I would like to change. zpzpoo% [18:26 r720-02 dvl ~] % zpool status data01 pool: data01 state: ONLINE status: One or more devices are configured to use a non-native block size. Expect reduced performance. action: Replace affected devices with devices that support the configured block size,
Creating the new zpools
I have 4 new storage devices to create 2 new zpools, each a two-vdev mirror. Let’s go. In this post: FreeBSD 14.3 These are the drives I have. As an Amazon Associate I earn from qualifying purchases. The 4TB NVMe cards are Samsung 990 EVO Plus SSD 4TB, PCIe Gen 4×4 | Gen 5×2 M.2 The 4TB SSDs are SAMSUNG 870 EVO 4TB 2.5 Inch SATA III Internal SSD (MZ-77E4T0B/AM) The new data02
Creating the new zpools Read More »
Way too many snapshots
In this post In this post, we have: FreeBSD 14.1-RELEASE-p5 r730-03 Lots of boring repetitive sections, so skip over that to find what you need This article was written over a couple of days. The zpool in question is 3 pairs of 12TB HDD: [13:44 r730-03 dvl ~/tmp] % zpool status data01 pool: data01 state: ONLINE scan: scrub in progress since Fri Jan 17 05:29:21 2025 22.1T / 26.1T scanned at 200M/s, 19.2T
Way too many snapshots Read More »
The backup disk image … sparsebundle could not be accessed (error 19)
I wrote this back when and left it in drafts. Time to publishh. I was getting this message when one of my MacBooks was trying to back via TimeMachine to my FreeBSD ZFS server. “The backup disk image … sparsebundle could not be accessed (error 19)” imeMachine also told me the last backup was on Oct 7. Checking my snapshots: [20:01 r730-03 dvl ~] % zfs list -r -t snapshot data01/timemachine/dvl-air01 NAME USED
The backup disk image … sparsebundle could not be accessed (error 19) Read More »
Loading up an old copy of a PostgreSQL database, zfs snapshots, and sanoid snapshot management
Sometimes you want to go back to a known good state. And you want to do it quickly, without waiting around. In my case, that’s going to be a zfs snapshot. Today I am preparing to test some code changes so that FreshPorts properly creates a new category. See these recent blog posts for details: Welcome to the new category: filesystems Fixing the category creation code In this post: FreeBSD 14.1-RELEASE-p5 postgresql16-server-16.4 dbclone
zfs hold / release
Let’s talk about zfs hold. Based on man zfs-hold: “If a hold exists on a snapshot, attempts to destroy that snapshot by using the zfs destroy command return EBUSY.” Let’s apply that to some FreshPorts snapshots which I don’t want going away: This is your typical FreshPorts website: [15:03 dvl-nginx01 dvl ~] % zfs list NAME USED AVAIL REFER MOUNTPOINT data02 1.13T 565G 96K none data02/freshports 671G 565G 88K none data02/freshports/jailed 326G 565G
zfs hold / release Read More »
Backing up FreeBSD with Bacula via ZFS snapshot
Tonight, while watching an episode of The Great British Bake Off, I configured a new Bacula backup jobs to cover some datasets which were not already backed up. I already have a backup jobs to backup all the jails, but only for datasets which sit right under zroot/jails (for example). This new solution takes a list of datasets, snapshots them, backs them up, then destroys those snapshots. Why backup a snapshot? Consistency. During
Backing up FreeBSD with Bacula via ZFS snapshot Read More »
Bacula – calculating Maximum Volume Bytes and Maximum Volumes based on historical data
I’ve used Bacula since at least January 2004 (so nearly 20 years). I liked it so much I dropped my deployment-in-motion of another tool (if you search lightly, you can find out which one). I liked it so much, I wrote a PostgreSQL backend for it. This post is not for Bacula novices. This post is for those who have already deployed a Bacula instance and are rather familiar with the process. I
Bacula – calculating Maximum Volume Bytes and Maximum Volumes based on historical data Read More »