Re: special name for vss shadow copy device?

2009-02-26 Thread Corinna Vinschen
On Feb 26 10:10, Corinna Vinschen wrote:
> On Feb 25 19:20, Greg Freemyer wrote:
> > On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin)
> >  wrote:
> > > Greg Freemyer wrote:
> > > 
> > >
> > >> Time to experiment with Cygwin 1.7
> > >>
> > >> I know the whole package is still considered test.  How stable is the
> > >> actual dll(s).  Especially as relates to this type of functionality.
> 
> The DLL is quite stable but there are certainly some bugs as well.
> 
> > I tried the "dosdev" trick from one of the links to mount the snapshot
> > as V:.  Apparently that is a XP only trick.  Or at least Vista does
> > not have it.

Here's how it does NOT work:

  $ dosdev 'V:' '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21'
  $ mount
  [...]
  C: on /cygdrive/c type ntfs ...
  $

  The reason is that the path the drive points to has to be a native NT
  path.  The path containg the GLOBALROOT is a long Win32 path name which
  is invalid in this case.  However, the dosdev functionality is nothing
  but creating a symbolic link in the native NT namespace and the target
  of such a symlink can be anything which can be expressed in a 64K buffer.

Here is how it works:

  $ dosdev 'V:' '\Device\HarddiskVolumeShadowCopy21'
  $ mount
  [...]
  C: on /cygdrive/c type ntfs ...
  V: on /cygdrive/v type ntfs ...

  What you have to do is to create a native NT symlink which points
  to the actual native NT device name which is as shown above, just
  \Device\HarddiskVolumeShadowCopy21.

  That works like a champ on Cygwin and in Windows Explorer on Vista.

Btw., I'm using my own crude dosdev:

==
#include 
#include 

int
main (int argc, char **argv)
{
  DWORD flags = 0;

  if (argc < 2)
{
  fprintf (stderr, "usage: %s DosDevice [NTDevice]\n", argv[0]);
  return 1;
}
  if (argc == 2)
flags = DDD_REMOVE_DEFINITION;
  else
flags = DDD_RAW_TARGET_PATH;
  if (!DefineDosDevice (flags, argv[1], argc == 2 ? NULL : argv[2]))
{
  fprintf (stderr, "Error %d\n", GetLastError ());
  return 1;
}
  return 0;
}
==

$ gcc -o mydosdev mydosdev.c
$ # Create the dos link
$ ./mydosdev 'V:' '\Device\HarddiskVolumeShadowCopy21'
$ # Remove it
$ ./mydosdev 'V:'   


HTH,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-26 Thread Corinna Vinschen
On Feb 25 19:20, Greg Freemyer wrote:
> On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin)
>  wrote:
> > Greg Freemyer wrote:
> > 
> >
> >> Time to experiment with Cygwin 1.7
> >>
> >> I know the whole package is still considered test.  How stable is the
> >> actual dll(s).  Especially as relates to this type of functionality.

The DLL is quite stable but there are certainly some bugs as well.

> I tried the "dosdev" trick from one of the links to mount the snapshot
> as V:.  Apparently that is a XP only trick.  Or at least Vista does
> not have it.
> 
> From the Vista command prompt I can do:
> mklink /d C:\shadow_copy21 \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21\
> 
> and then cd into that directory and see my old snapshot data.  I can
> also see it from the Vista file explorer.
> 
> From cygwin's shell if I try to do so I get:
> $ cd /cygdrive/c/shadow_copy21
> bash: cd: /cygdrive/c/shadow_copy21: No such file or directory

If the path really exists on the native NT level, that should work.
If it's just faked one way or another, Cygwin has no way to use that
path.  I never tried anything with VSS.  I'll have a look what happens
on my Vista machine.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Larry Hall (Cygwin)

Greg Freemyer wrote:

On Wed, Feb 25, 2009 at 8:44 PM, Larry Hall (Cygwin)
 wrote:

Greg Freemyer wrote:

On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin)
 wrote:

Greg Freemyer wrote:



Time to experiment with Cygwin 1.7

I know the whole package is still considered test.  How stable is the
actual dll(s).  Especially as relates to this type of functionality.

