https://github.com/thiswillbeyourgithub/btrfs_cow_disabler
A Zsh script to disable Btrfs Copy-on-Write (COW) by copying data to a new file with the `+C` attribute; **use with caution, as it's untested and may contain bugs.**
https://github.com/thiswillbeyourgithub/btrfs_cow_disabler
Last synced: 11 months ago
JSON representation
A Zsh script to disable Btrfs Copy-on-Write (COW) by copying data to a new file with the `+C` attribute; **use with caution, as it's untested and may contain bugs.**
- Host: GitHub
- URL: https://github.com/thiswillbeyourgithub/btrfs_cow_disabler
- Owner: thiswillbeyourgithub
- License: gpl-3.0
- Created: 2025-02-02T14:45:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-02T15:04:19.000Z (about 1 year ago)
- Last Synced: 2025-02-02T16:19:14.073Z (about 1 year ago)
- Language: Shell
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Btrfs COW Disabler
This script disables Copy-on-Write (COW) for files or directories on a Btrfs filesystem by copying the data to a new file with the `+C` attribute set.
## ⚠️ **Important Note**
This script **has not been thoroughly tested** and may contain bugs. Use it at your own risk. Always back up your data before running it.
**Personal Experience:** I used this script for a short period and it seemed to work fine, but I ultimately encountered issues with Btrfs itself and stopped using it in the long run. Your mileage may vary.
## Usage
```bash
./btrfs_cow_disabler.zsh
```
- ``: The file or directory to disable COW for.
- ``: A temporary file or location used during the process.
## How It Works
1. Creates a temporary file with the `+C` attribute (disables COW).
2. Copies the original file's data to the temporary file.
3. Verifies the checksum to ensure data integrity.
4. Atomically moves the temporary file back to the original location.
## Requirements
- `zsh` shell