High CPU load for 1:30 minutes when mounting ext4-raid partition

Posted by sirion on Ask Ubuntu See other posts from Ask Ubuntu or by sirion
Published on 2012-11-05T17:25:21Z Indexed on 2012/11/09 17:21 UTC
Read the original article Hit count: 249

Filed under:
|
|

I have a raid 5 (software) with 5x2TB drives. I encrypted the raid with cryptsetup and put an ext4-partition on top.

In the beginning opening and mounting the raid took less than 10 seconds, now (for a few weeks) mounting alone takes 1:30 minutes and the cpu stays around 93% the whole time:

The output of "time sudo mount /dev/mapper/8000 /media/8000" is:

real    1m31.952s
user    0m0.008s
sys     1m25.229s

At the same time only one line is added to /var/log/syslog:

kernel: [ 2240.921381] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)

My Ubuntu-version is "12.04.1 LTS" and no updates are pending.

I checked the partition with fsck, but it says that all is ok.

The "cryptsetup luksOpen" command only takes a few seconds.


I also tried changing the raid-bitmap (as it was suggested in some forum) but it did not change the behaviour.

sudo mdadm --grow /dev/md0 -b internal

and

sudo mdadm --grow /dev/md0 -b none

I had the idea that it might be the hardware being slow, but a read test with "sudo hdparm -t /dev/md0" spit out values between 62 and 159 MB/sec:

Timing buffered disk reads: 382 MB in  3.00 seconds = 127.14 MB/sec
Timing buffered disk reads: 482 MB in  3.02 seconds = 159.62 MB/sec
Timing buffered disk reads: 190 MB in  3.03 seconds =  62.65 MB/sec
Timing buffered disk reads: 474 MB in  3.02 seconds = 157.12 MB/sec

Although I think it is strange that the read rate jumps by more than 100% - could that mean something?

The speed test when reading from the mapped (decrypted) device shows similar behavior, although it is of course much slower. "sudo hdparm -t /dev/mapper/8000":

Timing buffered disk reads:  56 MB in  3.02 seconds =  18.54 MB/sec
Timing buffered disk reads: 122 MB in  3.09 seconds =  39.43 MB/sec
Timing buffered disk reads: 134 MB in  3.02 seconds =  44.35 MB/sec

The output of a verbose mount "mount -vvv /dev/mapper/8000 /media/8000" does not help much:

mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "/dev/mapper/8000"
mount: node:  "/media/8000"
mount: types: "(null)"
mount: opts:  "(null)"
mount: you didn't specify a filesystem type for /dev/mapper/8000
       I will try type ext4
mount: mount(2) syscall: source: "/dev/mapper/8000", target: "/media/8000", filesystemtype: "ext4", mountflags: -1058209792, data: (null)

Any idea where I could find additional information on why mounting takes so long, or what additional tests I could run?

© Ask Ubuntu or respective owner

Related posts about mount

  • 12.10 update breaks NFS mount

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I've just upgraded to the latest 12.10 beta. Rebooted twice. The problem is with the NFS folders not mounting, here's a verbose log. # mount -v myserver:/nfs_shared/tools /tools/ mount: no type was given - I'll assume nfs because of the colon mount.nfs: timeout set for Mon Oct 1 11:42:28 2012 mount… >>> More

  • Mount SMB / AFP 13.10

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I cannot seem to get Ubuntu to mount a mac share via SMB or AFP. I've tried the following... AFP: apt-get install afpfs-ng-utils mount_afp afp://user:password@localip/share /mnt/share Error given: "Could not connect, never got a reponse to getstatus, Connection timed out". Which is odd as I can… >>> More

  • Mount Return Code for CIFS mount

    as seen on Server Fault - Search for 'Server Fault'
    When I run the following command (as root or via sudo) from a bash script I get an exit status (or return code in mount man page parlance) of 1: mount -v -t cifs //nasbox/volume /tmpdir/ --verbose -o credentials=/root/cifsid & /tmp/mylog It outputs the following into the myflog file: parsing… >>> More

  • Disable raid member check upon mount to mount damaged nvidia raid1 member

    as seen on Server Fault - Search for 'Server Fault'
    Hi, A friend of mine destroyed his Nvidia RAID1 array somehow and in trying to fix it, he ended up with a non-working array. Because of the RAID metadata, the actual disk data was stored at an offset from the beginning. I was able to identify this offset with dd and a hexeditor and then I used losetup… >>> More

  • Network shares do not mount.

    as seen on Super User - Search for 'Super User'
    My network shares were mounting fine yesterday.. suddenly they are not. They were mounting fine for the last two weeks or however long since I added them. When I run sudo mount -a I get the following error: topsy@monolyth:~$ sudo mount -a mount error(12): Cannot allocate memory Refer to the mount… >>> More

Related posts about raid