Difficult to say since this functionality isn't on a typical use path
and no specific efforts have been made to 'integrate' it into Cygwin,
whatever form that integration might take.  What is clear, however, is if
there is a problem using this functionality in 1.7, now would be the time
to find out.  Since the 1.7 DLL is near its final form for release, any
hope of fixing problems before the release requires that they be found
first.

Okay,  (trouble report, see the end of the email.  Successes first :)

I've got the latest 1.7 release.  I'm testing right now on Vista Home.

Just as an FYI, this machine has 32 snapshots in place.  Going back to
Thanksgiving.  All of these were created automatically by Vista.  I
don't think I did any config work etc. to make it happen.

I can see these from the Vista Command Prompt by running "vssadmin
list shadows".

Very cool.

dd seems to be working great, but I've only done a couple quick tests.

dd if= | od -cv | less

is showing what looks like good data.

I tried the same with snapshot instance 33.  As hoped dd came back
with an error message since that snapshot does not exist.

I currently have 5 dd's running against 5 different snapshots and the
output going to /dev/null.Per task manager all are actively
reading data.  Very cool.  They are reading very slowly, but then
again I'm beating the heck out of the drive.

I tried the "dosdev" trick from one of the links to mount the snapshot
as V:.  Apparently that is a XP only trick.  Or at least Vista does
not have it.

From the Vista command prompt I can do:
mklink /d C:\shadow_copy21
\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21\

and then cd into that directory and see my old snapshot data.  I can
also see it from the Vista file explorer.

From cygwin's shell if I try to do so I get:
$ cd /cygdrive/c/shadow_copy21
bash: cd: /cygdrive/c/shadow_copy21: No such file or directory

I assume that should work?

Dunno.  I can't get the 'cd' or 'dir' to work from the Vista command
prompt.  For me, 'dir foo' (I named the link 'foo') gives me 'File Not
Found'.  So in my case, what you see from Cygwin makes sense since it's
consistent with what Windows tells me.


Very strange mklink created usable directories for me on both Vista
Home and Win 2008.  Can you or someone else test it on another
machine?


Sorry.  Fresh out of Vista machines (sniff ;-))

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Greg Freemyer
On Wed, Feb 25, 2009 at 8:44 PM, Larry Hall (Cygwin)
 wrote:
> Greg Freemyer wrote:
>>
>> On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin)
>>  wrote:
>>>
>>> Greg Freemyer wrote:
>>> 
>>>
 Time to experiment with Cygwin 1.7

 I know the whole package is still considered test.  How stable is the
 actual dll(s).  Especially as relates to this type of functionality.
>>>
>>> Difficult to say since this functionality isn't on a typical use path
>>> and no specific efforts have been made to 'integrate' it into Cygwin,
>>> whatever form that integration might take.  What is clear, however, is if
>>> there is a problem using this functionality in 1.7, now would be the time
>>> to find out.  Since the 1.7 DLL is near its final form for release, any
>>> hope of fixing problems before the release requires that they be found
>>> first.
>>
>> Okay,  (trouble report, see the end of the email.  Successes first :)
>>
>> I've got the latest 1.7 release.  I'm testing right now on Vista Home.
>>
>> Just as an FYI, this machine has 32 snapshots in place.  Going back to
>> Thanksgiving.  All of these were created automatically by Vista.  I
>> don't think I did any config work etc. to make it happen.
>>
>> I can see these from the Vista Command Prompt by running "vssadmin
>> list shadows".
>>
>> Very cool.
>>
>> dd seems to be working great, but I've only done a couple quick tests.
>>
>> dd if= | od -cv | less
>>
>> is showing what looks like good data.
>>
>> I tried the same with snapshot instance 33.  As hoped dd came back
>> with an error message since that snapshot does not exist.
>>
>> I currently have 5 dd's running against 5 different snapshots and the
>> output going to /dev/null.    Per task manager all are actively
>> reading data.  Very cool.  They are reading very slowly, but then
>> again I'm beating the heck out of the drive.
>>
>> I tried the "dosdev" trick from one of the links to mount the snapshot
>> as V:.  Apparently that is a XP only trick.  Or at least Vista does
>> not have it.
>>
>> From the Vista command prompt I can do:
>> mklink /d C:\shadow_copy21
>> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21\
>>
>> and then cd into that directory and see my old snapshot data.  I can
>> also see it from the Vista file explorer.
>>
>> From cygwin's shell if I try to do so I get:
>> $ cd /cygdrive/c/shadow_copy21
>> bash: cd: /cygdrive/c/shadow_copy21: No such file or directory
>>
>> I assume that should work?
>
> Dunno.  I can't get the 'cd' or 'dir' to work from the Vista command
> prompt.  For me, 'dir foo' (I named the link 'foo') gives me 'File Not
> Found'.  So in my case, what you see from Cygwin makes sense since it's
> consistent with what Windows tells me.

