Big delay when mounting hugh partition.


12 posts
by LaurenceS » Sat Dec 22, 2012 10:43 pm
I have a 12Tb partition comprising of 4 x 3Tb disks. Setup is LVM (/dev/mapper/pi-backups)
I can make a file system OK, mkfs.ext4 /dev/mapper/pi-backups.
I can fsck OK, fsck -f -y /dev/mapper/pi-backups

However, when I try to mount the partition (mount /dev/mapper/pi-backups /mnt/output) I get a 47 minute delay until a prompt returns (CPU working hard during this period & a kill -9 on the mount process does not work if tried), the mount always succeeds ...

df -h

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/pi-backups 11T 91G 11T 1% /mnt/output

If I unplug the StarTech unit (that holds the disks) and plug into another machine (fedora 9 VIA ITX in this case) the mount is more or less instant as one might expect. Anyone know what might be going on? Kernel problem?

The only thing I see in /var/log/messages is ..

[sda] Attached SCSI disk
[sda] Very big device. Trying to use READ CAPACITY(16).
[sdb] Attached SCSI disk
[sdb] Very big device. Trying to use READ CAPACITY(16).
[sdc] Attached SCSI disk
[sdc] Very big device. Trying to use READ CAPACITY(16).
[sdd] Attached SCSI disk
[sdd] Very big device. Trying to use READ CAPACITY(16).

After physically powering on disks, Then after issuing the mount command wait 47 minutes, and ..

EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)

Here's the contents of /etc/os-release ..
PRETTY_NAME="Debian GNU/Linux wheezy/sid"
NAME="Debian GNU/Linux"
ID=debian

Any pointers would be appreciated.
Laurence
Posts: 7
Joined: Sat Dec 22, 2012 9:31 pm
Location: Warwick, UK
by Sander » Sun Dec 23, 2012 9:18 pm
Did you Google "Very big device. Trying to use"? I did, and some pointers:

CONFIG_LBD=y like http://kernel.xc.net/html/linux-2.6.29/x86/LBD says, but not sure if it is x86 only. It seems only on 32-bit, not on 64-bit. So: is your other system 64-bit?

https://patchwork.kernel.org/patch/19284/ for an (other?) explanation
User avatar
Posts: 174
Joined: Wed Aug 31, 2011 1:01 pm
by LaurenceS » Mon Dec 24, 2012 1:22 pm
Thanks very much for that, at last I'm heading in the right direction (one hopes). As for google I had spent quite a time searching but obviously didn't come up with the magic string. One thing for sure, when huge becomes hugh all the time in ones post it's time to give the screen a rest.

Thanks again and I will report back when I have the problem sorted and more importantly I'll explain how I fixed it. As for the other machine, it's the 32 bit version of fedora 9 (2.6.27.25-78.2.56.fc9.i686) and a good few moons back now I compiled it from source. The CONFIG_LBD param in .config is set to 'y'.
Posts: 7
Joined: Sat Dec 22, 2012 9:31 pm
Location: Warwick, UK
by Sander » Mon Dec 24, 2012 2:13 pm
I checked the .config on my Raspi for LBD, and it only has LBDAF

CONFIG_LBDAF=y

which is something else.

http://kernel.xc.net/html/linux-2.6.29/arm/#LBD tells LBD depends on CONFIG_BLOCK, which is set to Y to the Raspi's .config.

Code: Select all
pi@raspbian-frank-armhf ~ $ grep -i lbd /home/pi/ELRO/source-dingen/raspberrypi-linux-775d4ce/.config
CONFIG_LBDAF=y


pi@raspbian-frank-armhf ~ $

pi@raspbian-frank-armhf ~ $ grep -i block /home/pi/ELRO/source-dingen/raspberrypi-linux-775d4ce/.config
CONFIG_BLOCK=y


... so I'm a bit confused why CONFIG_LBD is not in the .config ...

