Skip to content

Instantly share code, notes, and snippets.

An interesting issue came up. I noticed a few days ago that there was some data that had 1/1 even though the options are set to min 1 but desired 2. I tried bcachefs data rereplicate but that did not seem to change anything. Upon trying to boot the system and mount the FS, it seems to be failing because that replica isn't present? Not sure why since all disks are present.

I guess there are 2 potential things going on: 1 rereplicate is not replicating all data to match desired options, and fsck fails if there are missing replicas (I think this is expected).

~ sudo bcachefs fsck -k /dev/nvme0n1
Running in-kernel offline fsck
bcachefs (27cac550-3836-765c-d107-51d27ab4a6e1): starting version 1.28: inode_has_case_insensitive opts=metadata_replicas=2,data_replicas=2,background_compression=zstd:15,foreground_target=cache.nvme1,background_target=hdd,promote_target=cache,degraded=yes,fsck,fix_errors=ask,noratelimit_errors,read_only
@ProjectInitiative
ProjectInitiative / dmesg.md
Last active May 14, 2025 18:16
Mounted fsck for home directory

Kernel: Linux thinkpad 6.14.5 #1-NixOS SMP PREEMPT_DYNAMIC Fri May 2 06:02:16 UTC 2025 x86_64 GNU/Linux bcachefs version v1.25.2 (but when it runs, it finds extents with 1.20, even though I formatted with 1.25.2 tool chain)

Got asked multiple times for (y,n, or Y,N for all errors of this type) Y => captial Y didn't seem to be working? I got asked for each occurance after. I have two volumes, a home directory and an extra data volume. Both use snapshots. dm-3 is home directory and dm-4 is the extra volume.

When booting (boot failed even with "fsck" as a mount option)

Bcachefs Read FUA Test Results - 2025-03-26 18:28:31.403309
==================================================
Filesystem UUID: 27cac550-3836-765c-d107-51d27ab4a6e1
--------------------------------------------------
Device 0:
Device: nvme0n1
Model: TEAM TM8FPD002T
Serial: TPBF2310170080202273
@ProjectInitiative
ProjectInitiative / init.vim
Created July 21, 2022 19:41
my personal nvim configuration as it matures and grows
syntax enable
filetype plugin indent on
call plug#begin(stdpath("data") . '/plugged')
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" - Vim (Windows): '~/vimfiles/plugged'
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
" You can specify a custom plugin directory by passing it as the argument
" - e.g. `call plug#begin('~/.vim/plugged')`
@ProjectInitiative
ProjectInitiative / hookscript-pci.py
Last active May 23, 2022 02:09
A proxmox hookscript for prepping and validation of bound vfio-pci drivers for PCI devices before starting and stopping a VM with physical hardware passthrough.
#!/usr/bin/env python3
#Copyright 2022 Kyle Petryszak
# Exmple hook script for PVE guests (hookscript config option)
# You can set this via pct/qm with
# pct set <vmid> -hookscript <volume-id>
# qm set <vmid> -hookscript <volume-id>
# where <volume-id> has to be an executable file in the snippets folder
# of any storage with directories e.g.:
# qm set 100 -hookscript local:snippets/hookscript-pci.py
@ProjectInitiative
ProjectInitiative / authorized_keys
Last active April 29, 2022 19:25
authorized hosts file
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJG0c+1iYwH1EzaXzqPop37J8jo9WIh0S1pcOWsyGmwyJXLShdZF2jIkLt/Yi/T2zDVk/5fTXDT0INC0A23pjoX68PuEJ86qsXkneTlhAcmTbpvq5ItqgZVAs01Z8buW9vxmKeFk+nQxRkxKko3OdEqqY+oebFeJcLAwrmBb2ds0xFCrHq2C5IqxDXXpAIr1apBkdFUdgoaTcY0gSPKEls4mIkLozP38CRJsq2cBU38aj8gzkNa+dHJF1w9NE/ZGn45W/g6piZyPePqW5wGbmXF+nNf0suUFfcM4+Iy+65NwIh1NLs+g6lfd60OMxuKwIdEiOQLs9G2mLEy+SdSuo8Wz5Jrb1DIEFifj1FJLM0AHc+rHirR0ln00zJ+nxGVZjIZ/ti5Mv/5nUs6mce4gruN9vz9dVJ18YyoEr/qyQ6dLlFyoQx/B5gMbMBivKpfE3x4nFCslJDBTA2MRegNonkSoW6UVVGsyf6nhZjkQPNrVvQjD2WENAIixhRM5nJ2jsUm8DQRstu+d52cbHcpMlxTXWRv2DrYqoCDVPYlbXTVQlJICX5wm7eG15t05Ua1WgF4hysrUXSG0GNWyi8JriWXh+s9Wdi9rK2Fa7w2EoxEGinvpU52UDrZvU4W5CRL8CctA3M6MNeJPZgXB2xf6Kj12lh3ZDyxr/pUD23Vb8TLw== Laptop
[email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIAeMkECdnArd2N0oS0XCKer/QZShgfHXP9EnuY8bMHfAAAAABHNzaDo= pop-os-15-04-2022-yubikey1
[email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIKdfvwr21MLkp463z6p9gaCrwMamZaUhsPPztUrcX19xAAAABHNzaDo= pop-os-20
@ProjectInitiative
ProjectInitiative / .all-the-useful-tech-things.md
Last active April 29, 2021 15:57
Gist containing useful information and links to fixes and such.

This Gist is a hodgepodge of documentation and information I don't want to lose in the future

@ProjectInitiative
ProjectInitiative / SafeQueue.hpp
Last active December 11, 2020 04:49
A very useful C++ thread safe queue found here: https://stackoverflow.com/a/16075550
#ifndef SAFE_QUEUE
#define SAFE_QUEUE
#include <queue>
#include <mutex>
#include <condition_variable>
// A threadsafe-queue.
template <class T>
class SafeQueue
@ProjectInitiative
ProjectInitiative / full-registration.py
Created September 22, 2020 01:12
Two examples of GUI login screens with Python 3 and Tkinter
#!/usr/bin/env python3
'''
The following link is where the majoity of the code is pulled from:
https://www.simplifiedpython.net/python-gui-login/
'''
from tkinter import *
import os
@ProjectInitiative
ProjectInitiative / manually-installed.sh
Created January 27, 2020 04:35
Returns all of the manually installed programs on a Linux system.
#!/usr/bin/env bash
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)