[OpenIndiana-discuss] CIFS and openindiana

Jim Klimov jimklimov at cos.ru
Fri Jul 12 13:27:05 UTC 2013


On 2013-07-12 06:28, Christopher Chan wrote:
> On Friday, July 12, 2013 11:29 AM, Geoff Nordli wrote:
>> On 13-07-11 07:25 PM, Jim Klimov wrote:
>>> On a side note, you can always make ZFS snapshots via filesystem
>>> interface "mkdir $dataset/.zfs/snapshot/$snapname" over both NFS
>>> and CIFS (at least kCIFS) as well as locally, as long as your user
>>> has proper ZFS delegated permissions. Removing is trickier, since
>>> tools insist on only deleting empty directories, and somehow they
>>> fail to delete contents of a read-only snapshot... bummer ;)

>> That is very cool Jim, I didn't know I could create a snapshot that way.

> Time to rewrite the scripts. This makes it way easier to manage
> snapshots when you have over 2k snapshot per dataset. I've already
> resorted to referencing one dataset's snapshots with ls since zfs list
> takes forever. Thanks for letting us know about this. zfs just got even
> better.

You are both welcome :)
In fact, this trick I used in vboxsvc to create pre-start/post-stop
snapshots of filesystem datasets which hold the VM image/cfg files,
so that it can work seamlessly with local and NFS storage of VMs,
as well as to just detect if a directory is in fact a ZFS dataset.

On a side note, listing is indeed probably faster - for a single
dataset. If you need to iterate (i.e. delete old zfs-auto-snap's
in a tree) then "zfs list" is still easier to use for me. And the 
removal of snapshots is also AFAIK only doable by "zfs destroy"
locally on the storage box...

//Jim




More information about the OpenIndiana-discuss mailing list