You are not logged in.

#1 2013-12-04 21:14:29

mbauhardt
Member
Registered: 2013-12-04
Posts: 5

[SOLVED] mdadm - disk spin down does not work

Hi,
i have a question regarding mdadm and disk spin down.

i installed mdadm and created a raid 1 with two 2,5 sata disks with ext4 filesystem.

mdadm --create --verbose /dev/md0 --auto=yes --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1

After the creation a had to wait around 20 hours until the resync was done. Checked via

cat /proc/mdstat

. After the resync i created ext4 filesystem on it.

fdisk /dev/md0
mkfs.ext4 /dev/md0

After mounting /dev/md0 to /mnt/raid i can create and read files. everything is fine.
But the disks does not go into sleep mode. Also using hd-idle or hdparm does not work. When using

hdparm -y /dev/sd[bc]

the disks try to go into sleep mode immediately for around 1sec but then wake up again.
Except when unmount the raid via

umount /mnt/raid

, the disks goes into sleep mode (spin down).

So when the raid is mounted, it looks like that a process polls the disks every second or so and avoid the spin down. Is this normal?

Thanks for any hint
Marko

Last edited by mbauhardt (2013-12-05 10:33:02)

Offline

#2 2013-12-05 08:11:07

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [SOLVED] mdadm - disk spin down does not work

Hi, do you have AHCI disabled in your BIOS?, if not enable it and try again.

Do you have a SATA controller, and is it set to RAID?, disable it and try again.

Don't know if these steps help you, but thats what I can come up with.

After the creation a had to wait around 20 hours until the resync was done. Checked via

Thats quite some time, I offer you this link (gratis) for future resyncs.http://www.cyberciti.biz/tips/linux-rai … speed.html

Offline

#3 2013-12-05 08:51:09

mbauhardt
Member
Registered: 2013-12-04
Posts: 5

Re: [SOLVED] mdadm - disk spin down does not work

Hi, thanks for your answer!

qinohe wrote:

Hi, do you have AHCI disabled in your BIOS?, if not enable it and try again.

Do you have a SATA controller, and is it set to RAID?, disable it and try again.

Sorry forgot to mention. i'm running arch linux arm on my raspberry pi. the raspberry has no conventional bios. it has a config.txt file but there are no options for ahci.
And the two disks are connected via usb.

anyway i have third disk which is also connected via usb. The same disk like the other two. And this hdd is going into sleep mode when using hd-idle.
But the two disk from the raid doesnt want to spin down. sad

Any other ideas or comments?

Thanks
Marko

Offline

#4 2013-12-05 09:03:56

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [SOLVED] mdadm - disk spin down does not work

If I knew the answer, I would surely help, but since you use a Raspberry Pi, I can't, I have (almost) no knowledge about this device.
So, is https://archarm.org/?page=Start not a much better place to ask advice about this?

Offline

#5 2013-12-05 09:31:45

mbauhardt
Member
Registered: 2013-12-04
Posts: 5

Re: [SOLVED] mdadm - disk spin down does not work

So maybe and hopefully i found the answer smile
i used iotop to see what for processes generates IO. i found

ext4lazyinit

. after using

echo 1 > /proc/sys/vm/block_dump

the logfile shows a lot of entries that blocks are written to /dev/sdb1 and /dev/sdc1. After some googeling i found other articles about noisy disk usage after initialising a disk with ext4. So hopefully i have to wait until the ext4lazyinit process is done. smile

thanks
marko

Offline

#6 2013-12-05 10:28:14

mbauhardt
Member
Registered: 2013-12-04
Posts: 5

Re: [SOLVED] mdadm - disk spin down does not work

Yes, ext4lazyinit was the reason. smile
issue is solved.

Offline

Board footer

Powered by FluxBB