pve-zsync: Access snapshots

Discussion in 'Proxmox VE: Installation and configuration' started by helojunkie, Jun 15, 2018 at 04:32.

  1. helojunkie

    helojunkie New Member
    Proxmox VE Subscriber

    Joined:
    Jul 28, 2017
    Messages:
    20
    Likes Received:
    0
    I have a system running 5.2-1 (latest updates).

    I have 2 x 512GB SSDs in a ZFS RAID1 configuration and 2 x 8TB Spinners in a ZFS RAID1 configuration. The SSD are my rpool and my 8TBs are setup as "spinners".

    I am using pve-zsync to snapshot and sync those snapshots between my SSDs and my spinners.

    I have created a pve-zsync process for two of my VMs and they appear to be running fine:

    Code:
    root@proxmox:~# pve-zsync list
    SOURCE                   NAME                     STATE     LAST SYNC           TYPE  CON 
    101                      Win10PRO                 ok        2018-06-14_19:15:01 qemu  local
    102                      Gatekeeper               ok        2018-06-14_19:15:03 qemu  local
    
    
    root@proxmox:~# pve-zsync status
    SOURCE                   NAME                     STATUS  
    101                      Win10PRO                 ok
    102                      Gatekeeper               ok
    
    I can see the snapshots on both my rpool (SSDs) and my spinners:

    Code:
    root@proxmox:~# zfs list -t snapshot
    NAME                                                                USED  AVAIL  REFER  MOUNTPOINT
    rpool/ssd_images/vm-101-disk-1@rep_Win10PRO_2018-06-14_19:00:01    4.84M      -  31.7G  -
    rpool/ssd_images/vm-101-disk-1@rep_Win10PRO_2018-06-14_19:15:01    1.54M      -  31.7G  -
    rpool/ssd_images/vm-102-disk-1@rep_Gatekeeper_2018-06-14_19:00:03   328K      -  10.8G  -
    rpool/ssd_images/vm-102-disk-1@rep_Gatekeeper_2018-06-14_19:15:03   308K      -  10.8G  -
    spinning/backups/vm-101-disk-1@rep_Win10PRO_2018-06-14_19:00:01    8.68M      -  31.5G  -
    spinning/backups/vm-101-disk-1@rep_Win10PRO_2018-06-14_19:15:01       0B      -  31.5G  -
    spinning/backups/vm-102-disk-1@rep_Gatekeeper_2018-06-14_19:00:03  1.64M      -  10.7G  -
    spinning/backups/vm-102-disk-1@rep_Gatekeeper_2018-06-14_19:15:03     0B      -  10.7G  -
    
    I can see the space actually used on my spinner:

    Code:
    root@proxmox:~# zpool list
    NAME       SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
    rpool      476G   160G   316G         -    48%    33%  1.00x  ONLINE  -
    spinning  7.25T  46.6G  7.20T         -     0%     0%  1.00x  ONLINE  -
    
    Both of my pools have list snapshots on:

    Code:
    root@proxmox:~# zpool get listsnapshots rpool
    NAME   PROPERTY       VALUE      SOURCE
    rpool  listsnapshots  on         local
    
    root@proxmox:~# zpool get listsnapshots spinning
    NAME      PROPERTY       VALUE      SOURCE
    spinning  listsnapshots  on         local
    
    I have set my zfs snapdir to visible:

    Code:
    root@proxmox:~# zfs get snapdir rpool
    NAME   PROPERTY  VALUE    SOURCE
    rpool  snapdir   visible  local
    
    root@proxmox:~# zfs get snapdir spinning
    NAME      PROPERTY  VALUE    SOURCE
    spinning  snapdir   visible  local
    

    After having done all of this, I am unable to locate my snapshots nor access them as I would have expected in the .zfs directory:

    Code:
    root@proxmox:~# locate .zfs | grep snapshot
    /.zfs/snapshot
    /rpool/.zfs/snapshot
    /rpool/ROOT/.zfs/snapshot
    /rpool/data/.zfs/snapshot
    /rpool/ssd_images/.zfs/snapshot
    /spinning/.zfs/snapshot
    /spinning/backups/.zfs/snapshot
    
    An ls -alh on each of those directors show nothing at all.


    So my question is how to I access those snapshots? I run a bunch of different freenas ZFS fileservers and I am used to just being able to cd into the snapshot directory and looking at the files and recovering them (or whatever). However on Proxmox, although everything is ZFS I cannot seem to locate (much less browse) my snapshots.

    Any help would be greatly appreciated.

    Thanks
     
  2. wolfgang

    wolfgang Proxmox Staff Member
    Staff Member

    Joined:
    Oct 1, 2014
    Messages:
    3,356
    Likes Received:
    191
    Hi,

    As you use KVM PVE use zvols as image and you need the property snapdev and not snapdir.
    Then the blockdev snapshot is shown under /dev/zfs/<pool>/...
     
  3. helojunkie

    helojunkie New Member
    Proxmox VE Subscriber

    Joined:
    Jul 28, 2017
    Messages:
    20
    Likes Received:
    0
    Thank you Wolfgang -

    But that didn't seem to help:

    Code:
    NAME      PROPERTY  VALUE    SOURCE
    spinning  snapdev   visible  local
    
    But there is no /dez/zfs or /dev/.zfs directory in which to find the snapshots.

    To be clear, I am trying to find the snapshots on the spinning pool which is on a separate set of ZFS RAID1 hard drives. /dev would put them on my rpool.

    Thanks
     
  4. wolfgang

    wolfgang Proxmox Staff Member
    Staff Member

    Joined:
    Oct 1, 2014
    Messages:
    3,356
    Likes Received:
    191
    Sorry, my failure.
    the path is /dev/zvol/<pool>
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice