when do disks unload

Hello,

I want to use a usb disk as a mirror of one partition.
For that, I need to make sure that my usb disk will be available as long as
that partition receives write requests.
The main problem is during shutdown.

After making some testing, It found the following shutdown order (In terms
of disk access):

  1. Every disk device receives a shutdown notifications, where after each
    shutdown, there are no further reads/writes.
  2. All disk devices receive a powerdown notification.
  3. Computer shuts down.

My question is: Can I rely on these findings, to know that my usb disk will
be available as long as writes continue to be sent ?

Regards,
Dror.

Yes.
First, all disks receive MJ_SHUTDOWN.
Then the filesystems die, and file accesses from this point (assuming the
FILE_OBJECT or a handle existed before) are failed with STATUS_FILE_CLOSED.
Then all disks receive the MJ_POWER IRPs.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Dror”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Monday, September 27, 2004 10:48 AM
Subject: [ntdev] when do disks unload

> Hello,
>
> I want to use a usb disk as a mirror of one partition.
> For that, I need to make sure that my usb disk will be available as long as
> that partition receives write requests.
> The main problem is during shutdown.
>
> After making some testing, It found the following shutdown order (In terms
> of disk access):
> 1. Every disk device receives a shutdown notifications, where after each
> shutdown, there are no further reads/writes.
> 2. All disk devices receive a powerdown notification.
> 3. Computer shuts down.
>
> My question is: Can I rely on these findings, to know that my usb disk will
> be available as long as writes continue to be sent ?
>
> Regards,
> Dror.
>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks,

If you mention FS, I considered mirroring the partition to an NTFS file
located on another partition, instead of USB disk.
If I hold the file locked an unmovable (ioctl) until shutdown, and I know
Its sectors mapping, Can I rely on this mapping after the FS dies, or it can
be relocated ?

Regards,
Dror.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> Yes.
> First, all disks receive MJ_SHUTDOWN.
> Then the filesystems die, and file accesses from this point (assuming
the
> FILE_OBJECT or a handle existed before) are failed with
STATUS_FILE_CLOSED.
> Then all disks receive the MJ_POWER IRPs.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Dror”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Monday, September 27, 2004 10:48 AM
> Subject: [ntdev] when do disks unload
>
>
> > Hello,
> >
> > I want to use a usb disk as a mirror of one partition.
> > For that, I need to make sure that my usb disk will be available as long
as
> > that partition receives write requests.
> > The main problem is during shutdown.
> >
> > After making some testing, It found the following shutdown order (In
terms
> > of disk access):
> > 1. Every disk device receives a shutdown notifications, where after each
> > shutdown, there are no further reads/writes.
> > 2. All disk devices receive a powerdown notification.
> > 3. Computer shuts down.
> >
> > My question is: Can I rely on these findings, to know that my usb disk
will
> > be available as long as writes continue to be sent ?
> >
> > Regards,
> > Dror.
> >
> >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

Nobody but the filesystem that owns the file is going to relocate it.

=====================
Mark Roddy

-----Original Message-----
From: Dror [mailto:xxxxx@filesx.com]
Sent: Tuesday, September 28, 2004 10:15 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] when do disks unload

Thanks,

If you mention FS, I considered mirroring the partition to an NTFS file
located on another partition, instead of USB disk.
If I hold the file locked an unmovable (ioctl) until shutdown, and I know
Its sectors mapping, Can I rely on this mapping after the FS dies, or it can
be relocated ?

Regards,
Dror.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> Yes.
> First, all disks receive MJ_SHUTDOWN.
> Then the filesystems die, and file accesses from this point
> (assuming
the
> FILE_OBJECT or a handle existed before) are failed with
STATUS_FILE_CLOSED.
> Then all disks receive the MJ_POWER IRPs.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Dror”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Monday, September 27, 2004 10:48 AM
> Subject: [ntdev] when do disks unload
>
>
> > Hello,
> >
> > I want to use a usb disk as a mirror of one partition.
> > For that, I need to make sure that my usb disk will be available as
> > long
as
> > that partition receives write requests.
> > The main problem is during shutdown.
> >
> > After making some testing, It found the following shutdown order (In
terms
> > of disk access):
> > 1. Every disk device receives a shutdown notifications, where after
> > each shutdown, there are no further reads/writes.
> > 2. All disk devices receive a powerdown notification.
> > 3. Computer shuts down.
> >
> > My question is: Can I rely on these findings, to know that my usb
> > disk
will
> > be available as long as writes continue to be sent ?
> >
> > Regards,
> > Dror.
> >
> >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com