Very strange mklink created usable directories for me on both Vista
Home and Win 2008.  Can you or someone else test it on another
machine?

ie. Cygwin need not be installed to test this Windows feature.

Greg
-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Larry Hall (Cygwin)

Greg Freemyer wrote:

On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin)
 wrote:

Greg Freemyer wrote:



Time to experiment with Cygwin 1.7

I know the whole package is still considered test.  How stable is the
actual dll(s).  Especially as relates to this type of functionality.

Difficult to say since this functionality isn't on a typical use path
and no specific efforts have been made to 'integrate' it into Cygwin,
whatever form that integration might take.  What is clear, however, is if
there is a problem using this functionality in 1.7, now would be the time
to find out.  Since the 1.7 DLL is near its final form for release, any
hope of fixing problems before the release requires that they be found
first.


Okay,  (trouble report, see the end of the email.  Successes first :)

I've got the latest 1.7 release.  I'm testing right now on Vista Home.

Just as an FYI, this machine has 32 snapshots in place.  Going back to
Thanksgiving.  All of these were created automatically by Vista.  I
don't think I did any config work etc. to make it happen.

I can see these from the Vista Command Prompt by running "vssadmin
list shadows".

Very cool.

dd seems to be working great, but I've only done a couple quick tests.

dd if= | od -cv | less

is showing what looks like good data.

I tried the same with snapshot instance 33.  As hoped dd came back
with an error message since that snapshot does not exist.

I currently have 5 dd's running against 5 different snapshots and the
output going to /dev/null.Per task manager all are actively
reading data.  Very cool.  They are reading very slowly, but then
again I'm beating the heck out of the drive.

I tried the "dosdev" trick from one of the links to mount the snapshot
as V:.  Apparently that is a XP only trick.  Or at least Vista does
not have it.

From the Vista command prompt I can do:
mklink /d C:\shadow_copy21 \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21\

and then cd into that directory and see my old snapshot data.  I can
also see it from the Vista file explorer.

From cygwin's shell if I try to do so I get:
$ cd /cygdrive/c/shadow_copy21
bash: cd: /cygdrive/c/shadow_copy21: No such file or directory

I assume that should work?


Dunno.  I can't get the 'cd' or 'dir' to work from the Vista command
prompt.  For me, 'dir foo' (I named the link 'foo') gives me 'File Not
Found'.  So in my case, what you see from Cygwin makes sense since it's
consistent with what Windows tells me.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Greg Freemyer
On Wed, Feb 25, 2009 at 6:01 PM, Larry Hall (Cygwin)
 wrote:
> Greg Freemyer wrote:
> 
>
>> Time to experiment with Cygwin 1.7
>>
>> I know the whole package is still considered test.  How stable is the
>> actual dll(s).  Especially as relates to this type of functionality.
>
> Difficult to say since this functionality isn't on a typical use path
> and no specific efforts have been made to 'integrate' it into Cygwin,
> whatever form that integration might take.  What is clear, however, is if
> there is a problem using this functionality in 1.7, now would be the time
> to find out.  Since the 1.7 DLL is near its final form for release, any
> hope of fixing problems before the release requires that they be found
> first.

Okay,  (trouble report, see the end of the email.  Successes first :)

I've got the latest 1.7 release.  I'm testing right now on Vista Home.

Just as an FYI, this machine has 32 snapshots in place.  Going back to
Thanksgiving.  All of these were created automatically by Vista.  I
don't think I did any config work etc. to make it happen.

I can see these from the Vista Command Prompt by running "vssadmin
list shadows".

Very cool.

dd seems to be working great, but I've only done a couple quick tests.

dd if= | od -cv | less

is showing what looks like good data.

I tried the same with snapshot instance 33.  As hoped dd came back
with an error message since that snapshot does not exist.

I currently have 5 dd's running against 5 different snapshots and the
output going to /dev/null.Per task manager all are actively
reading data.  Very cool.  They are reading very slowly, but then
again I'm beating the heck out of the drive.

