FreeBSD zfs (true for another systems too)
Make snapshot:
# zfs snapshot zroot/var/log@backup
View snapshots:
# zfs list -t snapshot
Rollback:
# zfs rollback zroot/var/log@backup
Delete snapshot:
# zfs destroy zroot/var/log@backup
Set compression
# zfs set compression=on zroot/var/log
View all parameters
# zfs get all /var/log
****** GPART **********
View phisical disk
# gpart list
Create gpt ada1
#gpart create -s gpt ada1
root@freebsd:/dev # gpart show
=> 40 33554352 ada0 GPT (16G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 29356032 3 freebsd-zfs (14G)
33552384 2008 - free - (1.0M)
=> 40 33554352 ada1 GPT (16G)
40 33554352 - free - (16G)
Add disk (50%) part of disk
#gpart add -b 40 -s 16777176 -t freebsd-zfs ada1
or
(остальную часть разбиваем командой):
# gpart add -t freebsd-ufs -l tempfs -s 16777176 ada1
*********
Create new zpool from new disk /dev/ada1
#zpool create zroot2 /dev/ada1
View pool disk
#zpool status
Create RAID1
#sudo zpool create -f [new pool name] mirror /dev/sdb /dev/sdc
#sudo zpool add [existing pool name] mirror /dev/sdd /dev/sde
Create mountpoint /home of zfs pool (pool/home)
# zfs create pool/home
# zfs set mountpoint=/home pool/home
# View summa all files in /
du -chs /
*************
Create ZFS on Ubuntu 18.04 Server (!!non root)
# apt install zfsutils-linux
# zpool create nameofdisk /dev/sdb # где nameofdisk имя диска и точка монтирования. sdb - неразмеченный диск в системе
# zfs list
|