modified: README.md

modified:   docs/file-systems.md
This commit is contained in:
2025-11-01 22:38:37 +00:00
parent 170a97819b
commit 1fcbabd754
2 changed files with 95 additions and 96 deletions

View File

@@ -1,5 +1,27 @@
# File Systems
- [zfs](#zfs)
- [ext4](#ext4)
- [ext3](#ext3)
- [exFat](#exfat)
- [ntfs](#ntfs)
## 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
[Check for more information](https://git.limbosolutions.com/kb/zfs).
## ext4
Ext4 (Fourth Extended File System) is a modern journaling file system used by most Linux distributions. It offers high performance, reliability, and support for large volumes and files.
@@ -12,6 +34,17 @@ Example
mkfs.ext4 /dev/sdb1
```
**fstab mount example:**
``` bash
#add line
PARTUUID=<PARTUUID GIVEN blksid> <FOLDER WHERE TO MOUNT> ext4 defaults,nofail 0 02
```
``` bash
mount -a
```
## ext3
mkfs.ext3 _filesys_
@@ -40,101 +73,5 @@ apt-get install ntfs-3g
mkntfs --fast --label Backups /dev/sdc1
```
## Manutenção de discos
Bad Sectors
sudo e2fsck -cfpv /dev/sda1
O Exemplo foi com o disco sda1 mas deverá ser substituído pelo disco desejado
Os parâmetros têm os seguintes significados:
“c” procura por blocos defeituosos e os adiciona à lista
“f” força uma verificação no sistema de arquivos
“p” repara qualquer coisa que possa ser reparada com segurança
“v” está no modo detalhado. você pode ver o progresso do comando
Esse comando pode levar muito tempo para ser executado, até várias horas em uma unidade particularmente grande.
## Disks
File System & Space Usage
``` bash
df -h
```
List physical disks and partition size
``` bash
lsblk
```
List partition ids
``` bash
blkid /dev/sdc1
```
Partition Manager
``` bash
fdisk /dev/<DISK NAME>
#Example:
fdisk /dev/sdc
#Partições como mais de 2 TB
sudo parted /dev/sdc
#(parted) mklabel gpt
#alterar para a unidade de medida que desejar
#(parted) unit TB
#ver espaço livre
(parted) print free
#criar partição com espaço livre (exemplo:4 Teras)
mkpart primary ext4 0 4
#Formatar uma partição
```
## mount
Mount partition on boot fstab
``` bash
nano /etc/fstabexemplo de alias
```
ext4 example
``` bash
#add line
PARTUUID=<PARTUUID GIVEN blksid> <FOLDER WHERE TO MOUNT> ext4 defaults,nofail 0 02
```
Mount fstab partions without reboot
``` bash
mount -a
```
gvfs-mount 'ftp://user@www.your-server.com/folder'
[source](https://9to5answer.com/how-to-automount-a-gvfs-file-system-on-logon)
## gio
### mount samba share
```bash
#/home/username/.credentials
#username
#SAMBA
#password
gio mount smb://server/share < /home/username/.credentials
```
### unmount
```bash
gio mount -u smb://server/share
```