[PC-BSD Dev] ZFS 'Device Busy' error

Kris Moore kris at pcbsd.org
Tue Jul 9 06:39:26 PDT 2013


On 07/08/2013 20:11, Claudio L. wrote:
> On 07/08/2013 10:15, Kris Moore wrote:
>> Interesting, are they mounted someplace where other processes may be
>> accessing them? Maybe kill the mount-tray application as well, in
>> case its trying to parse something.
>
> I did some more testing. I killed every application and stopped most
> of the services running (except the very basic to run the system), and
> the pools are still being used. It seems if a pool is automounted at
> boot, you cannot unmount it, unless you use -f to force it. But I have
> no way to know if there's a real application making use of the pool,
> which could lose data if a force the unmount.
>
> Can anyone try this on a different system?:
>
> sudo zpool create testtank ada1 (or change to any unused disk, or it
> could even be a file).
> sudo zpool destroy testtank
>
> this should destroy it, no questions asked and no errors.
>
> Now try again:
> sudo zpool create testtank ada1
> cd /testtank
> sudo zpool destroy testtank
>
> this should give the error 'Device busy'. This is expected since we
> are actually using the directory, now do:
>
> cd ..
> sudo zpool destroy testtank
>
> and it should work without errors.
>
> Now one final time:
>
> sudo zpool create testtank ada1
>
> then reboot the computer
>
> and now,
>
> sudo zpool destroy testtank
>
> and you should get the 'device busy' error, for no apparent reason.
>
> It seems somebody forgot to close a handle somewhere deep in the
> system. I don't see a reason why the mounts should stay locked like that.
>
> Claudio
>


Yea, that does seem odd... Can you not do "sudo zpool export testtank"
or "zfs unmount /testtank" first?

What does the output of "mount" show, anything else mounted on top of
that device?

-- 
Kris Moore
PC-BSD Software
iXsystems



More information about the Dev mailing list