Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] (solved) systemd-fsck hangs  (Read 14134 times)

Offline tuxic

  • User
  • Posts: 117
[EN] (solved) systemd-fsck hangs
« on: 2014/07/15, 03:06:48 »
I have a message during boot that says " scanning Brtfs drives" or something like that. I don't have any drive in that format. Then it starts a "systemd-fsck" that hangs and prolong my boot time considerably.
I'm very interested in canceling this check but all the reccomendations that I have googled have failed like writing "fsck.mode=skip" in the kernel command line. HELP!!!
« Last Edit: 2014/07/18, 04:53:16 by tuxic »
"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: systemd-fsck hangs
« Reply #1 on: 2014/07/15, 03:18:46 »
Post your fstab

Using nfs ?

How many hard drives ?

You can purge btrfs-tools, if you don't use it.
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #2 on: 2014/07/15, 04:11:56 »
Code: [Select]
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>


proc /proc proc defaults 0 0
/dev/sda5 / ext4 defaults,noatime 0 0
/dev/sdc1 /media/Back_Up ntfs-3g defaults,locale=en_US.utf8 0 0
/dev/sdb1 /media/Storage ntfs-3g defaults,locale=en_US.utf8 0 0
/swapfile swap swap defaults 0 0
"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #3 on: 2014/07/15, 04:17:16 »
Just purged btrfs-tools, rebooted, but still hangs...

"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline GoinEasy9

  • User
  • Posts: 560
Re: systemd-fsck hangs
« Reply #4 on: 2014/07/15, 04:53:20 »
Actually it's " scanning for Brtfs drives", it looks, but unless you have one, doesn't find.

I've had systemd-fsck hang myself, but, only when it was fixing problems.  It may not be fsck at all that's causing your problem.  Here's the top of my systemd-analyze blame:

$ systemd-analyze blame
         10.506s NetworkManager.service
         10.270s ModemManager.service
          6.130s systemd-fsck-root.service
          5.942s preload.service
          5.421s sensord.service
          3.448s autofs.service
          3.315s bootlogs.service
          3.271s loadcpufreq.service
          3.172s lightdm.service
          2.763s avahi-daemon.service

It's the NetworkManager/ModemManager.service that is increasing my boot time.  I can actually see it on the laptop.  As soon as the wifi light comes on, the balance of boot time is short.  Anyway, just an idea.  That is, unless you're seeing error messages after systemd-fsck runs.
Linux Counter number 348347

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #5 on: 2014/07/15, 11:32:46 »
My results:



Code: [Select]

~$ systemd-analyze blame
         31.762s systemd-udev-settle.service
           762ms systemd-modules-load.service
           647ms media-Storage.mount
           315ms media-Back_Up.mount
           284ms lvm2-activation-early.service
           118ms keyboard-setup.service
           115ms console-setup.service
           108ms nfs-common.service
            99ms ModemManager.service
            91ms gpm.service
            82ms loadcpufreq.service
            68ms networking.service
            59ms bootlogs.service
            57ms preload.service
            36ms lvm2-activation.service
            34ms systemd-logind.service
            27ms live-config.service
            27ms console-kit-daemon.service
            27ms systemd-udev-trigger.service
            26ms rpcbind.service
            24ms systemd-fsck-root.service
            23ms polkitd.service
            23ms irqbalance.service
            22ms console-kit-log-system-start.service
            22ms alsa-restore.service
            22ms ifplugd.service
            18ms lm-sensors.service
            18ms cpufrequtils.service
            18ms motd.service
            16ms smartmontools.service
            14ms kbd.service
            14ms dev-mqueue.mount
            14ms systemd-tmpfiles-setup-dev.service
            13ms dev-hugepages.mount
            12ms dns-clean.service
            12ms systemd-sysctl.service
            12ms sys-kernel-debug.mount
            11ms ifup@eth0.service
            11ms systemd-tmpfiles-setup.service
            10ms pppd-dns.service
             9ms rc-local.service
             7ms keymap.service
             7ms systemd-remount-fs.service
             6ms upower.service
             5ms systemd-user-sessions.service
             5ms live.service
             4ms systemd-udevd.service
             4ms udev-finish.service
             4ms systemd-journal-flush.service
             4ms resolvconf.service
             3ms live-tools.service
             3ms swapfile.swap
             3ms systemd-random-seed-load.service
             3ms systemd-update-utmp-runlevel.service
             2ms run-user.mount
             2ms run-lock.mount
"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: systemd-fsck hangs
« Reply #6 on: 2014/07/15, 11:49:11 »
The problem has nothing to do with btrfs, but it does have something to do with connected drives or other hardware.  For troubleshooting purposes, try these two things:


1. Post the output of
Code: [Select]
blkid -c /dev/null -o list

2. In /etc/fstab, comment out the two ntfs formatted drives, and then try a reboot and see how long it takes.


