How you implement your VSS hardware provider is up to you. The
“suggestions” are just that. If you don’t need a filter driver, don’t use
one. In my experience (I’ve written a few VSS hardware providers) a filter
driver is not needed. A typical VSS hardware provider is mostly a
translation layer for array management commands and mostly provisioning and
health monitoring at that. The VSS hardware provider typically translates
the Microsoft VSS model into the manufacturer’s proprietary management
commands. Those commands might be in-band SCSI commands or out of band TCP,
UDP, SOAP, etc. The filter driver are often used to implement the in-band
SCSI command but they may be implemented in user space as well using SCSI
pass-through IOCTLs.
The DLL may run in-process or out of process. COM does not care as long as
the service is registered properly. Microsoft wisely recommends out of
process. That way if a hardware provider crashes it doesn’t crash the VSS
service. The Volume Shadow-copy Service will be listed in the Services of
the server and it is configured to auto-start as needed (by COM). Microsoft
further recommends that you run your provider as a Windows service.
Installing the provider as a service is a simple way to provide your
customer (end-user) with a footprint. If you provider is not a Windows
service it is difficult to tell it is there at all. The only way end users
can enumerate providers is by using the vssadmin command from a command
prompt.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>vssadmin list providers
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2005 Microsoft Corp.
Provider name: ‘Microsoft Software Shadow Copy provider 1.0’
Provider type: System
Provider Id: {b5946137-7b9f-4925-af80-51abd60b20d5}
Version: 1.0.0.7
C:\Windows\system32>vssadmin
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2005 Microsoft Corp.
---- Commands Supported ----
Delete Shadows - Delete volume shadow copies
List Providers - List registered volume shadow copy providers
List Shadows - List existing volume shadow copies
List ShadowStorage - List volume shadow copy storage associations
List Volumes - List volumes eligible for shadow copies
List Writers - List subscribed volume shadow copy writers
Resize ShadowStorage - Resize a volume shadow copy storage association
C:\Windows\system32>
There are two “Software” hardware provider (sorry for the semantics but
Microsoft created them) one is for managing Dynamic Disks also known as
software based RAID (the old VERITAS stack) the other is for managing Basic
Disks (DOS partition tables, no RAID).
From a VSS client application you can programmatically manage both Dynamic
Disks and Basic Disks. You may also manage the shadow-copies; enumerate
them, mount them on a drive letter or path, etc., essential stuff for
testing your provider.
Keep in mind that VSS came into existence as a means to support a backup of
a host without having to experience any ‘down time’ for the host. So much
of the VSS API maps well to backup and restore tasks.
Microsoft also started using it as a tool similar to the ‘Time Machine’ in
MacOS X. It does the same thing but has a much less ‘user friendly’
interface for desktop or notebook use.
I’ve not looked in a while but there used to be a separate VSS SDK which
included a sample VSS hardware provider. You should review that for
detailed information. The sample code is not great (I wouldn’t use it as a
basis for your provider) but it is a very good tool for understanding what
is really going on in the state machine of VSS. You can learn a lot by
experimenting with it.
Keep the questions coming…
Robert.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-413763-
xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, June 07, 2010 6:34 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] VSS Software provider
> “These providers are implemented as a user-mode DLL component and at
least one kernel-mode
>device driver, typically (but not necessarily) a storage filter
driver.”
I think VSS provider must be an EXE (LocalServer), not a DLL
(InprocServer).
> or the provider itself is a kernel mode component…
It is a COM LocalServer EXE which is called by the VSS service.
Its main difference from the Hardware VSS Provider is that the HW prov
works with physical disks, i.e. LUNs, and creates the snapshots of the
whole physical disk. On the other hand, SW prov creates snapshots of
the volumes (drive letters).
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer