VSS Software provider

I read from the msdn doc that a software provider are implemented as a combination of
user mode dll and a filter driver.
from msdn:

“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.”

so is this storage filter driver a WDM driver and the user mode DLL component is a
win32 application…

or the provider itself is a kernel mode component…

I think I have posted it wrongly.
I dont think that the application wil be a win32 applictaion.It is app which uses COM interfaces provided by Microsoft.
Also I need to know whether a sofware provider can just be user mode component ie without a kernel mode driver…

what function does the kernel mode driver do…(basically use cases)???

> "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

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

Here is a link to the Volume Shadow Copy Service SDK 7.2. Get it if you
don’t have it already.

http://www.microsoft.com/downloads/details.aspx?FamilyID=0B4F56E4-0CCC-4626-
826A-ED2C4C95C871&displaylang=en

-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

> 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).

Only 1 SW VSS provider from MS - swprv.dll+volsnap.sys

Manages both Dynamic and Basic disks.

You have mixed VSS with VDS, where there are really 2 providers as you described.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Yes I have, sorry for the confusion. VSS has a single “software” hardware provider and then a few writers which are the gizmos that applications use to participate the quiescing of the file system during the shadow-copy process.

-Robert.

On Jun 7, 2010, at 12:55 PM, Maxim S. Shatskih wrote:

> 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).

Only 1 SW VSS provider from MS - swprv.dll+volsnap.sys

Manages both Dynamic and Basic disks.

You have mixed VSS with VDS, where there are really 2 providers as you described.


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

>VSS has a single “software” hardware provider

First of all, many thanks to you on great description of VSS for beginners, it is really valuable.

For now, I just correct the minor errors in it.

For instance, IIRC hardware VSS providers work with physical disks/LUNs, and snap the physical disk as a whole. I don’t remember how the snapshot of the HW VSS provider is exposed, probably by \.\PhysicalDrive%d or such.

IIRC software VSS providers work with volumes, drive letters, snap on per-volume basis, and snapshots are exposed using some device names.

SwPrv+VolSnap is software VSS provider.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> The sample code is not great (I wouldn’t use it as a basis for your provider)

Would you please share your experience about why the sample code is not great? I am considering to use sample code as code base for my first hw provider.

Thanks
Wayne

I would also like to hear from Robert about the issues he saw with the h/w
provider sample that comes with VSS SDK. For me it worked good and I also
used it as the code base some 2 years back and don’t remember facing any
problems.

On Mon, Jun 7, 2010 at 10:02 PM, Wayne Gong wrote:

> > The sample code is not great (I wouldn’t use it as a basis for your
> provider)
>
> Would you please share your experience about why the sample code is not
> great? I am considering to use sample code as code base for my first hw
> provider.
>
> Thanks
> Wayne
>
> —
> 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
>

The answer, as usual, is “it depends”. I found the sample to be big, cluttered, and naive in several circumstances. It has been a few years since I wrote one of these so I would need to go back and look at the code for specific issues. If you hardware device lends itself well to what is there then I wish you well. I managed to accomplish the task using much less code while paying much more attention to safety issues. The original authors grasp of STL features was a bit simplistic. If it works for you, great! But watch out for incomplete features and bugs. I recall finding several of each.

-Robert.

On Jun 8, 2010, at 12:00 AM, Tapan Chaudhari wrote:

I would also like to hear from Robert about the issues he saw with the h/w provider sample that comes with VSS SDK. For me it worked good and I also used it as the code base some 2 years back and don’t remember facing any problems.

On Mon, Jun 7, 2010 at 10:02 PM, Wayne Gong wrote:
> > The sample code is not great (I wouldn’t use it as a basis for your provider)
>
> Would you please share your experience about why the sample code is not great? I am considering to use sample code as code base for my first hw provider.
>
> Thanks
> Wayne
>
> —
> 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
>
> — 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

maxim, robert,

many thanks for patiently explaining all this to us. you cannot
imagine how much I gained from this thread.

i dont intend to hijack the original poster’s thread, but since this
has become such a wonderful resource for the future OPs I post my qn
here…

  1. max, u say hw based providers usually snap the whole disc. that
    makes sense as the hw doesnt understand logical partitions. so can
    there be any exceptions to this? is there any snapshot provider that
    can do a hardware snap of a logical volume(sounds crazy already as i
    type it)

  2. when u use vss to do a hw snapshot, is it still on logical vols or
    entire disc, volsnap basically being a vol filter, this qn pops to my
    mind…

thanks

ab

On 6/8/10, Maxim S. Shatskih wrote:
>>VSS has a single “software” hardware provider
>
> First of all, many thanks to you on great description of VSS for beginners,
> it is really valuable.
>
> For now, I just correct the minor errors in it.
>
> For instance, IIRC hardware VSS providers work with physical disks/LUNs, and
> snap the physical disk as a whole. I don’t remember how the snapshot of the
> HW VSS provider is exposed, probably by \.\PhysicalDrive%d or such.
>
> IIRC software VSS providers work with volumes, drive letters, snap on
> per-volume basis, and snapshots are exposed using some device names.
>
> SwPrv+VolSnap is software VSS provider.
>
> –
> 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
>



- amitr0

If I recall correctly the VSS hardware provider receives a set of disk
devices to ‘snap’. While the VSS service and other components
understand the volume level a hardware provider is not expected to
handle translation from volume to disk device.

Go here for the overview.

http://msdn.microsoft.com/en-us/library/aa384623(v=VS.85).aspx

Robert.

On Wed, Jun 9, 2010 at 1:09 PM, amitr0 wrote:
> maxim, robert,
>
> many thanks for patiently explaining all this to us. you cannot
> imagine how much I gained from this thread.
>
> i dont intend to hijack the original poster’s thread, but since this
> has become such a wonderful resource for the future OPs I post my qn
> here…
>
> 1. max, u say hw based providers usually snap the whole disc. that
> makes sense as the hw doesnt understand logical partitions. so can
> there be any exceptions to this? is there any snapshot provider that
> can do a hardware snap of a logical volume(sounds crazy already as i
> type it)
>
> 2. when u use vss to do a hw snapshot, is it still on logical vols or
> entire disc, volsnap basically being a vol filter, this qn pops to my
> mind…
>
> thanks
>
> ab
>
> On 6/8/10, Maxim S. Shatskih wrote:
>>>VSS has a single “software” hardware provider
>>
>> First of all, many thanks to you on great description of VSS for beginners,
>> it is really valuable.
>>
>> For now, I just correct the minor errors in it.
>>
>> For instance, IIRC hardware VSS providers work with physical disks/LUNs, and
>> snap the physical disk as a whole. I don’t remember how the snapshot of the
>> HW VSS provider is exposed, probably by \.\PhysicalDrive%d or such.
>>
>> IIRC software VSS providers work with volumes, drive letters, snap on
>> per-volume basis, and snapshots are exposed using some device names.
>>
>> SwPrv+VolSnap is software VSS provider.
>>
>> –
>> 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
>>
>
>
> –
>
> - amitr0
>
> —
> 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
>


Robert Randall | xxxxx@gmail.com

> 1. max, u say hw based providers usually snap the whole disc.

I think that they only can snap the whole disk, since the API is such.

makes sense as the hw doesnt understand logical partitions. so can
there be any exceptions to this?

Write a SW prov which will talk to hardware.

  1. when u use vss to do a hw snapshot, is it still on logical vols or
    entire disc

I think - as provider wants.

, volsnap basically being a vol filter

Yes, but it is only used for the default MS’s provider.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com