Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430426 - sys-fs/nilfs-utils - nilfs_cleanerd does not run when /dev/root is missing
Summary: sys-fs/nilfs-utils - nilfs_cleanerd does not run when /dev/root is missing
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Naohiro Aota
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 438380
  Show dependency tree
 
Reported: 2012-08-08 09:31 UTC by Piotr Szymaniak
Modified: 2020-12-21 20:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Szymaniak 2012-08-08 09:31:28 UTC
I'm using nilfs2 on my rootfs. nilfs2 needs a garbage collection deamon runnig to clean up old snapshots and free up some disk space. With newer udev /dev/root isn't created anymore, but my devices are still mount like this:
wloczykij ~ # mount
rootfs on / type rootfs (rw)
/dev/root on / type nilfs2 (rw,relatime)

Revelant part of strace analysis on linux-nilfs [1] and the whole thread [2] and similar issue reported by other user [3].

Also on linux-nilfs I did some quick and dirty check [4]:
"I checked udev in the first place. udev-182-r3 (from Gentoo portage tree) with udev-init-scripts-10 creates /dev/root. udev-186 with udev-init-scripts-12 doesn't."

[1] http://permalink.gmane.org/gmane.comp.file-systems.nilfs.user/2436
[2] http://comments.gmane.org/gmane.comp.file-systems.nilfs.user/2419
[3] http://comments.gmane.org/gmane.comp.file-systems.nilfs.user/2491
[4] http://permalink.gmane.org/gmane.comp.file-systems.nilfs.user/2439

Reproducible: Always

Actual Results:  
nilfs_cleanerd not running because /dev/root is missing.

Expected Results:  
/dev/root is created again or... mounts are per device? /dev/sdXY on / type foofs (opts)

PS Why Gentoo uses /dev/root anyway?
Comment 1 Piotr Szymaniak 2012-08-10 09:47:06 UTC
I think this is more udev related then nilfs-utils maintainers. Similar bugs are already on bugzilla (bug #381761, bug #427818 and bug #390519).
Comment 2 Naohiro Aota gentoo-dev 2012-10-10 00:07:26 UTC
Do you get this after upgrading to udev 190?
Comment 3 SpanKY gentoo-dev 2012-10-12 18:44:51 UTC

*** This bug has been marked as a duplicate of bug 390519 ***
Comment 4 William Hubbs gentoo-dev 2012-10-14 21:03:19 UTC
This is not a udev issue. Please see the tracker this bug blocks now for
more information about how you may be able to fix your package.

Thanks,

William
Comment 5 Naohiro Aota gentoo-dev 2012-10-15 05:00:47 UTC
I just investigated the discussion again and I've concluded that nilfs_cleanerd itself dosen't depend on /dev/root. It failes because the root file system is accidently mounted using /dev/root

On my box, /proc/mounts give me:

rootfs / rootfs rw 0 0
...
/dev/sda2 / ext4 rw,noatime,data=ordered 0 0
...

It should also be the same for nilfs.

Piotr, how do you write your root entry in your /etc/fstab ?
Comment 6 Piotr Szymaniak 2013-01-15 21:58:20 UTC
(In reply to comment #5)
> I just investigated the discussion again and I've concluded that
> nilfs_cleanerd itself dosen't depend on /dev/root. It failes because the
> root file system is accidently mounted using /dev/root
> 
> On my box, /proc/mounts give me:
> 
> rootfs / rootfs rw 0 0
> ...
> /dev/sda2 / ext4 rw,noatime,data=ordered 0 0
> ...
> 
> It should also be the same for nilfs.
> 
> Piotr, how do you write your root entry in your /etc/fstab ?

Sorry, missed mail notification.
UUID=1aa9e6fb-cf7d-45bd-bbfb-08110a8840b7 / nilfs2 noatime,nodiratime,rw 0 1

Well, i suppose i can remove the no{,dir}atime options anyway, but that's not the issue here.

maszn ~ # mount | grep root
rootfs on / type rootfs (rw)
/dev/root on / type nilfs2 (rw,noatime,nodiratime)
Comment 7 Naohiro Aota gentoo-dev 2013-02-07 03:31:49 UTC
It seems like bug 339472 is relevant.
Comment 8 Alexander Bezrukov 2013-02-07 06:01:27 UTC
(In reply to comment #7)
> It seems like bug 339472 is relevant.

No, it isn't. Bug #339472 is about improper mounting of rootfs which in case of nilfs2 prevents running of nilfs_cleanerd and a user needs to run the daemon on his/her own. A simple change in /etc/init.d/root fixes the bug #339472 without special handling of nilfs2.

This bug is about the situation that the daemon returns without forking a background process if /dev/root doesn't exist. Even if a user starts the daemon from the command line, nothing happens, the program silently returns.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2013-03-24 07:41:30 UTC
udev-init-scripts-25 is creating /dev/root again for non-btrfs file systems
but it doesn't mean this bug can be closed
in fact, the symlink is there only temporary until bugs like this one have been solved