btrfs
Különbségek
A kiválasztott változat és az aktuális verzió közötti különbségek a következők.
| Előző változat mindkét oldalonElőző változatKövetkező változat | Előző változat | ||
| btrfs [2023/03/24 09:06] – daevidt | btrfs [2026/02/05 09:27] (aktuális) – daevidt | ||
|---|---|---|---|
| Sor 1: | Sor 1: | ||
| + | === Alap BTRFS parancsok === | ||
| + | |||
| + | btrfs filesystem show | ||
| + | btrfs filesystem usage [-T] / # -T nélkül %-ot is mutat, kicsit más formájú megjelenítés | ||
| + | btrfs filesystem df / | ||
| + | |||
| === BTRFS subvolume parancsok === | === BTRFS subvolume parancsok === | ||
| Sor 30: | Sor 36: | ||
| | | ||
| akkor a legegyszerűbb az, ha a jelenlegi @-ot átnevezed valami másra, majd a kívánt snapshotot átnevezed @-ra. | akkor a legegyszerűbb az, ha a jelenlegi @-ot átnevezed valami másra, majd a kívánt snapshotot átnevezed @-ra. | ||
| + | <code bash> | ||
| mount / | mount / | ||
| mv / | mv / | ||
| mv / | mv / | ||
| + | </ | ||
| Ezután rebootkor a snapshotot fogja felbootolni a gép, és mehet tovább minden. Ha minden oké, akkor a régi @_latest_root-ot lehet törölni, illetve minden más snapshotot, ami már nem kell. | Ezután rebootkor a snapshotot fogja felbootolni a gép, és mehet tovább minden. Ha minden oké, akkor a régi @_latest_root-ot lehet törölni, illetve minden más snapshotot, ami már nem kell. | ||
| === BTRFS subvolume (snapshot) törlése === | === BTRFS subvolume (snapshot) törlése === | ||
| + | <code bash> | ||
| btrfs subvolume list | btrfs subvolume list | ||
| # feljegyezni az id-t : pl 123 | # feljegyezni az id-t : pl 123 | ||
| mount -o subvol=@valami /dev/sdb /mnt | mount -o subvol=@valami /dev/sdb /mnt | ||
| btrfs subvolume delete -c -i 123 /mnt # -c = commit, -i = identifer | btrfs subvolume delete -c -i 123 /mnt # -c = commit, -i = identifer | ||
| - | | + | </ |
| === BTRFS no space left on device === | === BTRFS no space left on device === | ||
| Sor 51: | Sor 57: | ||
| To see if this is the case, first look for the amount of allocated space with | To see if this is the case, first look for the amount of allocated space with | ||
| - | + | <code bash> | |
| - | | + | sudo btrfs fi show / |
| + | </ | ||
| If this shows the " | If this shows the " | ||
| Secondly, look at the amount of space you have in metadata, as reported by | Secondly, look at the amount of space you have in metadata, as reported by | ||
| - | + | <code bash> | |
| - | | + | btrfs fi df / |
| + | </ | ||
| If the " | If the " | ||
| If you have full up metadata, and more than 1 GiB of space free in data, as reported by btrfs fi df, then you should be able to free up some of the data allocation with a partial balance: | If you have full up metadata, and more than 1 GiB of space free in data, as reported by btrfs fi df, then you should be able to free up some of the data allocation with a partial balance: | ||
| + | <code bash> | ||
| + | btrfs balance start /mountpoint -dlimit=3 | ||
| + | </ | ||
| + | We know this isn't ideal, and there are plans to improve the behavior. Running close to empty is rarely the ideal case, but we can get far closer to full than we do. | ||
| + | |||
| + | === BTRFS quota, lassulás, timeshift === | ||
| + | |||
| + | A BTRFS quota funkciója nem túl megbízható, | ||
| + | |||
| + | A Timeshift hajlamos automatikusan bekapcsolni a quota funkciót, mert az szükséges a snapshotok " | ||
| + | |||
| + | Szerintem megéri lemondani erről a funkcióról, | ||
| + | |||
| + | # btrfs qgroup show / | ||
| + | # btrfs quota disable / | ||
| + | # btrfs qgroup show / | ||
| + | |||
| + | === BTRFS és chunkok, balancing === | ||
| + | |||
| + | A BTRFS chunkokban foglalja le a fájlrenszert. Ha van még chunk sok hellyel, nem biztos, hogy újat nyit. A chunkokat időnként lehet balance-olni. A balance lehet teljes vagy részleges. | ||
| + | |||
| + | Általában érdemes csak részleges balance-t futtatni. | ||
| + | |||
| + | == Vizsgálat == | ||
| + | |||
| + | btrfs filesystem usage -T / | ||
| + | | ||
| + | == Balance stratégia (ha nincs nagyon tele az FS) == | ||
| + | |||
| + | Legalább 75%-ig tele chunkok mozgatása: | ||
| + | btrfs balance start -dusage=75 / | ||
| + | |||
| + | Ez elég gyorsan lefut. Lehet még lejjebb menni: | ||
| + | |||
| + | btrfs balance start -dusage=70 / | ||
| + | | ||
| + | Ennél lejjebb nem érdemes. | ||
| + | |||
| - | # btrfs balance start /mountpoint -dlimit=3 | ||
| - | We know this isn't ideal, and there are plans to improve the behavior. Running close to empty is rarely the ideal case, but we can get far closer to full than we do. | ||
btrfs.1679648819.txt.gz · Utolsó módosítás: szerkesztette: daevidt
