NT Metadata problem....

Hi,
My driver copies data between 2 logical drives which are also exported to a
NT host as drives. Now when I copy over the whole unit to another, the
metadata of the destination gets over written by that of the source. That
is fine, but the NT on the host is not able to figure that out and I need
to reboot the host for NT to see the files on the destination. Is there a
way to force NT to flush the metadata from the cache and re read it or
something of that sort?

Thanks
Mayank


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Neither NTFS nor FAT was designed or implemented to assume that the local
drive contents were going to change in the underlying media using a
mechanism that bypasses the file system itself. Thus, there’s no mechanism
in place because the very thing you indicate your driver does is assumed to
not occur.

Of course, it is always possible to find some way to make this work (like
making NTFS or FAT dismount and then remount the volume) but there’s no
pre-defined mechanism for achieving this.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
?
Hope to see you at the next OSR file systems class March 11, 2002 in Boston!

-----Original Message-----
From: Mayank Ajmera [mailto:xxxxx@yahoo.com]
Sent: Wednesday, February 13, 2002 5:34 PM
To: File Systems Developers
Subject: [ntfsd] NT Metadata problem…

Hi,
My driver copies data between 2 logical drives which are also exported to a
NT host as drives. Now when I copy over the whole unit to another, the
metadata of the destination gets over written by that of the source. That
is fine, but the NT on the host is not able to figure that out and I need
to reboot the host for NT to see the files on the destination. Is there a
way to force NT to flush the metadata from the cache and re read it or
something of that sort?

Thanks
Mayank


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Is there a fixed place where the Metadata is stored on the disk for NT?

Thanks
Mayank


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

NTFS uses CcPin interface to lock the metadata files in the cache. and
NtFlushFile will not solve the problem. I also want to point to feature in
Whistler and XP whereby you can populate file extents by using writes which
doesn’t go through FSD, and then NTFS can be told to pick up the file’s
data. I guess Dismounting and mounting back is an good option, but force
dismount is only available on win2k systems

-----Original Message-----
From: Tony Mason [mailto:xxxxx@osr.com]
Sent: Wednesday, February 13, 2002 7:47 PM
To: File Systems Developers
Subject: [ntfsd] RE: NT Metadata problem…

Neither NTFS nor FAT was designed or implemented to assume that the local
drive contents were going to change in the underlying media using a
mechanism that bypasses the file system itself. Thus, there’s no mechanism
in place because the very thing you indicate your driver does is assumed to
not occur.

Of course, it is always possible to find some way to make this work (like
making NTFS or FAT dismount and then remount the volume) but there’s no
pre-defined mechanism for achieving this.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
?
Hope to see you at the next OSR file systems class March 11, 2002 in Boston!

-----Original Message-----
From: Mayank Ajmera [mailto:xxxxx@yahoo.com]
Sent: Wednesday, February 13, 2002 5:34 PM
To: File Systems Developers
Subject: [ntfsd] NT Metadata problem…

Hi,
My driver copies data between 2 logical drives which are also exported to a
NT host as drives. Now when I copy over the whole unit to another, the
metadata of the destination gets over written by that of the source. That
is fine, but the NT on the host is not able to figure that out and I need
to reboot the host for NT to see the files on the destination. Is there a
way to force NT to flush the metadata from the cache and re read it or
something of that sort?

Thanks
Mayank


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

for NTFS, only location of boot block is fixed. rest of the metadata of NTFS
is stored as file and theoretically their location is not fixed. location of
$MFT is indicated in the boot block and $MFT contains all the files’
inode.on NT first 16 record of this $MFT describes metadata files of NT…

-----Original Message-----
From: Mayank Ajmera [mailto:xxxxx@yahoo.com]
Sent: Wednesday, February 13, 2002 4:00 PM
To: File Systems Developers
Subject: [ntfsd] RE: NT Metadata problem…

Is there a fixed place where the Metadata is stored on the disk for NT?

Thanks
Mayank


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On Thu, 14 Feb 2002 08:42:51 -0800, Pashupati Kumar
wrote:

>I guess Dismounting and mounting back is an good option, but force
>dismount is only available on win2k systems

BTW, how do I force a volume to dismount in W2K? I checked the latest
(November) PSDK and in the documentation on FSCTL_DISMOUNT_VOLUME, there
is no mention of an option to force the dismount. The W2K DDK and IFS
Kit also don’t seem to have any information on this. But we know it’s
possible because ChkDsk does it.

Thanks!

Ralf.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I know this is done using PnP notification. I remember seeing my PnP
notification getting invoked (EventCategoryTargetDeviceChange)but not sure
of the sequence of things…

-----Original Message-----
From: Ralf Buschmann [mailto:xxxxx@backmagic.de]
Sent: Thursday, February 14, 2002 9:47 AM
To: File Systems Developers
Subject: [ntfsd] Re: NT Metadata problem…

On Thu, 14 Feb 2002 08:42:51 -0800, Pashupati Kumar
wrote:

>I guess Dismounting and mounting back is an good option, but force
>dismount is only available on win2k systems

BTW, how do I force a volume to dismount in W2K? I checked the latest
(November) PSDK and in the documentation on FSCTL_DISMOUNT_VOLUME, there
is no mention of an option to force the dismount. The W2K DDK and IFS
Kit also don’t seem to have any information on this. But we know it’s
possible because ChkDsk does it.

Thanks!

Ralf.


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Send FSCTL_DISMOUNT_VOLUME.

To do a “normal” dismount you should first lock the volume
(FSCTL_LOCK_VOLUME) and THEN do the dismount.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
?
Hope to see you at the next OSR file systems class March 11, 2002 in Boston!

