Split fs-btrfs
This commit is contained in:
@@ -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
18
docs/linux/fs-other.md
Normal 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
|
||||
```
|
@@ -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
|
||||
```
|
||||
|
Reference in New Issue
Block a user