I tried the "dosdev" trick from one of the links to mount the snapshot
as V:.  Apparently that is a XP only trick.  Or at least Vista does
not have it.

From the Vista command prompt I can do:
mklink /d C:\shadow_copy21 \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy21\

and then cd into that directory and see my old snapshot data.  I can
also see it from the Vista file explorer.

From cygwin's shell if I try to do so I get:
$ cd /cygdrive/c/shadow_copy21
bash: cd: /cygdrive/c/shadow_copy21: No such file or directory

I assume that should work?

Thanks
Greg
-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Larry Hall (Cygwin)

Greg Freemyer wrote:



Time to experiment with Cygwin 1.7

I know the whole package is still considered test.  How stable is the
actual dll(s).  Especially as relates to this type of functionality.


Difficult to say since this functionality isn't on a typical use path
and no specific efforts have been made to 'integrate' it into Cygwin,
whatever form that integration might take.  What is clear, however, is if
there is a problem using this functionality in 1.7, now would be the time
to find out.  Since the 1.7 DLL is near its final form for release, any
hope of fixing problems before the release requires that they be found
first.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Greg Freemyer
On Wed, Feb 25, 2009 at 1:57 PM, Christian Franke
 wrote:
> Greg Freemyer wrote:
>>
>> ...
>> My personal desire is make a full dd copy of a snapshot onto a external
>> drive.
>>
>> ie. dd if=/dev/sd-shadowcopy4 of=
>>
>>
>
> With new Cygwin 1.7, the VSS volume image can be retrieved as follows:
>
> dd if='//?/GLOBALROOT/Device/HarddiskVolumeShadowCopy4' of=...
>
> But this does not work with Cygwin 1.5.
>
>
> To access individual files, assign a drive letter X: to the VSS volume:
>
> http://blogs.msdn.com/adioltean/archive/2006/09/18/761515.aspx
> http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx
>
> Then you can access the files via /cygdrive/x. This works with cygwin 1.5
> also. Only the WinXP explorer refuses to access the drive.
>
> See also related discussion here:
> http://cygwin.com/ml/cygwin/2008-11/msg00070.html
>
> Hope this helps,

Wonderful links and information!!

That is all I really needed, since I assume 1.5 is basically no longer
being developed, I don't see a big need to create mappings for the
shadow volumes.  I do think it would be good to have the above links
and documentation added to the special names section of the
documentation.

Time to experiment with Cygwin 1.7

I know the whole package is still considered test.  How stable is the
actual dll(s).  Especially as relates to this type of functionality.

Thanks
Greg
-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Christian Franke

Greg Freemyer wrote:

...
My personal desire is make a full dd copy of a snapshot onto a external drive.

ie. dd if=/dev/sd-shadowcopy4 of=

  


With new Cygwin 1.7, the VSS volume image can be retrieved as follows:

dd if='//?/GLOBALROOT/Device/HarddiskVolumeShadowCopy4' of=...

But this does not work with Cygwin 1.5.


To access individual files, assign a drive letter X: to the VSS volume:

http://blogs.msdn.com/adioltean/archive/2006/09/18/761515.aspx
http://blogs.msdn.com/adioltean/archive/2005/01/20/357836.aspx

Then you can access the files via /cygdrive/x. This works with cygwin 
1.5 also. Only the WinXP explorer refuses to access the drive.


See also related discussion here:
http://cygwin.com/ml/cygwin/2008-11/msg00070.html

Hope this helps,
Christian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: special name for vss shadow copy device?

2009-02-25 Thread Corinna Vinschen
On Feb 24 15:42, Greg Freemyer wrote:
> All,
> 
> I'm familiar with http://www.cygwin.com/cygwin-ug-net/using-specialnames.html
> 
> But it only shows the \device\hardisk mappings.
> 
> Are there also mapppings for the shadow devices.
> (http://en.wikipedia.org/wiki/Shadow_Copy)
> 
> ie.
> \Device\HarddiskVolumeShadowCopy4
> or
> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4

Sorry, there's no Cygwin device associated with volume shadow copies so
far.  There are no plans to add them, but if they can be simply mapped
to raw disk devices, we can certainly talk about adding a matching
device (/dev/svX or something).  As usual http://cygwin.com/acronyms/#PTC.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/