Also, while you are editing /etc/fstab, the root device pass number (the final numeral) should be a "1" instead of "0".


FYI, note the systemd-udev-settle.service time on my little netbook with a SSD:


Code: [Select]
root@tosh205:/# systemd-analyze blame
          5.817s nmbd.service
          5.759s winbind.service
          5.328s samba-ad-dc.service
          3.494s wicd.service
          1.639s systemd-udev-settle.service
          1.555s smbd.service
          1.513s loadcpufreq.service
          1.310s console-kit-daemon.service
          1.113s siguibui.service
           847ms lightdm.service
           818ms avahi-daemon.service
           809ms systemd-logind.service
           799ms wpa_supplicant.service
           776ms upower.service
           756ms rtkit-daemon.service


With a hdd it will be longer -- maybe 10 or 15s.

« Last Edit: 2014/07/15, 12:25:21 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #7 on: 2014/07/15, 12:32:48 »

Code: [Select]
# blkid -c /dev/null -o list
device     fs_type label    mount point    UUID
-------------------------------------------------------------------------------
/dev/sdc1  ntfs    Back-Up  /media/Back_Up 4CE077F63265B98C
/dev/sdc2  swap             (not mounted)  321355cd-0908-4b71-87a7-d5602526a308
/dev/sdb1  ntfs    Storage  /media/Storage 6876C3BE5BDF1565
/dev/sda1  ext2             (not mounted)  6067123f-9b75-4851-95b8-13ec54e40b18
/dev/sda2  ext4             (not mounted)  989a68dd-0b56-4769-ad56-58231befa019
/dev/sda4  ext4             (not mounted)  afc265fe-2b63-41a0-ad59-80d89a8dea69
/dev/sda5  ext4             /              72293bb3-c4e1-40d7-949b-27988cdad968
"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #8 on: 2014/07/15, 12:40:27 »
Entered in fstab and commented out the two ntfs drives. Also changed the second number in root to 1:


Code: [Select]
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>


proc /proc proc defaults 0 0
/dev/sda5 / ext4 defaults,noatime 0 1
#/dev/sdc1 /media/Back_Up ntfs-3g defaults,locale=en_US.utf8 0 0
#/dev/sdb1 /media/Storage ntfs-3g defaults,locale=en_US.utf8 0 0
/swapfile swap swap defaults 0 0


But look after reboot:


Code: [Select]
$ systemd-analyze blame
         31.767s systemd-udev-settle.service
           769ms systemd-modules-load.service
           127ms nfs-common.service
            99ms keyboard-setup.service
            94ms ModemManager.service
            93ms console-setup.service
            88ms udisks2.service
            86ms loadcpufreq.service
            65ms bootlogs.service
            64ms networking.service
            63ms gpm.service
            49ms lvm2-activation.service
            40ms lvm2-activation-early.service
            38ms systemd-logind.service
            33ms systemd-fsck-root.service
            28ms live-config.service
            26ms systemd-udev-trigger.service
            26ms rpcbind.service
            24ms polkitd.service
            22ms irqbalance.service
            18ms alsa-restore.service
            17ms console-kit-log-system-start.service
            17ms console-kit-daemon.service
            16ms ifplugd.service
            16ms systemd-udevd.service
            15ms kbd.service
            15ms dev-mqueue.mount
            15ms systemd-tmpfiles-setup-dev.service
            15ms dev-hugepages.mount
            14ms dns-clean.service
            14ms systemd-sysctl.service
            14ms motd.service
            14ms ifup@eth0.service
            14ms sys-kernel-debug.mount
            13ms cpufrequtils.service
            13ms lm-sensors.service
            13ms preload.service
            12ms systemd-journal-flush.service
            11ms upower.service
            10ms smartmontools.service
            10ms systemd-tmpfiles-setup.service
             7ms live.service
             7ms keymap.service
             7ms swapfile.swap
             6ms pppd-dns.service
             5ms rc-local.service
             5ms systemd-remount-fs.service
             4ms systemd-user-sessions.service
             4ms resolvconf.service
             3ms live-tools.service
             3ms run-lock.mount
             3ms systemd-update-utmp-runlevel.service
             3ms systemd-random-seed-load.service
             3ms run-user.mount
             3ms udev-finish.service

"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: systemd-fsck hangs
« Reply #9 on: 2014/07/15, 12:47:09 »
OK, it's not an issue with your ntfs drives -- you can remove the comment tags.  Why is your swap partition not mounted?  Try setting that to be mounted in /etc/fstab:


Code: [Select]
UUID=321355cd-0908-4b71-87a7-d5602526a308  none  swap      sw  0    0
Then reboot.  If that doesn't help, we'll take a look at your journalctl log.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #10 on: 2014/07/15, 13:04:39 »
fstab:


Code: [Select]
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>


