Bug#380425: mdadm: /etc/cron.d/mdadm doesn't just run on the first Sunday of every month...

jacob jacob at heider.homelinux.net
Sun Jul 30 05:54:03 UTC 2006


Package: mdadm
Version: 2.5.2-7
Severity: normal


According to man 5 crontab:

"Note: The day of a command's execution can be specified by two fields
-- day of month, and day of  week.   If  both  fields  are restricted 
(i.e., aren't *), the command will be run when either field matches 
the current time.  For example, ``30 4 1,15 * 5'' would cause a command
to be run at 4:30 am on the 1st and 15th of each month, plus every Friday."

Since /etc/cron.d/mdadm says:

6 1 1-7 * 7 root [ -x /usr/share/mdadm/checkarray ] && /usr/share/mdadm/checkarray --cron --all --quiet

I can expect it to run every Sunday, plus the whole first week of the
month. That's a lot more verifying than I need. This is using the
standard debian cron package, 3.0pl1-95. A better choice would be to
pick a day of the month, and run at 1:06 then. Or, have it run every
Sunday, but do nothing if `date +%d` > 7.

Jacob

-- Package-specific info:
--- mount output
/dev/md2 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hdg3 on /home type xfs (rw)
/dev/md0 on /mnt/video type xfs (rw)
/dev/md1 on /mnt/mp3 type xfs (rw)
/dev/md3 on /mnt/scratch type xfs (rw)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
automount(pid3163) on /misc type autofs (rw,fd=4,pgrp=3163,minproto=2,maxproto=4)
nfsd on /proc/fs/nfsd type nfsd (rw)
pixie:/mnt/video on /home/jacob/pixie type nfs (rw,noexec,nosuid,nodev,soft,intr,addr=192.168.1.6,user=jacob)

--- mdadm.conf
DEVICE partitions
ARRAY /dev/md0 level=raid5 num-devices=4 UUID=3dce578a:8b7bdb5e:adc9138e:aa71d832
ARRAY /dev/md1 level=raid5 num-devices=3 UUID=5d7f878a:9076ab14:38cc1828:059ae4ec
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=69f77581:2a6a86fc:2b91a149:d9b6c148
ARRAY /dev/md3 level=linear num-devices=2 UUID=2b1b3433:b5a59997:fb093e06:ea9a751e
MAILADDR root

--- /proc/mdstat:
Personalities : [raid1] [raid5] [raid4] [linear] 
md3 : active linear hdg6[0] hdh1[1]
      25245888 blocks 64k rounding
      
md1 : active raid5 hde6[0] hdg2[2] hdf5[1]
      115266176 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      	resync=DELAYED
      
md0 : active raid5 hdh5[0] hdg1[3] hdf7[2] hde5[1]
      178706304 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
      [==========>..........]  resync = 50.9% (30322304/59568768) finish=78.4min speed=6214K/sec
      
md2 : active raid1 hdf9[0] hdg5[1]
      5108544 blocks [2/2] [UU]
      	resync=DELAYED
      
unused devices: <none>

--- /proc/partitions:
major minor  #blocks  name

  33     0  117220824 hde
  33     1          1 hde1
  33     5   59585022 hde5
  33     6   57633156 hde6
  33    64  195360984 hdf
  33    65          1 hdf1
  33    69   57641157 hdf5
  33    70   31455207 hdf6
  33    71   59577020 hdf7
  33    72   29856802 hdf8
  33    73    5116671 hdf9
  33    74   11711353 hdf10
  34     0  156290904 hdg
  34     1   59568988 hdg1
  34     2   57641220 hdg2
  34     3   20482875 hdg3
  34     4          1 hdg4
  34     5    5124703 hdg5
  34     6   13470471 hdg6
  34    64   78150744 hdh
  34    65   11775613 hdh1
  34    68          1 hdh4
  34    69   60251751 hdh5
  34    70    5606653 hdh6
  34    71     514048 hdh7
   9     2    5108544 md2
   9     0  178706304 md0
   9     1  115266176 md1
   9     3   25245888 md3

--- initrd.img-2.6.16-2-686:

--- /proc/modules:
linear 5312 1 - Live 0xe1324000
raid5 21888 2 - Live 0xe0af1000
xor 13896 1 raid5, Live 0xe131f000
dm_mod 47892 0 - Live 0xe1b91000
raid1 19264 1 - Live 0xe0863000
md_mod 63956 7 linear,raid5,raid1, Live 0xe08b6000

--- volume detail:


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages mdadm depends on:
ii  debconf [debconf-2.0]         1.5.2      Debian configuration management sy
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  lsb-base                      3.1-10     Linux Standard Base 3.1 init scrip
ii  makedev                       2.3.1-82   creates device files in /dev

Versions of packages mdadm recommends:
ii  exim4-daemon-light [mail-tran 4.62-2     lightweight exim MTA (v4) daemon

-- debconf information:
* mdadm/autostart: true
* mdadm/mail_to: root
  mdadm/initrdstart: /dev/md2
* mdadm/autocheck: true
* mdadm/warning:
* mdadm/start_daemon: true




More information about the pkg-mdadm-devel mailing list