Discussion:
recover only one file from a snapshot
Richard Kojedzinszky via illumos-zfs
2014-08-17 09:05:22 UTC
Permalink
Dear ZFS devs,

We have a simple VPS hosting setup, where a ZFS dataset is exported to
NFS, hosting the VM's images. This dataset is being snapshotted regularly.
Demand has come to recover only one VM's image: I mounted the snapshot,
then copied the file from snapshot over its original place. I dont know,
but in theory would it be possible with a simple zfs command to just make
a link somehow to the file in the snapshot at the original place? That way
the recovery would be very fast, there would be no need to read the whole
file (which can be full of holes), etc.

Could this feature be implemented in ZFS?

Regards,
Kojedzinszky Richard
Richard Elling via illumos-zfs
2014-08-17 15:23:38 UTC
Permalink
Post by Richard Kojedzinszky via illumos-zfs
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is exported to NFS, hosting the VM's images. This dataset is being snapshotted regularly. Demand has come to recover only one VM's image: I mounted the snapshot, then copied the file from snapshot over its original place. I dont know, but in theory would it be possible with a simple zfs command to just make a link somehow to the file in the snapshot at the original place? That way the recovery would be very fast, there would be no need to read the whole file (which can be full of holes), etc.
Could this feature be implemented in ZFS?
see clone


-- richard
Post by Richard Kojedzinszky via illumos-zfs
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Richard Kojedzinszky via illumos-zfs
2014-08-17 18:24:40 UTC
Permalink
I've forget to mention that weh have all images on a single dataset, so
clone/promote to an older snapshot is not reasonable. We would need to
revert only one file of the snapshot.

Any ideas?

Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is exported to NFS, hosting the VM's images. This dataset is being snapshotted regularly. Demand has come to recover only one VM's image: I mounted the snapshot, then copied the file from snapshot over its original place. I dont know, but in theory would it be possible with a simple zfs command to just make a link somehow to the file in the snapshot at the original place? That way the recovery would be very fast, there would be no need to read the whole file (which can be full of holes), etc.
Could this feature be implemented in ZFS?
see clone
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Toomas Soome via illumos-zfs
2014-08-17 18:50:03 UTC
Permalink
the current clone/rollback is operating just on dataset scale, implementing partial rollbacks would require R&D and therefore time. so it's definitely not fast, but still sounds like an interesting project.

toomas
I've forget to mention that weh have all images on a single dataset, so clone/promote to an older snapshot is not reasonable. We would need to revert only one file of the snapshot.
Any ideas?
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is exported to NFS, hosting the VM's images. This dataset is being snapshotted regularly. Demand has come to recover only one VM's image: I mounted the snapshot, then copied the file from snapshot over its original place. I dont know, but in theory would it be possible with a simple zfs command to just make a link somehow to the file in the snapshot at the original place? That way the recovery would be very fast, there would be no need to read the whole file (which can be full of holes), etc.
Could this feature be implemented in ZFS?
see clone
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/25767303-368b6a9e
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Richard Elling via illumos-zfs
2014-08-17 19:03:30 UTC
Permalink
I've forget to mention that weh have all images on a single dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But perhaps you are running vmware where such configs
are more common.
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is exported to NFS, hosting the VM's images. This dataset is being snapshotted regularly. Demand has come to recover only one VM's image: I mounted the snapshot, then copied the file from snapshot over its original place. I dont know, but in theory would it be possible with a simple zfs command to just make a link somehow to the file in the snapshot at the original place? That way the recovery would be very fast, there would be no need to read the whole file (which can be full of holes), etc.
Could this feature be implemented in ZFS?
see clone
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Sam Zaydel via illumos-zfs
2014-08-17 21:45:46 UTC
Permalink
If vmware, chances are, re-thinning will be necessary, since recovering VM
from snapshot will cause it to take up entire amount of disk originally
allocated, assuming it was thin provisioned of course.


