Activate Snapshot LXC / Rename ZFS snapshot

yena

Renowned Member
Nov 18, 2011
385
6
83
Hello,
i have this zfs snapshot replication on a backup server:

rpool/BACKUP 537G 1001G 96K /rpool/BACKUP
rpool/BACKUP/subvol-100-disk-1 537G 1001G 420G /rpool/BACKUP/subvol-100-disk-1
rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-06-22_06:30:06 36.2G - 312G -
rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-06-24_06:30:03 16.7G - 314G -
rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-06-25_06:30:08 16.8G - 315G -
rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-09-06_10:46:19 384M - 420G -
rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-09-06_15:27:59 0 - 420G -

Now i can't clone it (space/time problem) so i need to activate my last snapshot backup.
Is it correct if i rename it:

zfs rename rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-09-06_15:27:59 rpool/BACKUP/subvol-200-disk-1

and set an lxc conf file pointing on this vol ?
200.conf
....
rootfs: BACKUP/subvol-200-disk-1

Option 2
I use directly
rpool/BACKUP/subvol-100-disk-1
rootfs: BACKUP/subvol-100-disk-1


Thanks!
 
Last edited:
Hi,

this will not work like this.
if you rename a snapshot it will be still read only.

You have 2 choises first clone from snapshot (this is the same like your 1 option)
use zfs clone rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-09-06_15:27:59 rpool/<VMdrive>/subvol-200-disk-2

or you can make a full copy of it and override the original

zfs send rpool/BACKUP/subvol-100-disk-1@rep_DbMeteoDaily_2016-09-06_15:27:59 | zfs receive rpool/<VMdrive>/subvol-200-disk-1