Zfs Notes: Difference between revisions
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== reference == | |||
* snapshots http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6r4j/index.html | |||
== Simple commands == | == Simple commands == | ||
Line 15: | Line 21: | ||
<pre> | <pre> | ||
[root@freenas] ~# zpool status | [root@freenas] ~# zpool status ( -v verbose ) | ||
pool: tank | pool: tank | ||
state: ONLINE | state: ONLINE |
Latest revision as of 14:54, 12 May 2020
reference
Simple commands
zfs list
zpool list
zfs get all <thing>
like
get all /mnt/tank/dataset_music
list disks in zpool
[root@freenas] ~# zpool status ( -v verbose ) pool: tank state: ONLINE scan: scrub repaired 0 in 0h46m with 0 errors on Sun Nov 17 03:46:52 2013 config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gptid/8c654d70-0f89-11e3-a5fe-001bfce1ed64 ONLINE 0 0 0 gptid/8cc730d9-0f89-11e3-a5fe-001bfce1ed64 ONLINE 0 0 0 errors: No known data errors [root@freenas] ~#
Compression
I'm pretty sure this has to do with high compression ratios set on the the zimbra backups volumes. I've lowered it before and it's gotten better, so I will lower it to gzip-3 form gzip-6. Let's see how this looks over the next week.
[root@sms-thumper /]# date ; zpool list tank ; zfs list -o name,type,volsize,quota,refer,avail,compressratio,usedbysnapshots,mountpoint -S refer Mon May 13 10:46:39 EDT 2013 NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 19.0T 15.4T 3.66T 80% ONLINE - NAME TYPE VOLSIZE QUOTA REFER AVAIL RATIO USEDSNAP MOUNTPOINT tank/zimbra-msgstr-XX filesystem - 5T 3.61T 1.39T 1.38x 0 /tank/nfs/zimbra-msgstr-XX rootpool filesystem - none 34K 385G 1.00x 0 /rootpool rootpool/ROOT filesystem - none 19K 385G 1.00x 0 /rootpool/ROOT rootpool/export filesystem - none 19K 385G 1.00x 0 /rootpool/export [root@sms-thumper /]# zfs get compression tank/zimbra-msgstr-XX NAME PROPERTY VALUE SOURCE tank/zimbra-msgstr-XX compression gzip local [root@sms-thumper /]# zfs set compression=gzip-3 tank/zimbra-msgstr-XX [root@sms-thumper /]# zfs get compression tank/zimbra-msgstr-XX NAME PROPERTY VALUE SOURCE tank/zimbra-msgstr-XX compression gzip-3 local [root@sms-thumper /]#
zfs send
on freenas: http://doc.freenas.org/index.php/Replication_Tasks
replication
from: http://docs.oracle.com/cd/E18752_01/html/819-5461/gbchx.html
Receiving a ZFS Snapshot Keep the following key points in mind when you receive a file system snapshot:
Both the snapshot and the file system are received.
The file system and all descendent file systems are unmounted.
The file systems are inaccessible while they are being received.
The original file system to be received must not exist while it is being transferred.
If the file system name already exists, you can use zfs rename command to rename the file system.
For example:
# zfs send tank/gozer@0830 > /bkups/gozer.083006 # zfs receive tank/gozer2@today < /bkups/gozer.083006 # zfs rename tank/gozer tank/gozer.old # zfs rename tank/gozer2 tank/gozer
my script so far:
zfs umount ONETB/dataset_archive zfs send tank/dataset_archive@auto-20131116.1451-2w | zfs recv -F ONETB/dataset_archive zfs mount ONETB/dataset_archive