Remounting root file system takes a lot of time

Asked by Ravi Kumar

I have slow boot. From systemd-analyze blame, i can see that dev.sda1(which holds root file system) is taking a lot of time(around 9 seconds)
Now,I have 4 ext4 partitions in my system.

From dmesg :
<pre>1. EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)--> Here root file system is mounted in read only mode for fsck
2. EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro --> Here root file system is remounted in read-write mode
3. EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null) --> Here sda7 is mounted on /home
4. EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null) --> Here sd5 is mounted on /mnt/data</pre>

My /etc/fstab look like this:

<pre># <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=e27bebbb-f8e8-4bd7-9849-2421323efc3a / ext4 errors=remount-ro 0 1
# /home was on /dev/sda7 during installation
UUID=0622bb8c-dd7d-4035-8c92-b0f729a60035 /home ext4 defaults 0 2
# swap was on /dev/sda6 during installation
UUID=dc788cde-d82a-4bdc-a5b1-8def34546012 none swap sw 0 0
# /dev/sda5 was mounted on /mnt/data post installation
UUID=144ba46c-e53d-4e0f-9da2-5a3d31bb617a /mnt/data ext4 defaults 0 2</pre>

My question is why remounting root file system in read write mode takes so much time(around 9 sec).

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Lin Rongxiang (linrx) said :
#1

Can you try this perhaps and let us know what is displayed.

systemd-analyze blame

Revision history for this message
Ravi Kumar (ravik0198) said :
#2

As i mentioned in the start of question, systemd-analyze blame pinpoints to dev.sda1 as major culprit and it takes around 9-10 seconds.

Revision history for this message
Ravi Kumar (ravik0198) said :
#3

systemd-analayze blame output:

10.484s systemd-journal-flush.service
          9.669s dev-sda1.device
          8.385s keyboard-setup.service
          6.817s systemd-tmpfiles-setup-dev.service
          6.510s systemd-sysctl.service
          2.943s systemd-fsck@dev-disk-by\x2duuid-0622bb8c\x2ddd7d\x2d4035\x2d8c92\x2db0f729a60035.service
          2.785s thermald.service
          2.601s NetworkManager.service
          2.410s ModemManager.service
          2.253s udisks2.service
          2.157s accounts-daemon.service
          1.938s systemd-random-seed.service
          1.917s snapd.service
          1.914s plymouth-start.service
          1.761s networkd-dispatcher.service
          1.679s mnt-data.mount
          1.176s tlp.service
          1.152s polkit.service
           795ms grub-common.service
           699ms systemd-fsck@dev-disk-by\x2duuid-144ba46c\x2de53d\x2d4e0f\x2d9da2\x2d5a3d31bb617a.service
           673ms systemd-modules-load.service
           612ms dev-mqueue.mount
           611ms sys-kernel-debug.mount
           609ms dev-hugepages.mount
           483ms NetworkManager-wait-online.servic

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

I suggest you boot to Ubuntu live CD / USB desktop and run a full fsck on the file system (while it is unmounted)

Can you help with this problem?

Provide an answer of your own, or ask Ravi Kumar for more information if necessary.

To post a message you must log in.