X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: unmount drive in cygwin - is it possible Date: Mon, 30 Jan 2006 18:27:28 -0000 Message-ID: <001001c625ca$d4db2130$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <20060130181019.67420.qmail@web26305.mail.ukl.yahoo.com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 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/