-----Original Message-----
From: Ralf Buschmann [mailto:xxxxx@backmagic.de]
Sent: Thursday, February 14, 2002 12:47 PM
To: File Systems Developers
Subject: [ntfsd] Re: NT Metadata problem…

On Thu, 14 Feb 2002 08:42:51 -0800, Pashupati Kumar
wrote:

>I guess Dismounting and mounting back is an good option, but force
>dismount is only available on win2k systems

BTW, how do I force a volume to dismount in W2K? I checked the latest
(November) PSDK and in the documentation on FSCTL_DISMOUNT_VOLUME, there
is no mention of an option to force the dismount. The W2K DDK and IFS
Kit also don’t seem to have any information on this. But we know it’s
possible because ChkDsk does it.

Thanks!

Ralf.


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On Thu, 14 Feb 2002 13:17:09 -0500, Tony Mason wrote:

>Send FSCTL_DISMOUNT_VOLUME.
>
>To do a “normal” dismount you should first lock the volume
>(FSCTL_LOCK_VOLUME) and THEN do the dismount.

Ahhhh! It works (except for the system volume, of course). I see, so in
W2K they changed something so that you can actually “yank” a volume.
Cool! Many thanks.

Ralf.


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

thanks for the info, Tony. It has been quite sometime now since I worked on
fs filter driver.

-----Original Message-----
From: Tony Mason [mailto:xxxxx@osr.com]
Sent: Thursday, February 14, 2002 10:17 AM
To: File Systems Developers
Subject: [ntfsd] Re: NT Metadata problem…

Send FSCTL_DISMOUNT_VOLUME.

To do a “normal” dismount you should first lock the volume
(FSCTL_LOCK_VOLUME) and THEN do the dismount.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
?
Hope to see you at the next OSR file systems class March 11, 2002 in Boston!

-----Original Message-----
From: Ralf Buschmann [mailto:xxxxx@backmagic.de]
Sent: Thursday, February 14, 2002 12:47 PM
To: File Systems Developers
Subject: [ntfsd] Re: NT Metadata problem…

On Thu, 14 Feb 2002 08:42:51 -0800, Pashupati Kumar
wrote:

>I guess Dismounting and mounting back is an good option, but force
>dismount is only available on win2k systems

BTW, how do I force a volume to dismount in W2K? I checked the latest
(November) PSDK and in the documentation on FSCTL_DISMOUNT_VOLUME, there
is no mention of an option to force the dismount. The W2K DDK and IFS
Kit also don’t seem to have any information on this. But we know it’s
possible because ChkDsk does it.

Thanks!

Ralf.


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Dismount the filesystem by lock/dismount/unlock IOCTL sequence.

Max

----- Original Message -----
From: “Mayank Ajmera”
To: “File Systems Developers”
Sent: Wednesday, February 13, 2002 10:33 PM
Subject: [ntfsd] NT Metadata problem…

> Hi,
> My driver copies data between 2 logical drives which are also exported to a
> NT host as drives. Now when I copy over the whole unit to another, the
> metadata of the destination gets over written by that of the source. That
> is fine, but the NT on the host is not able to figure that out and I need
> to reboot the host for NT to see the files on the destination. Is there a
> way to force NT to flush the metadata from the cache and re read it or
> something of that sort?
>
> Thanks
> Mayank
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Depends on filesystem kind and can be very complex.

----- Original Message -----
From: “Mayank Ajmera”
To: “File Systems Developers”
Sent: Thursday, February 14, 2002 12:00 AM
Subject: [ntfsd] RE: NT Metadata problem…

> Is there a fixed place where the Metadata is stored on the disk for NT?
>
> Thanks
> Mayank
>
> —
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks…
Atleast is it possible to know where the signature is present on the
drive?
See my problem is when I copy the drive completely over, my driver does not
know anything about the file system. So now I have 2 drives which are
exactly identical (including the signatures and metadata). So NT does not
read the destination right. I have to reboot the host to have NT see the
drive and its contents. Also the drive letters get changed (maybe NT sees 2
drives with the same everything, so it just assigns one drive letter to one
and another to another arbitrarily). Is there a way of over coming this
without having to reboot the host?

Thanks
Mayank


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

r u talking about volume serial number? drive letter assignment is
independent of this number. what you can do is that delete drive letter from
the drive 1 and then assigns the drive letter to drive 2. maybe u would like
to set the type partition for drive 2 in the partition table.

-----Original Message-----
From: Mayank Ajmera [mailto:xxxxx@yahoo.com]
Sent: Thursday, February 14, 2002 1:17 PM
To: File Systems Developers
Subject: [ntfsd] RE: NT Metadata problem…

Thanks…
Atleast is it possible to know where the signature is present on the
drive?
See my problem is when I copy the drive completely over, my driver does not
know anything about the file system. So now I have 2 drives which are
exactly identical (including the signatures and metadata). So NT does not
read the destination right. I have to reboot the host to have NT see the
drive and its contents. Also the drive letters get changed (maybe NT sees 2
drives with the same everything, so it just assigns one drive letter to one
and another to another arbitrarily). Is there a way of over coming this
without having to reboot the host?

Thanks
Mayank


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Okay here’s what I do…
I have 2 drives mapped to the NT host (say E and F). Now my driver
replicates E on F without letting NTFS know about it. Also the copy is
exact bitwise copy, so even the metadata and signature gets overwritten.
After the copy NT still does not show me the contents of F as changed. It
is only after I reboot that I am able to see the new contents of F:. Also
at this point the drive letters change, not sure why.
I just want to know why this happens and how can I make NT refresh
contents.
Thanks
Mayank


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com