[OpenIndiana-discuss] CIFS and openindiana

Christopher Chan christopher.chan at bradbury.edu.hk
Sun Jul 14 09:16:21 UTC 2013


On Friday, July 12, 2013 09:27 PM, Jim Klimov wrote:
> 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...

Er...nothing beats "for i in `ls .zfs/snapshot/range`; do zfs delete $i 
; done"

listing takes seconds. zfs list takes minutes. I have almost a dozen 
datasets each with over 1.5k snapshots.



More information about the OpenIndiana-discuss mailing list