mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: reserved blocks in linux
This commit is contained in:
23
knowledge base/set reserved blocks on filesystems.md
Normal file
23
knowledge base/set reserved blocks on filesystems.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Set reserved blocks on filesystems
|
||||
|
||||
```sh
|
||||
# EXT
|
||||
tune2fs -m 1 /dev/sdXY
|
||||
tune2fs -r numOfBlocks device
|
||||
|
||||
# XFS
|
||||
xfs_io -x -c 'resblks' '/path/to/fs'
|
||||
```
|
||||
|
||||
## Sources
|
||||
|
||||
- [Reserved space for root on a filesystem - why?]
|
||||
- [How to determine the reserved blocks in XFS filesystem?]
|
||||
|
||||
<!--
|
||||
Reference
|
||||
═╬═Time══
|
||||
-->
|
||||
|
||||
[how to determine the reserved blocks in xfs filesystem?]: https://lore.kernel.org/all/CAJtCNH2irjpu3T57XPHPXHZ0FXm7V-diaA4g3DtjAmcRV2xmWA@mail.gmail.com/T/
|
||||
[reserved space for root on a filesystem - why?]: https://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why
|
||||
7
snippets/filesystems.sh
Normal file
7
snippets/filesystems.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#/usr/bin/env sh
|
||||
|
||||
# Get the *sector* size of partitions in 512-byte sectors
|
||||
sudo blockdev --getsz '/dev/nvme0n1p1'
|
||||
|
||||
# Get the *block* size of partitions
|
||||
sudo blockdev --getbsz '/dev/nvme0n1p1'
|
||||
Reference in New Issue
Block a user