Refresh of volume

  • Thread starter Thread starter sarma pisapati
  • Start date Start date
S

sarma pisapati

If a add a volume to Windows 2000 server and updated the
MFD (Master File Directory)programatically, is there a
utility to refresh the directory information of OS?
 
sarma pisapati said:
If a add a volume to Windows 2000 server and updated the
MFD (Master File Directory)programatically, is there a
utility to refresh the directory information of OS?

If you did it programmatically, you can call dismount (programmatically)
using DeviceIOControl (FSCTL_DISMOUNT_VOLUME). The device will be dismounted
and "forgotten" by the os. The next time it is mounted and accessed, the
system recaches it.

I know of no tools that can do that, so I wrote one myself and using it.
It only dismounts drive letters, it needs to be bound first. You can do that
with Resource Kit's MountVol or with the Disk management snap-in. If you
want it, say so and it will be sent to you (part of free tools pack).

You need to have no files open by the system on the drive, otherwise
dismount fails (you can't dismount the boot partition). But since you
modified it, you probably don't read from it at the same time.
 
Thank you. I just found that this volume is not a system
volume. Is there a command line utility do do "dismount"
and "mount"?
Thanks again,
sarma
 
BTW, I could locate mountVOL or DismountVOL for disk
volumes in diskmanagement snap-in. I could see mountvol
to mount a volume under NTFS folder.

There is one CLI application from MS in the W2k resource kit, but it's
kinda expensive (the RK). Use disk management snap-in unless this is a
corporate issue :)

There is no dismount as I remember, but it could be. Like I said, I wrote
a dismount, but I am yet to write a MontVol, which I am not about to since I
don't really use it. But it shouldn't be VERY hard.

If you can code, all you do is search MSDN for file system function to
create a reparse point. Also FindVolumeFirst (or was it FindFirstVolume?)
and FindVolumeNext to enumerate volumes. Really not complicated.
 
Back
Top