This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: unmount drive in cygwin - is it possible


On 30 January 2006 18:10, Mark Bevan wrote:

> Hello,
> 
> I have compiled ntfsprogs 1.12.1 for use with cygwin - compilation went
> well and I know have the set of executables available. 
> 
> Whenever I run ntfsresize (even just to get info on current NTFS
> filesystem using -i option) I am told : 
> 
> ntfsresize v1.12.1 (libntfs 8:1:0)
> ERROR: Device '/cygdrive/e' is mounted read-write. You must 'umount' it
> first. 
> 
> However there doesn't seem to be a way to unmount a disk in cygwin :
> 
> $ umount /cygdrive/e
> umount: /cygdrive/e: No such file or directory
> 
> Maybe this because this because the underlying windows operating system
> (Windows XP) doesn't allow for this or maybe I am not using the right
> commands ?  

  Neither exactly.  Drives _can_ be unmounted by the underlying OS, but cygwin doesn't provide any utility to do this.  The 'mount'
and 'umount' commands in cygwin don't actually mount/unmount filing systems, they just allow you to make a unix-y view on the
existing FS.

  As to ntfsresize, it may be a weakness in the coding that it still requires the drive to be r/w even if you're only making a query
for info it could read from an r/o drive, or there may be some complex reason why it needs that anyway.

  However, I don't suppose your HD is actually read-only, unless of course E: is your CDROM; it may be that cygwin's /dev/hdX
devices don't function quite the same as Linux's.  It's quite possible that the _actual_ error that is occurring is that libntfs is
trying to lock the HD for exclusive access, which is something you just can't do in 'doze, and then the ntfsresize utility makes a
bogus assumption that the only thing that could stop it locking the drive for exclusive r/w access would be if it was r/o.  I
haven't looked at it in detail.  You're not likely to get much by the way of useful results from ntfsprogs without some porting
effort.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]