X-Spam-Check-By: sourceware.org Date: Fri, 3 Feb 2006 17:08:45 +0100 (MET) From: Szakacsits Szabolcs X-Sender: szaka AT mlf DOT linux DOT rulez DOT org To: dave DOT korn AT artimi DOT com Cc: cygwin AT cygwin DOT com, Mark DOT Bevan AT gwent DOT wales DOT nhs DOT uk Subject: RE: unmount drive in cygwin - is it possible Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 30 January 2006, Dave Korn wrote: > On 30 January 2006 18:10, Mark Bevan wrote: > > > 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, Not always. See e.g. 'chkdsk /f c:' and the OS won't unmount the fs. > 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, Ntfsresize opens the volume r/o for query and r/o test runs if the volume is unmounted or already r/o mounted. Both operations are rejected if it finds that the volume is already r/w mounted. Please note that the above error message says (if the port is right what I didn't check) that the volume is already mounted (opened) r/w that's why ntfsresize won't r/o open it. Szaka -- 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/