Split fs-btrfs
This commit is contained in:
@@ -5,17 +5,17 @@
|
|||||||
#### Create shapshot
|
#### Create shapshot
|
||||||
```bash
|
```bash
|
||||||
btrfs subvolume snapshot xyz xyz-snapshot-path-name
|
btrfs subvolume snapshot xyz xyz-snapshot-path-name
|
||||||
```
|
|
||||||
or
|
# or
|
||||||
```bash
|
|
||||||
btrfs subvolume snapshot main "main-`date +%Y-%m-%d`"
|
btrfs subvolume snapshot main "main-`date +%Y-%m-%d`"
|
||||||
```
|
```
|
||||||
#### Delete shapshot
|
#### Delete shapshot
|
||||||
```bash
|
```bash
|
||||||
btrfs subvolume delete xyz-snapshot-path-name
|
btrfs subvolume delete xyz-snapshot-path-name
|
||||||
```
|
|
||||||
or
|
# or
|
||||||
```bash
|
|
||||||
btrfs subvolume delete "`echo main-* | tr ' ' \\\\n | sort | head -n 1`"
|
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/
|
btrfs filesystem resize max /mnt/dmp/
|
||||||
|
|
||||||
# or for view ID
|
# or for view ID
|
||||||
|
|
||||||
btrfs device usage /mnt/dmp/
|
btrfs device usage /mnt/dmp/
|
||||||
btrfs filesystem resize ID:max /mnt/dmp/
|
btrfs filesystem resize ID:max /mnt/dmp/
|
||||||
```
|
```
|
||||||
#### Defragment / compress
|
#### Defragment / compress
|
||||||
```bash
|
```bash
|
||||||
btrfs filesystem defragment -v -clzo /boot/*
|
btrfs filesystem defragment -v -clzo /boot/*
|
||||||
|
|
||||||
|
# or
|
||||||
|
|
||||||
|
chattr +c dir
|
||||||
```
|
```
|
||||||
#### Set RO / RW
|
#### Set RO / RW
|
||||||
```bash
|
```bash
|
||||||
btrfs property set -f . ro false
|
btrfs property set -f . ro false
|
||||||
btrfs property set -f . ro true
|
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
|
## Nginx
|
||||||
```
|
```
|
||||||
# Allow open local port
|
# 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
|
# Allow open remote port
|
||||||
setsebool -P httpd_can_network_connect 1
|
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