Split fs-btrfs

This commit is contained in:
root
2024-06-12 02:01:52 +03:00
parent 896956b62b
commit eaa2d11891
3 changed files with 33 additions and 25 deletions

View File

@@ -5,17 +5,17 @@
#### Create shapshot
```bash
btrfs subvolume snapshot xyz xyz-snapshot-path-name
```
or
```bash
# or
btrfs subvolume snapshot main "main-`date +%Y-%m-%d`"
```
#### Delete shapshot
```bash
btrfs subvolume delete xyz-snapshot-path-name
```
or
```bash
# or
btrfs subvolume delete "`echo main-* | tr ' ' \\\\n | sort | head -n 1`"
```
@@ -26,33 +26,20 @@ btrfs subvolume delete "`echo main-* | tr ' ' \\\\n | sort | head -n 1`"
btrfs filesystem resize max /mnt/dmp/
# or for view ID
btrfs device usage /mnt/dmp/
btrfs filesystem resize ID:max /mnt/dmp/
```
#### Defragment / compress
```bash
btrfs filesystem defragment -v -clzo /boot/*
# or
chattr +c dir
```
#### Set RO / RW
```bash
btrfs property set -f . ro false
btrfs property set -f . ro true
```
# LVM
#### Extend
```bash
lvextend -L+1G /dev/vg4/homevol
```
# Ext4
#### Resize
```bash
resize2fs /dev/device [size]
```
#### if superblock fail
```bash
dumpe2fs /dev/sda5 | grep -i backup
fsck -b 32768 /dev/sda5
```

18
docs/linux/fs-other.md Normal file
View File

@@ -0,0 +1,18 @@
# LVM
#### Extend
```bash
lvextend -L+1G /dev/vg4/homevol
```
# Ext4
#### Resize
```bash
resize2fs /dev/device [size]
```
#### if superblock fail
```bash
dumpe2fs /dev/sda5 | grep -i backup
fsck -b 32768 /dev/sda5
```

View File

@@ -4,8 +4,11 @@
## Nginx
```
# Allow open local port
semanage port -a -t http_port_t -p tcp 28081
semanage port -a -t http_port_t -p tcp 28081
# Allow open remote port
setsebool -P httpd_can_network_connect 1
# Allow open file in dir
chcon -R -t httpd_sys_content_t dir
```