documentation refactoring

This commit is contained in:
2025-10-25 12:59:41 +00:00
parent 2af6388c2e
commit 98c4681aed
16 changed files with 528 additions and 580 deletions

140
docs/file-systems.md Normal file
View File

@@ -0,0 +1,140 @@
# File Systems
## 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.
mkfs.ext4 _filesys_
Example
```bash
mkfs.ext4 /dev/sdb1
```
## ext3
mkfs.ext3 _filesys_
Example
``` bash
mkfs.ext3 /dev/sdb1
#exFat
mkfs.exfat /dev/sdc1
```
## exFat
mkfs.exfat _filesys_
``` bash
mkfs.exfat /dev/sdc1
```
## ntfs
``` bash
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
```