diff --git a/active/software_btrfs/btrfs.md b/active/software_btrfs/btrfs.md index 200b564..ebc80b5 100644 --- a/active/software_btrfs/btrfs.md +++ b/active/software_btrfs/btrfs.md @@ -13,6 +13,7 @@ - [Monitoring Disk Health](#monitoring-disk-health) - [Defragmenting and Compressing](#defragmenting-and-compressing) - [Converting ext4 to btrfs](#converting-ext4-to-btrfs) + - [Error Kata](#error-kata) Oracle [has decent docs here](https://docs.oracle.com/en/operating-systems/oracle-linux/8/btrfs/btrfs-ResizingaBtrfsFileSystem.html) @@ -209,4 +210,27 @@ btrfs filesystem defragment -c zstd:20 /btrfs/pool0 # Unmount and then run btrfs-convert umount /path/to/mount btrfs-convert /dev/sdX1 -``` \ No newline at end of file +``` + +## Error Kata + +After unplanned shutdowns, power loss, physically moving the server, or whenever +you feel like it, it's generally a good idea to scrub your btrfs pools for +errors and check your device stats. + +```bash +export POOL=pool1 +# Find any device stat with a number > 0 +# This means there's an error +btrfs device stats /btrfs/${POOL} | grep -vE ' 0$' + +# If you find an error, grab the smartctl details to check for disk error +# Scrub the btrfs pool to check for other hidden errors +lsblk -fs +smartctl -a /dev/ +btrfs scrub start -Bd /btrfs/pool0 +btrfs scrub status /btrfs/${POOL} + +# Check the filesystem status after a scrub +btrfs filesystem show /btrfs/${POOL} +``` diff --git a/active/software_selinux/selinux.md b/active/software_selinux/selinux.md index c272a16..16f4cb7 100644 --- a/active/software_selinux/selinux.md +++ b/active/software_selinux/selinux.md @@ -129,6 +129,10 @@ sudo semodule -l # Remove an active policy sudo semodule -r clamav-notifysend + +# Set a file type to allow systemd execute +semanage fcontext -a -t bin_t /root/.local/share +chcon -Rv -u system_u -t bin_t /root/.local/share ``` ### Showing Dontaudit Rules diff --git a/active/vibe_system_report/agent_report.py b/active/vibe_system_report/agent_report.py index 06a33e7..6926275 100644 --- a/active/vibe_system_report/agent_report.py +++ b/active/vibe_system_report/agent_report.py @@ -215,7 +215,7 @@ def load_ses_creds() -> AWS_SES_DOTENV: raw_values = dotenv_values(ses_dotenv_location) if raw_values: aws_ses_config = cast(AWS_SES_DOTENV, raw_values) - print(f"AWS SES Credentials loaded: {aws_ses_config}") + # print(f"AWS SES Credentials loaded: {aws_ses_config}") return aws_ses_config print("No email credentials supplied. Exiting.") exit(1) @@ -302,9 +302,9 @@ def run_conversation(user_message: str, max_tool_calls=10): print(f"Attempting to call {tool_name} with arguments {arguments}...") # Give the user a chance to stop a problem before it starts - keep_going = input("Continue? (Y/n) ") - if keep_going.lower() == "n": - exit(1) + # keep_going = input("Continue? (Y/n) ") + # if keep_going.lower() == "n": + # exit(1) result = execute_tool(tool_name, arguments)