Files
zfs/README.md
Márcio Fernandes 2a3ee411ef modified: README.md
new file:   docs/migrate-zfs-root-pool-and-boot-system-to-new-disk.md
2025-11-01 20:53:23 +00:00

59 lines
2.0 KiB
Markdown

# zfs
ZFS (Zettabyte File System) is a high-performance, open-source file system and volume manager known for its advanced features like data integrity, snapshots, compression, and pooled storage. It was originally developed by Sun Microsystems in 2001 and introduced in 2005 for Solaris, later evolving into OpenZFS for broader platform support.
**🧠 Key Features of ZFS**:
- **Pooled Storage Architecture**: Instead of managing individual volumes, ZFS uses storage pools (zpools) that aggregate multiple physical devices. This allows dynamic allocation of space to datasets without manual partitioning.
- **Copy-on-Write** (CoW): ZFS never overwrites data in place. When data is modified, it writes the new version to a new location and updates metadata, ensuring consistent snapshots and preventing corruption.
- **End-to-End Data Integrity**: ZFS checksums all data and metadata, automatically detecting and correcting silent data corruption using redundant copies.
- **Snapshots and Clones**: You can create instant, space-efficient snapshots of the file system. Clones allow writable copies of snapshots, useful for testing or backups.
- **Built-in RAID Support**: ZFS includes native support for various RAID levels (RAID-Z, RAID-Z2, RAID-Z3), eliminating the need for separate volume managers.
- **Compression and Deduplication**: ZFS supports transparent compression (e.g., LZ4, gzip) and optional deduplication to save space.
- **Scalability**: It supports massive storage capacities — up to 256 trillion yobibytes for volume size and 16 exbibytes for individual files
## cli
```bash
#check status
zpool status
```
```bash
#pool list
zpool list -o name
```
```bash
# scrup pool
zpool scrub poolname
```
**check autotrim:**
``` bash
zpool get autotrim rpool
```
*output example:*
``` bash
NAME PROPERTY VALUE SOURCE
rpool autotrim off default
```
**health degrated:**
First check if not smart errors
```bash
# clear errors on zfs pool
zpool clear poolname
```
**sync:**
``` bash
sudo zfs set sync=standard rpool
```