Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2006 10:29:18 -0800 (PST)
From:      Paul Marciano <pm940@yahoo.com>
To:        freebsd-fs@freebsd.org
Subject:   Getting EBUSY upon unmount ATA disk...
Message-ID:  <20060308182918.69866.qmail@web54007.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
I am running FreeBSD-5.4 with root on md0.

I am seeing the following problem:

# df
Filesystem     1K-blocks  Used Avail Capacity  Mounted
on
/dev/md0           17370 15810   172    99%    /
devfs                  1     1     0   100%    /dev
/dev/md1            3694    16  3384     0%    /var
/dev/md2           31470     8 28946     0%    /tmp
/dev/md3.uzipc     20808 18890   254    99%    /usr

# mount /dev/ad0s1a /flash
# : > /flash/foobar
# umount /flash
umount: unmount of /flash failed: Device busy


Waiting doesn't help.  I can repeat the unmount
command after a time and it still reports EBUSY.

ad0 is a SanDisk Compact Flash card.

So far I've traced the unmount op to

ffs_flushfiles() in ffs_vfsops.c:

/*
 * Flush all the files.
 */
if ((error = vflush(mp, 0, flags, td)) != 0)
        return (error);


Still trying to track it down, but I'm not an fs guy
and so I'm asking for a little help.



Some more background:

My system uses a Compact Flash card to store
configuration information.  It's seldom accessed and
it would be nice to support controlled
removing/replacing during operation.

It looks like it is possible using atacontrol to
detach the channel and then reattach when the card is
inserted.

I can: insert, attach, mount, read, umount, remove all
day long without problems.  But now as soon as I do
one write the drive doesn't want to unmount.


No processes are camping on the mount point.
manually typing "sync" doesn't help.

unmount -f succeeds.


I hope someone can advise me.

Thanks,
Paul.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060308182918.69866.qmail>