proc /proc proc defaults 0 0
/dev/sda5 / ext4 defaults,noatime 0 1
/dev/sdc1 /media/Back_Up ntfs-3g defaults,locale=en_US.utf8 0 0
/dev/sdb1 /media/Storage ntfs-3g defaults,locale=en_US.utf8 0 0
UUID=321355cd-0908-4b71-87a7-d5602526a308  none  swap      sw  0    0


but:


Code: [Select]
$ systemd-analyze blame
         31.952s systemd-udev-settle.service
           763ms systemd-modules-load.service
           294ms media-Storage.mount
           251ms media-Back_Up.mount
           118ms keyboard-setup.service
           103ms console-setup.service
           102ms gpm.service
           101ms nfs-common.service
            89ms ModemManager.service
            87ms udisks2.service
            76ms loadcpufreq.service
            65ms bootlogs.service
            60ms networking.service
            51ms preload.service
            47ms lvm2-activation.service
            44ms systemd-fsck-root.service
            39ms lvm2-activation-early.service
            37ms systemd-logind.service
            35ms rpcbind.service
            31ms irqbalance.service
            30ms live-config.service
            25ms systemd-udev-trigger.service
            24ms dev-disk-by\x2duuid-321355cd\x2d0908\x2d4b71\x2d87a7\x2dd5602526a308.swap
            22ms polkitd.service
            22ms console-kit-daemon.service
            19ms alsa-restore.service
            18ms console-kit-log-system-start.service
            17ms ifplugd.service
            16ms cpufrequtils.service
            15ms kbd.service
            15ms motd.service
            13ms ifup@eth0.service
            13ms dns-clean.service
            13ms dev-mqueue.mount
            12ms dev-hugepages.mount
            12ms lm-sensors.service
            11ms smartmontools.service
            11ms systemd-tmpfiles-setup-dev.service
            11ms sys-kernel-debug.mount
            10ms systemd-journal-flush.service
             8ms pppd-dns.service
             8ms live.service
             8ms live-tools.service
             8ms upower.service
             7ms systemd-tmpfiles-setup.service
             6ms keymap.service
             6ms rc-local.service
             5ms systemd-update-utmp-runlevel.service
             5ms udev-finish.service
             4ms systemd-remount-fs.service
             4ms resolvconf.service
             4ms systemd-user-sessions.service
             3ms systemd-udevd.service
             3ms systemd-sysctl.service
             3ms run-lock.mount
             2ms systemd-random-seed-load.service
             2ms run-user.mount

"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: systemd-fsck hangs
« Reply #11 on: 2014/07/15, 13:13:46 »
In a user terminal


Code: [Select]
journalctl -b | most

will send the journal for your current booted session into a most window, where you can scroll through and maybe discover what is taking up the time.  I'll google around and see if I can turn up any common issues with systemd-udev-settle.service.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline tuxic

  • User
  • Posts: 117
Re: systemd-fsck hangs
« Reply #12 on: 2014/07/15, 13:17:57 »
Thank you very much. The result of the command is so long and in terms that are above my knowledge...
"Many people live and die..., and all they do is process groceries."
                  H. Peavey

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: systemd-fsck hangs
« Reply #13 on: 2014/07/15, 13:25:49 »
Don't worry we all can learn ....   ;)


With your terminal window fairly wide, you can see the date and time stamp at the left end of each line.  Most messages happen very fast -- you can see many messages at the exact same minute and second.  But you are looking for an anomaly in that pattern -- either the same message repeating for many seconds, or a gap of time between messages.  Or perhaps an error or a warning related to a device.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: systemd-fsck hangs
« Reply #14 on: 2014/07/15, 13:34:16 »
On this page I read in the first bit of guidance


Quote
1. Make sure not to use any fake block device storage technology such as LVM (as installed by default by various distributions, including Fedora) they result in the systemd-udev-settle.service unit to be pulled in. Settling device enumeration is slow, racy and mostly obsolete. Since LVM (still) hasn't been updated to handle Linux' event based design properly, settling device enumeration is still required for it, but it will slow down boot substantially. On Fedora, use "systemctl mask fedora-wait-storage.service fedora-storage-init-late.service fedora-storage-init.service" to get rid of all those storage technologies. Of course, don't try this if you actually installed your system with LVM. (The only fake block device storage technology that currently handles this all properly and doesn't require settling device enumerations is LUKS disk encryption.)
Seeing that, I noticed that in your /etc/fstab file you used "/dev/sdx" IDs for your drives.  Let's change that to

UUID=72293bb3-c4e1-40d7-949b-27988cdad968  for the root device.  Since commenting out the ntfs drives had no effect, I guess there is no need to switch to UUIDs for those devices.


EDIT:  On the other hand, it will do no harm to change

/dev/sdb1 to UUID=6876C3BE5BDF1565
and /dev/sdc1 to UUID=4CE077F63265B98C
« Last Edit: 2014/07/15, 13:47:58 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO