nilfs2 cannot umount, device is always busy

Bug #1252063 reported by dan
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nilfs-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

nilfs-tools 2.1.5-1 on a fresh install ubuntu 13.10 x86_64

The filesystem mounts and seems to be working correctly (also lscp, mkcp and others seem to work as expected), but when trying to umount the device (be it a real partition, loop device or luks device) the result is always this one:

# umount /mnt/nilfs/
umount.nilfs2: /dev/loop0: device is busy
umount.nilfs2: /dev/loop0: device is busy

# umount /dev/loop0
umount.nilfs2: /dev/loop0: device is busy
umount.nilfs2: /dev/loop0: device is busy

# lsof /mnt/nilfs/
      Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nilfs_cle 2777 root 5r DIR 7,0 4096 2 /mnt/nilfs

# ps aux | grep 2777
root 2777 0.0 0.0 14824 904 ? Ss 19:59 0:00 /sbin/nilfs_cleanerd -n /dev/loop0 /mnt/nilfs

# kill -9 2777
# umount /mnt/nilfs/ <-- Works

So, it seems like nilfs_cleanered prevents the device from being umounted at all times. This bug is reproducible 100% of the times for me.
Killing the deamon seems to be the only way to umount a nilfs2 mounted partition.

--EDIT--
This is also reproducible when booting from the live CD image of ubuntu 13.10_64 (I booted from liveCD image, added community repository and "apt-get update && apt-get install nilfs-tools")

--EDIT2--
Version 2.1.0-1 of nilfs-tools on Ubuntu 12.04.3 LTS was unaffected from this bug, just tested it.

Tags: nilfs2
dan (d23543)
description: updated
dan (d23543)
description: updated
dan (d23543)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nilfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Curtis Gedak (gedakc) wrote :

This problem also occurs on a fresh install of Ubuntu 13.10 i386 from the ubuntu-13.10-desktop-i386.iso file.

A sample session demonstrating this problem follows:

root@saucy:~# gparted /dev/sdb # Create 512 MiB nilfs2 sdb1
======================
libparted : 2.3
======================
root@saucy:~# mount -t nilfs2 /dev/sdb1 /mnt
root@saucy:~# umount /mnt
umount.nilfs2: /dev/sdb1: device is busy
umount.nilfs2: /dev/sdb1: device is busy
root@saucy:~# ps -e | grep nilfs
 2242 ? 00:00:00 nilfs_cleanerd
root@saucy:~# kill 2242
root@saucy:~# umount /mnt
root@saucy:~#

summary: - cannot umount, device is always busy
+ nilfs2 cannot umount, device is always busy
Revision history for this message
Akhilesh Chaganti (akhilesh-chg) wrote :

Hitting this issue on Fresh install of Ubuntu Server 14.04 LTS x86_64.

====================================================
root@gr3:~# mkfs.nilfs2 -f /dev/sdb1
mkfs.nilfs2 (nilfs-utils 2.1.5)
Start writing file system initial data to the device
       Blocksize:4096 Device:/dev/sdb1 Device Size:146162057216
File system initialization succeeded !!
root@gr3:~# mount /dev/sd
sda sda1 sda2 sda5 sdb sdb1 sdc sdc1 sdd sdd1
root@gr3:~# mount /dev/sd
sda sda1 sda2 sda5 sdb sdb1 sdc sdc1 sdd sdd1
root@gr3:~# mount /dev/sdb1 /test/root/
root@gr3:~# umount /test/root
umount.nilfs2: /dev/sdb1: device is busy
umount.nilfs2: /dev/sdb1: device is busy
root@gr3:~# ps -A | grep nilfs
 1313 ? 00:00:00 nilfs_cleanerd
root@gr3:~# kill -9 1313
root@gr3:~# umount /test/root
root@gr3:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
====================================================

Revision history for this message
J. Stockburger (j-t-stockburger) wrote :

I found a workaround, at least for removable drives:

* initiate unmount from nautilus (will hang)
* ask nilfs_cleanerd to stop: sudo nilfs-clean -q
* pending unmount will proceed

Why does umount.nilfs2 fail to perform this operation?

Note that this workaround may not be appropriate if several nilfs file systems are in use.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.