Compare commits
No commits in common. "efccada19bcd981635094c95a98c830bdf1d9373" and "ad1fefc02a682768d015c328f1ac17ef3d0b0ccd" have entirely different histories.
efccada19b
...
ad1fefc02a
@ -10,8 +10,6 @@
|
|||||||
- [Recovery](#recovery)
|
- [Recovery](#recovery)
|
||||||
- [Drive Manipulation](#drive-manipulation)
|
- [Drive Manipulation](#drive-manipulation)
|
||||||
- [Replace Drives](#replace-drives)
|
- [Replace Drives](#replace-drives)
|
||||||
- [Filesystem Manipulation](#filesystem-manipulation)
|
|
||||||
- [Upgrading Btrfs block group cache to V2](#upgrading-btrfs-block-group-cache-to-v2)
|
|
||||||
- [Balances](#balances)
|
- [Balances](#balances)
|
||||||
- [Scrub](#scrub)
|
- [Scrub](#scrub)
|
||||||
- [Snapshots](#snapshots)
|
- [Snapshots](#snapshots)
|
||||||
@ -43,20 +41,6 @@ To get detailed information and serial number of a specific drive:
|
|||||||
smartctl -i /dev/sdc
|
smartctl -i /dev/sdc
|
||||||
```
|
```
|
||||||
|
|
||||||
**Find the Device Path from UUID**
|
|
||||||
|
|
||||||
Using lsblk:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
lsblk -o NAME,UUID,MOUNTPOINT
|
|
||||||
```
|
|
||||||
|
|
||||||
Using blkid:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
blkid | grep <UUID>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Information on Filesystem
|
## Information on Filesystem
|
||||||
|
|
||||||
**Show Basic Filesystem Information**
|
**Show Basic Filesystem Information**
|
||||||
@ -132,22 +116,6 @@ To change the default subvolume if a non-standard one is set:
|
|||||||
btrfs subvol set-default 257 /mnt/tmp/
|
btrfs subvol set-default 257 /mnt/tmp/
|
||||||
```
|
```
|
||||||
|
|
||||||
**Verify Current Cache Version**
|
|
||||||
|
|
||||||
To check if your filesystem is using cache V1 by device:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
btrfs inspect-internal dump-super -f /dev/<device> | grep cache_generation
|
|
||||||
```
|
|
||||||
|
|
||||||
To check if your filesystem is using cache V1 by UUID:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
btrfs inspect-internal dump-super -f $(blkid -U <UUID>) | grep cache_generation
|
|
||||||
```
|
|
||||||
|
|
||||||
- If cache_generation is present, it indicates cache V1 is in use. If it's absent, the filesystem is already using V2.
|
|
||||||
|
|
||||||
## Backup Procedures
|
## Backup Procedures
|
||||||
|
|
||||||
**Desktop Backup: Root and Home**
|
**Desktop Backup: Root and Home**
|
||||||
@ -351,70 +319,6 @@ btrfs replace status -i /mnt/media
|
|||||||
- It can be used for upgrading storage by replacing smaller drives with larger ones, or for replacing failing drives.
|
- It can be used for upgrading storage by replacing smaller drives with larger ones, or for replacing failing drives.
|
||||||
- Ensure that the target drive has enough space to accommodate the data from the source drive.
|
- Ensure that the target drive has enough space to accommodate the data from the source drive.
|
||||||
|
|
||||||
## Filesystem Manipulation
|
|
||||||
|
|
||||||
### Upgrading Btrfs block group cache to V2
|
|
||||||
|
|
||||||
**From a running system non-root filesystems**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mount -o remount,clear_cache,space_cache=v2 /mnt/<mount-point>
|
|
||||||
```
|
|
||||||
|
|
||||||
**From a running system on root**
|
|
||||||
|
|
||||||
Check if your filesystem is using cache V1:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
btrfs inspect-internal dump-super -f /dev/<device> | grep cache_generation
|
|
||||||
```
|
|
||||||
|
|
||||||
Enable Cache V2
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nano /etc/default/grub
|
|
||||||
# Locate the line starting with GRUB_CMDLINE_LINUX_DEFAULT or GRUB_CMDLINE_LINUX and add the following options:
|
|
||||||
rootflags=clear_cache,space_cache=v2
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rootflags=clear_cache,space_cache=v2"
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
update-grub
|
|
||||||
reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
Verify the Change
|
|
||||||
|
|
||||||
```bash
|
|
||||||
btrfs inspect-internal dump-super -f /dev/<device> | grep cache_generation
|
|
||||||
```
|
|
||||||
|
|
||||||
Remove `clear_cache` Option
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nano /etc/default/grub
|
|
||||||
# Remove clear_cache from the rootflags.
|
|
||||||
update-grub
|
|
||||||
```
|
|
||||||
|
|
||||||
**From a live system**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
apt update
|
|
||||||
apt install btrfs-progs
|
|
||||||
lsblk -o NAME,UUID
|
|
||||||
blkid
|
|
||||||
mount -o clear_cache,space_cache=v2 /dev/disk/by-uuid/<UUID> /mnt
|
|
||||||
btrfs inspect-internal dump-super -f /dev/disk/by-uuid/<UUID> | grep cache_generation
|
|
||||||
umount /mnt
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Balances
|
## Balances
|
||||||
|
|
||||||
**Perform a Full Balance with Minimal Usage**
|
**Perform a Full Balance with Minimal Usage**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user