On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs <
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single dataset, so
clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But perhaps you
are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via illumos-zfs" <
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is exported to
NFS, hosting the VM's images. This dataset is being snapshotted regularly.
Demand has come to recover only one VM's image: I mounted the snapshot,
then copied the file from snapshot over its original place. I dont know,
but in theory would it be possible with a simple zfs command to just make a
link somehow to the file in the snapshot at the original place? That way
the recovery would be very fast, there would be no need to read the whole
file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Join the geek side, we have π!

Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Schlacta, Christ via illumos-zfs
2014-08-18 06:34:48 UTC
Permalink
This is why I use qcow2 :(

Okay, so setting any compression should compress 0 blocks to take no actual
space.

If the files are sparse, Linux cp has efficient handling of sparse files.

If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with upstream.
Post by Sam Zaydel via illumos-zfs
If vmware, chances are, re-thinning will be necessary, since recovering VM
from snapshot will cause it to take up entire amount of disk originally
allocated, assuming it was thin provisioned of course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs <
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single dataset, so
clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But perhaps
you are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via illumos-zfs" <
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is exported
to NFS, hosting the VM's images. This dataset is being snapshotted
regularly. Demand has come to recover only one VM's image: I mounted the
snapshot, then copied the file from snapshot over its original place. I
dont know, but in theory would it be possible with a simple zfs command to
just make a link somehow to the file in the snapshot at the original place?
That way the recovery would be very fast, there would be no need to read
the whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a> |
Modify
<https://www.listbox.com/member/?&>
Your Subscription <http://www.listbox.com>
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Richard Kojedzinszky via illumos-zfs
2014-08-18 07:03:04 UTC
Permalink
Dear all,

Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.

The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry in the
dir pointing to the same file (object) in the dataset which existed
before.

Regards,
Post by Schlacta, Christ via illumos-zfs
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with upstream.
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
Post by Sam Zaydel via illumos-zfs
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[2]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[5]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [3]
Powered by Listbox: http://www.listbox.com [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2] https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[3] https://www.listbox.com/member/?&amp;
[4] http://www.listbox.com
[5] https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[6] https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[7] http://www.linkedin.com/in/samzaydel
[8] https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
[9]
https://www.listbox.com/member/?&amp;
--
Richard Kojedzinszky
Jim Klimov via illumos-zfs
2014-08-18 11:11:32 UTC
Permalink
Post by Richard Kojedzinszky via illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry in the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
Post by Schlacta, Christ via illumos-zfs
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
Post by Schlacta, Christ via illumos-zfs
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
Post by Sam Zaydel via illumos-zfs
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[2]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[5]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [3]
Powered by Listbox: http://www.listbox.com [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Schlacta, Christ via illumos-zfs
[3] https://www.listbox.com/member/?&amp;
[4] http://www.listbox.com
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Schlacta, Christ via illumos-zfs
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
Post by Schlacta, Christ via illumos-zfs
[7] http://www.linkedin.com/in/samzaydel
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
Post by Schlacta, Christ via illumos-zfs
[9]
https://www.listbox.com/member/?&amp;
While the symlink to the snapshot virtual directory might be possible (usability subject to dataset access rights delegation, see zfs allow), this would be a read-only file. You might copy it back into the 'live' dataset (or rather rsync --inplace so as to not waste space during the 'recovery'), you won't use it well for a live VM. If dealing with such symlinks, also use zfs hold to keep the snapshot from disappearing.

Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
Richard Kojedzinszky via illumos-zfs
2014-08-18 12:08:27 UTC
Permalink
Actually I intentionally wrote just 'ln', and not 'ln -s'. Somehow a
hard-link could be created for that existing file in the snapshot. Would
it need a big change in zfs code, big redesign, or is it possible in
theory to implement it?

Thanks
18 августа 2014 г. 9:03:04 CEST, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry in the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
Post by Schlacta, Christ via illumos-zfs
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
Post by Schlacta, Christ via illumos-zfs
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
Post by Sam Zaydel via illumos-zfs
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[2]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[5]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [3]
Powered by Listbox: http://www.listbox.com [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Schlacta, Christ via illumos-zfs
[3] https://www.listbox.com/member/?&amp;
[4] http://www.listbox.com
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Schlacta, Christ via illumos-zfs
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
Post by Schlacta, Christ via illumos-zfs
[7] http://www.linkedin.com/in/samzaydel
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
Post by Schlacta, Christ via illumos-zfs
[9]
https://www.listbox.com/member/?&amp;
While the symlink to the snapshot virtual directory might be possible
(usability subject to dataset access rights delegation, see zfs
allow), this would be a read-only file. You might copy it back into
the 'live' dataset (or rather rsync --inplace so as to not waste space
during the 'recovery'), you won't use it well for a live VM. If
dealing with such symlinks, also use zfs hold to keep the snapshot
from disappearing.
Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Richard Kojedzinszky
Rich via illumos-zfs
2014-08-18 12:12:53 UTC
Permalink
Ignoring any other logistical problems which may exist...

If it were a hardlink, it'd be a read-only file.

What would it mean to have a single read-only file on an otherwise
read-write filesystem?

If you can modify it and the original doesn't change, it's not really
a hardlink.

If you can't modify it, it's not really useful in most cases compared
to just symlinking to the RO copy...

- Rich

On Mon, Aug 18, 2014 at 8:08 AM, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Actually I intentionally wrote just 'ln', and not 'ln -s'. Somehow a
hard-link could be created for that existing file in the snapshot. Would it
need a big change in zfs code, big redesign, or is it possible in theory to
implement it?
Thanks
18 августа 2014 г. 9:03:04 CEST, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry in the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
Post by Schlacta, Christ via illumos-zfs
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
Post by Schlacta, Christ via illumos-zfs
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
Post by Sam Zaydel via illumos-zfs
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[2]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[5]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [3]
Powered by Listbox: http://www.listbox.com [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Schlacta, Christ via illumos-zfs
[3] https://www.listbox.com/member/?&amp;
[4] http://www.listbox.com
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Schlacta, Christ via illumos-zfs
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
Post by Schlacta, Christ via illumos-zfs
[7] http://www.linkedin.com/in/samzaydel
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
Post by Schlacta, Christ via illumos-zfs
[9]
https://www.listbox.com/member/?&amp;
While the symlink to the snapshot virtual directory might be possible
(usability subject to dataset access rights delegation, see zfs
allow), this would be a read-only file. You might copy it back into
the 'live' dataset (or rather rsync --inplace so as to not waste space
during the 'recovery'), you won't use it well for a live VM. If
dealing with such symlinks, also use zfs hold to keep the snapshot
from disappearing.
Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Richard Kojedzinszky via illumos-zfs
2014-08-18 15:16:49 UTC
Permalink
That is why I asked here, and not on an -fs list. Basically, some ZFS
expert could think about it if it is possible at ZFS
layer to make that link, to make a directory entry pointing to an object
which exists in a snapshot. Of course, this wont be a
POSIX fileop, as a regular hardlink cant be mode cross-device. That is
why I asked here the ZFS guys, developers what do they
think about the problem. For me, with that I dont know much of ZFS, I
think the data structures may allow such an operation.

My question is that would it be hard to implement such functionality or
not?

Regards,
Post by Rich via illumos-zfs
Ignoring any other logistical problems which may exist...
If it were a hardlink, it'd be a read-only file.
What would it mean to have a single read-only file on an otherwise
read-write filesystem?
If you can modify it and the original doesn't change, it's not really
a hardlink.
If you can't modify it, it's not really useful in most cases compared
to just symlinking to the RO copy...
- Rich
On Mon, Aug 18, 2014 at 8:08 AM, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Actually I intentionally wrote just 'ln', and not 'ln -s'. Somehow a
hard-link could be created for that existing file in the snapshot. Would it
need a big change in zfs code, big redesign, or is it possible in theory to
implement it?
Thanks
18 августа 2014 г. 9:03:04 CEST, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry in the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
Post by Schlacta, Christ via illumos-zfs
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
Post by Schlacta, Christ via illumos-zfs
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
Post by Sam Zaydel via illumos-zfs
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
Post by Richard Kojedzinszky via illumos-zfs
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
Post by Richard Elling via illumos-zfs
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[2]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[5]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Elling via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [3]
Powered by Listbox: http://www.listbox.com [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Schlacta, Christ via illumos-zfs
[3] https://www.listbox.com/member/?&amp;
[4] http://www.listbox.com
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Schlacta, Christ via illumos-zfs
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
Post by Schlacta, Christ via illumos-zfs
[7] http://www.linkedin.com/in/samzaydel
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
Post by Schlacta, Christ via illumos-zfs
[9]
https://www.listbox.com/member/?&amp;
While the symlink to the snapshot virtual directory might be possible
(usability subject to dataset access rights delegation, see zfs
allow), this would be a read-only file. You might copy it back into
the 'live' dataset (or rather rsync --inplace so as to not waste space
during the 'recovery'), you won't use it well for a live VM. If
dealing with such symlinks, also use zfs hold to keep the snapshot
from disappearing.
Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Richard Kojedzinszky
Sam Zaydel via illumos-zfs
2014-08-18 15:21:08 UTC
Permalink
If I were to suggest anything it might be that a convenient feature would
be an implicit restore by creating a link for example to a file/dir in a
snapshot. Basically, if you were to create a link in some place to a file
in a snapshot you could get a read/write clone of that file/directory. This
is by no means a trivial thing to do, but I think this is sort of what you
are asking for, maybe?


On Mon, Aug 18, 2014 at 8:16 AM, Richard Kojedzinszky via illumos-zfs <
Post by Richard Kojedzinszky via illumos-zfs
That is why I asked here, and not on an -fs list. Basically, some ZFS
expert could think about it if it is possible at ZFS
layer to make that link, to make a directory entry pointing to an object
which exists in a snapshot. Of course, this wont be a
POSIX fileop, as a regular hardlink cant be mode cross-device. That is why
I asked here the ZFS guys, developers what do they
think about the problem. For me, with that I dont know much of ZFS, I
think the data structures may allow such an operation.
My question is that would it be hard to implement such functionality or
not?
Regards,
Post by Rich via illumos-zfs
Ignoring any other logistical problems which may exist...
If it were a hardlink, it'd be a read-only file.
What would it mean to have a single read-only file on an otherwise
read-write filesystem?
If you can modify it and the original doesn't change, it's not really
a hardlink.
If you can't modify it, it's not really useful in most cases compared
to just symlinking to the RO copy...
- Rich
On Mon, Aug 18, 2014 at 8:08 AM, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Actually I intentionally wrote just 'ln', and not 'ln -s'. Somehow a
hard-link could be created for that existing file in the snapshot. Would it
need a big change in zfs code, big redesign, or is it possible in theory to
implement it?
Thanks
18 августа 2014 г. 9:03:04 CEST, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry in the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
Post by Schlacta, Christ via illumos-zfs
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
Post by Schlacta, Christ via illumos-zfs
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
If vmware, chances are, re-thinning will be necessary, since
Post by Sam Zaydel via illumos-zfs
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
Post by Richard Kojedzinszky via illumos-zfs
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
We would need to revert only one file of the snapshot.
Post by Richard Kojedzinszky via illumos-zfs
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Kojedzinszky Richard
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Post by Richard Kojedzinszky via illumos-zfs
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Post by Richard Kojedzinszky via illumos-zfs
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/
22820713-4fad4b89
[2]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
[1]
https://www.listbox.com/member/archive/rss/182191/
25402478-0858cafa
[5]
Post by Richard Kojedzinszky via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?&
[3]
Post by Richard Kojedzinszky via illumos-zfs
Powered by Listbox: http://www.listbox.com [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/
24342081-7731472e
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [3]
Powered by Listbox: http://www.listbox.com [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
Post by Schlacta, Christ via illumos-zfs
[3] https://www.listbox.com/member/?&amp;
[4] http://www.listbox.com
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
Post by Schlacta, Christ via illumos-zfs
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
Post by Schlacta, Christ via illumos-zfs
[7] http://www.linkedin.com/in/samzaydel
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
Post by Schlacta, Christ via illumos-zfs
[9]
https://www.listbox.com/member/?&amp;
While the symlink to the snapshot virtual directory might be possible
(usability subject to dataset access rights delegation, see zfs
allow), this would be a read-only file. You might copy it back into
the 'live' dataset (or rather rsync --inplace so as to not waste space
during the 'recovery'), you won't use it well for a live VM. If
dealing with such symlinks, also use zfs hold to keep the snapshot
from disappearing.
Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/
25402478-0858cafa
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/
24342081-7731472e
Modify Your Subscription: https://www.listbox.com/
member/?&
Powered by Listbox: http://www.listbox.com
--
Join the geek side, we have π!

Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Richard Kojedzinszky via illumos-zfs
2014-08-18 15:26:04 UTC
Permalink
I was asking exactly for what you've written. Thanks god one actually
understood my original question, this is due to my poor english. I would
like to know from some ZFS developer if it is possible at all with the
current on-disk structures.

Regards,
Post by Sam Zaydel via illumos-zfs
If I were to suggest anything it might be that a convenient feature
would be an implicit restore by creating a link for example to a
file/dir in a snapshot. Basically, if you were to create a link in
some place to a file in a snapshot you could get a read/write clone of
that file/directory. This is by no means a trivial thing to do, but I
think this is sort of what you are asking for, maybe?
On Mon, Aug 18, 2014 at 8:16 AM, Richard Kojedzinszky via illumos-zfs
Post by Richard Kojedzinszky via illumos-zfs
That is why I asked here, and not on an -fs list. Basically, some
ZFS expert could think about it if it is possible at ZFS
layer to make that link, to make a directory entry pointing to an
object which exists in a snapshot. Of course, this wont be a
POSIX fileop, as a regular hardlink cant be mode cross-device. That
is why I asked here the ZFS guys, developers what do they
think about the problem. For me, with that I dont know much of ZFS,
I think the data structures may allow such an operation.
My question is that would it be hard to implement such
functionality or not?
Regards,
Ignoring any other logistical problems which may exist...
If it were a hardlink, it'd be a read-only file.
What would it mean to have a single read-only file on an otherwise
read-write filesystem?
If you can modify it and the original doesn't change, it's not really
a hardlink.
If you can't modify it, it's not really useful in most cases
compared
to just symlinking to the RO copy...
- Rich
On Mon, Aug 18, 2014 at 8:08 AM, Richard Kojedzinszky via
illumos-zfs
Actually I intentionally wrote just 'ln', and not 'ln -s'. Somehow a
hard-link could be created for that existing file in the snapshot. Would it
need a big change in zfs code, big redesign, or is it possible in theory to
implement it?
Thanks
18 августа 2014 г. 9:03:04 CEST, Richard Kojedzinszky via illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our
dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry
in
the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Kojedzinszky Richard
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Post by Richard Kojedzinszky via illumos-zfs
Could this feature be implemented in ZFS?
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[6]
Post by Richard Kojedzinszky via illumos-zfs
[2]
Modify Your Subscription: https://www.listbox.com/member/?& [2]
[3]
Post by Richard Kojedzinszky via illumos-zfs
Powered by Listbox: http://www.listbox.com [3] [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
Post by Richard Kojedzinszky via illumos-zfs
[5]
Modify Your Subscription: https://www.listbox.com/member/?& [2]
[3]
Post by Richard Kojedzinszky via illumos-zfs
Powered by Listbox: http://www.listbox.com [3] [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1] [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[8]
Post by Richard Kojedzinszky via illumos-zfs
[6]
Modify Your Subscription: https://www.listbox.com/member/?& [2] [3]
Powered by Listbox: http://www.listbox.com [3] [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [5] [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now [1]
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[6]
Post by Richard Kojedzinszky via illumos-zfs
[3] https://www.listbox.com/member/?&amp [4];
[4] http://www.listbox.com [3]
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
Post by Richard Kojedzinszky via illumos-zfs
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[8]
Post by Richard Kojedzinszky via illumos-zfs
[7] http://www.linkedin.com/in/samzaydel [5]
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
[9]
Post by Richard Kojedzinszky via illumos-zfs
[9]
https://www.listbox.com/member/?&amp [4];
While the symlink to the snapshot virtual directory might be possible
(usability subject to dataset access rights delegation, see zfs
allow), this would be a read-only file. You might copy it back into
the 'live' dataset (or rather rsync --inplace so as to not waste space
during the 'recovery'), you won't use it well for a live VM. If
dealing with such symlinks, also use zfs hold to keep the snapshot
from disappearing.
Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
[10]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[8]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [5]
ILLUMOS-ZFS | Archives [1] [7] | Modify [11] Your Subscription [3]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2] https://www.listbox.com/member/?&amp;
[3] http://www.listbox.com
[4] https://www.listbox.com/member/?&amp;amp
[5] http://www.linkedin.com/in/samzaydel
[6] https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[7] https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[8] https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[9] https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
[10]
https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
[11]
https://www.listbox.com/member/?&
--
Richard Kojedzinszky
Sam Zaydel via illumos-zfs
2014-08-18 17:55:22 UTC
Permalink
I think hardest part will be making it a clone, i.e. only updating changed
bits, but leaving original bits intact. Assuming all this is implementable
the most pressing issue with this will be fact that you now have a snapshot
that is not removable because of one file. So, imagine you do this
routinely with several snapshots, now you locked them, just as you would
when you create a clone until such time that you promote that clone. But,
this may be a lot less trivial when there is only file to worry about, and
you cannot do things like promotions, etc. Now, you have to implement a
mechanism to allow for snapshot removal, i.e. partial removal of snapshots,
potentially, which I think gets into a HAIRY territory and my head starts
to hurt when I think about it as an admin. :)
Post by Richard Kojedzinszky via illumos-zfs
I was asking exactly for what you've written. Thanks god one actually
understood my original question, this is due to my poor english. I would
like to know from some ZFS developer if it is possible at all with the
current on-disk structures.
Regards,
Post by Sam Zaydel via illumos-zfs
If I were to suggest anything it might be that a convenient feature
would be an implicit restore by creating a link for example to a
file/dir in a snapshot. Basically, if you were to create a link in
some place to a file in a snapshot you could get a read/write clone of
that file/directory. This is by no means a trivial thing to do, but I
think this is sort of what you are asking for, maybe?
On Mon, Aug 18, 2014 at 8:16 AM, Richard Kojedzinszky via illumos-zfs
That is why I asked here, and not on an -fs list. Basically, some
Post by Richard Kojedzinszky via illumos-zfs
ZFS expert could think about it if it is possible at ZFS
layer to make that link, to make a directory entry pointing to an
object which exists in a snapshot. Of course, this wont be a
POSIX fileop, as a regular hardlink cant be mode cross-device. That
is why I asked here the ZFS guys, developers what do they
think about the problem. For me, with that I dont know much of ZFS,
I think the data structures may allow such an operation.
My question is that would it be hard to implement such
functionality or not?
Regards,
Ignoring any other logistical problems which may exist...
If it were a hardlink, it'd be a read-only file.
What would it mean to have a single read-only file on an otherwise
read-write filesystem?
If you can modify it and the original doesn't change, it's not really
a hardlink.
If you can't modify it, it's not really useful in most cases
compared
to just symlinking to the RO copy...
- Rich
On Mon, Aug 18, 2014 at 8:08 AM, Richard Kojedzinszky via
illumos-zfs
Actually I intentionally wrote just 'ln', and not 'ln -s'. Somehow a
hard-link could be created for that existing file in the snapshot. Would it
need a big change in zfs code, big redesign, or is it possible in theory to
implement it?
Thanks
18 августа 2014 г. 9:03:04 CEST, Richard Kojedzinszky via
illumos-zfs
Dear all,
Thanks for the comments. Actually, we have lz4 enabled on our dataset,
so zfs will make the holes holes again when copying the data back.
The original question is more about theory, the original file was also
on the dataset which the snapshot was taken of, so basically a
# ln .zfs/snapshot/snap/file ./file
like operation could be accomplished somehow, or is it more complex to
achieve? I dont know zfs internals, but this could be a new entry
in
the
dir pointing to the same file (object) in the dataset which existed
before.
Regards,
This is why I use qcow2 :(
Okay, so setting any compression should compress 0 blocks to take no
actual space.
If the files are sparse, Linux cp has efficient handling of sparse files.
If VMware isn't using either files with a dynamic size by default, or
sparse files at a bare minimum, please for a bug report with
upstream.
On Aug 17, 2014 2:46 PM, "Sam Zaydel via illumos-zfs"
If vmware, chances are, re-thinning will be necessary, since
recovering VM from snapshot will cause it to take up entire amount
of disk originally allocated, assuming it was thin provisioned of
course.
On Sun, Aug 17, 2014 at 12:03 PM, Richard Elling via illumos-zfs
On Aug 17, 2014, at 11:24 AM, Richard Kojedzinszky
I've forget to mention that weh have all images on a single
dataset, so clone/promote to an older snapshot is not reasonable.
I'm sure by now you realize the folly of this decision :-) But
perhaps you are running vmware where such configs
are more common.
We would need to revert only one file of the snapshot.
Any ideas?
clone still works, just point the one VM at the clone.
-- richard
Kojedzinszky Richard
On Aug 17, 2014, at 2:05 AM, "Richard Kojedzinszky via
Dear ZFS devs,
Post by Richard Kojedzinszky via illumos-zfs
We have a simple VPS hosting setup, where a ZFS dataset is
exported to NFS, hosting the VM's images. This dataset is being
snapshotted regularly. Demand has come to recover only one VM's
image: I mounted the snapshot, then copied the file from snapshot
over its original place. I dont know, but in theory would it be
possible with a simple zfs command to just make a link somehow to
the file in the snapshot at the original place? That way the
recovery would be very fast, there would be no need to read the
whole file (which can be full of holes), etc.
Could this feature be implemented in ZFS?
Post by Richard Kojedzinszky via illumos-zfs
see clone
-- richard
Regards,
Kojedzinszky Richard
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
[1]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[6]
[2]
Post by Richard Kojedzinszky via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?& [2]
[3]
Powered by Listbox: http://www.listbox.com [3] [4]
Post by Richard Kojedzinszky via illumos-zfs
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
[1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
[5]
Post by Richard Kojedzinszky via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?& [2]
[3]
Powered by Listbox: http://www.listbox.com [3] [4]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1] [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[8]
[6]
Post by Richard Kojedzinszky via illumos-zfs
Modify Your Subscription: https://www.listbox.com/member/?& [2] [3]
Powered by Listbox: http://www.listbox.com [3] [4]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [5] [7]
ILLUMOS-ZFS | Archives [1] [8] | Modify [9] Your Subscription [4]
------
[1] https://www.listbox.com/member/archive/182191/=now [1]
[2]
https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[6]
[3] https://www.listbox.com/member/?&amp [4];
Post by Richard Kojedzinszky via illumos-zfs
[4] http://www.listbox.com [3]
[5]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
[6]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[8]
[7] http://www.linkedin.com/in/samzaydel [5]
Post by Richard Kojedzinszky via illumos-zfs
[8]
https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
[9]
[9]
Post by Richard Kojedzinszky via illumos-zfs
https://www.listbox.com/member/?&amp [4];
While the symlink to the snapshot virtual directory might be possible
(usability subject to dataset access rights delegation, see zfs
allow), this would be a read-only file. You might copy it back into
the 'live' dataset (or rather rsync --inplace so as to not waste space
during the 'recovery'), you won't use it well for a live VM. If
dealing with such symlinks, also use zfs hold to keep the snapshot
from disappearing.
Hth,
//Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
[10]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[7]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
--
Richard Kojedzinszky
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now [1]
https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[8]
https://www.listbox.com/member/?& [2]
Powered by Listbox: http://www.listbox.com [3]
--
Join the geek side, we have π!
Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel [5]
ILLUMOS-ZFS | Archives [1] [7] | Modify [11] Your Subscription [3]
------
[1] https://www.listbox.com/member/archive/182191/=now
[2] https://www.listbox.com/member/?&amp;
[3] http://www.listbox.com
[4] https://www.listbox.com/member/?&amp;amp
<https://www.listbox.com/member/?&amp>
[5] http://www.linkedin.com/in/samzaydel
[6] https://www.listbox.com/member/archive/rss/182191/22820713-4fad4b89
[7] https://www.listbox.com/member/archive/rss/182191/25402478-0858cafa
[8] https://www.listbox.com/member/archive/rss/182191/24342081-7731472e
[9] https://www.listbox.com/member/archive/rss/182191/23054485-60ad043a
[10] https://www.listbox.com/member/archive/rss/182191/24536931-5d25148d
[11]
https://www.listbox.com/member/?&id_
secret=25402478-a0052abc
--
Richard Kojedzinszky
--
Join the geek side, we have π!

Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Stefan Ring via illumos-zfs
2014-08-19 15:12:51 UTC
Permalink
On Mon, Aug 18, 2014 at 7:55 PM, Sam Zaydel via illumos-zfs
I think hardest part will be making it a clone, i.e. only updating changed bits, but leaving original bits intact. Assuming all this is implementable the most pressing issue with this will be fact that you now have a snapshot that is not removable because of one file. So, imagine you do this routinely with several snapshots, now you locked them, just as you would when you create a clone until such time that you promote that clone. But, this may be a lot less trivial when there is only file to worry about, and you cannot do things like promotions, etc. Now, you have to implement a mechanism to allow for snapshot removal, i.e. partial removal of snapshots, potentially, which I think gets into a HAIRY territory and my head starts to hurt when I think about it as an admin. :)
FWIW, btrfs can do just this using cp --reflink.
Richard Elling via illumos-zfs
2014-08-19 16:53:04 UTC
Permalink
If I were to suggest anything it might be that a convenient feature would be an implicit restore by creating a link for example to a file/dir in a snapshot. Basically, if you were to create a link in some place to a file in a snapshot you could get a read/write clone of that file/directory. This is by no means a trivial thing to do, but I think this is sort of what you are asking for, maybe?
Something like:

zfs clone my/***@snapshot my/new-clone
cd /my/vms
rm vm.file
ln -s /my/new-clone/vm.file
drink beer
?

-- richard
Sam Zaydel via illumos-zfs
2014-08-19 17:01:52 UTC
Permalink
I think, unless I am way off, he is asking for a clone of a single file
without having a clone of the entire dataset. `ln -s` in this instance
still does not address the request. As for beer, good idea, I think it is
time for some now!
On Aug 18, 2014, at 8:21 AM, Sam Zaydel via illumos-zfs <
Post by Sam Zaydel via illumos-zfs
If I were to suggest anything it might be that a convenient feature
would be an implicit restore by creating a link for example to a file/dir
in a snapshot. Basically, if you were to create a link in some place to a
file in a snapshot you could get a read/write clone of that file/directory.
This is by no means a trivial thing to do, but I think this is sort of what
you are asking for, maybe?
cd /my/vms
rm vm.file
ln -s /my/new-clone/vm.file
drink beer
?
-- richard
--
Join the geek side, we have π!

Please feel free to connect with me on LinkedIn.
http://www.linkedin.com/in/samzaydel



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Loading...