I don't know if you can just add CONFIG_LBD=y and then recompile the kernel
User avatar
Posts: 174
Joined: Wed Aug 31, 2011 1:01 pm
by LaurenceS » Mon Dec 24, 2012 9:30 pm
I'm in the middle of a re-compile as I type. Needless to say the pi is busy. Will update after Xmas.
Posts: 7
Joined: Sat Dec 22, 2012 9:31 pm
Location: Warwick, UK
by LaurenceS » Mon Dec 24, 2012 9:51 pm
Sander, I too seem not to have CONFIG_LBD in my running pi kernel .config file. Standby, still recompiling ..

uname -a
Linux pi-thon 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l GNU/Linux
root@pi-thon:> zcat /proc/config.gz | egrep "LBD|CONFIG_BLOCK"
CONFIG_BLOCK=y
CONFIG_LBDAF=y
Posts: 7
Joined: Sat Dec 22, 2012 9:31 pm
Location: Warwick, UK
by Sander » Tue Dec 25, 2012 6:56 am
LaurenceS wrote:Sander, I too seem not to have CONFIG_LBD in my running pi kernel .config file. Standby, still recompiling ..

uname -a
Linux pi-thon 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l GNU/Linux
root@pi-thon:> zcat /proc/config.gz | egrep "LBD|CONFIG_BLOCK"
CONFIG_BLOCK=y
CONFIG_LBDAF=y


And what happens if you add CONFIG_LBD=y in a line after CONFIG_BLOCK=y ?

Disclaimer: I am not sure CONFIG_LBD=y is the problem & solution.
User avatar
Posts: 174
Joined: Wed Aug 31, 2011 1:01 pm
by LaurenceS » Fri Dec 28, 2012 12:28 pm
OK, situation resolved. I too was a little confused with CONFIG_ settings. What I decided to do was rather than spend more time trying to figure it out I'd let the pi do the thinking and let it recompile the latest kernel, I followed instructions from.

http://elinux.org/RPi_Kernel_Compilation

I just took all the defaults when building the new .config. Now as expected my 12TB file systems mounts in a couple of seconds. The kernel versions I'm now using is 3.6.11 and all appears to be working well. Thanks for your help.
Posts: 7
Joined: Sat Dec 22, 2012 9:31 pm
Location: Warwick, UK
by sander2 » Fri Dec 28, 2012 12:52 pm
Cool! Congratulations!

Questions:
What is now the value of CONFIG_LBD= in your .config?
How long did compiling take? 10 - 16 hours?

Sander
Posts: 46
Joined: Wed Jul 04, 2012 2:22 pm
by aaa801 » Fri Dec 28, 2012 4:59 pm
Why arn't you cross compiling the kernel
Posts: 427
Joined: Mon Jun 04, 2012 9:06 pm
Location: Berkshire
by LaurenceS » Fri Dec 28, 2012 10:20 pm
In answer to Sander2's last question there is no CONFIG_LBD, just an CONFIG_LBDAF=y. As for the compile time in can't say. It had been running for 5 hours when I called it a day. In the morning it was done. Yes it could well be 10hrs. Perhaps I'll kick off another rebuild and time it.

As for the cross-compile, I did think about it, but then what's the rush? A couple of years ago I did use a cross compiler to compile up /bin/bash to run on a TomTom, plus a handful of other linux utils. For the TomTom I had to cross compile, but not on the pi, it's a proper computer!

http://trikenav.hopto.org
Posts: 7
Joined: Sat Dec 22, 2012 9:31 pm
Location: Warwick, UK
by aaa801 » Fri Dec 28, 2012 10:42 pm
LaurenceS wrote:In answer to Sander2's last question there is no CONFIG_LBD, just an CONFIG_LBDAF=y. As for the compile time in can't say. It had been running for 5 hours when I called it a day. In the morning it was done. Yes it could well be 10hrs. Perhaps I'll kick off another rebuild and time it.

As for the cross-compile, I did think about it, but then what's the rush? A couple of years ago I did use a cross compiler to compile up /bin/bash to run on a TomTom, plus a handful of other linux utils. For the TomTom I had to cross compile, but not on the pi, it's a proper computer!

http://trikenav.hopto.org


Well the compile compiles in about 5 mins on my main pc ;)
Dont know about the pi ..
Posts: 427
Joined: Mon Jun 04, 2012 9:06 pm
Location: Berkshire