Archive for the ‘Redhat/Centos’ Category.

mdadm Linux software Raid raidhotadd

I’m sure there used to be a thing called raidhotadd, anyway these days it seems to be mdadm. We have a few machines with software raid, and very occasionally a md device flags a disk as dead but adding it back into the array fixes the problem.

Anyway, I never remember this, so to remove and then re-add a disk from a md device do the following:


[root@host ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md0 : active raid1 sdc1[0] sdd1[2](F)
143371968 blocks [2/1] [U_]

md2 : active raid1 sdb2[1] sda2[0]
71577536 blocks [2/2] [UU]

unused devices:
[root@host ~]# fdisk -l /dev/sdd

Disk /dev/sdd: 146.8 GB, 146815737856 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 17849 143372061 fd Linux raid autodetect
[root@host ~]# mdadm /dev/md0 --remove /dev/sdd1
mdadm: hot removed /dev/sdd1
[root@host ~]# mdadm /dev/md0 --add /dev/sdd1
mdadm: re-added /dev/sdd1
[root@host ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md0 : active raid1 sdd1[2] sdc1[0]
143371968 blocks [2/1] [U_]
[>....................] recovery = 0.2% (297280/143371968) finish=32.0min speed=74320K/sec

md2 : active raid1 sdb2[1] sda2[0]
71577536 blocks [2/2] [UU]

unused devices:
[root@host ~]#

And there we can see from /proc/mdstat that the md device will be synchronised and happy again soon.

CentOS 4.x and OMSA 6.1 – Update breaks IPMI

Just recently I upgraded a Centos 4 machine which broke OMSA, this post helped me fix it.

djbdns, daemontools and ucspi-tcp RPMS

Every so often I need a copy of one or all of these on a new machine. I tend to normally use RPM based distros and always have issues trying to find RPMS of these packages. As a result I’ve packaged them up and put them in my svn repo.

Feel free to checkout that directory, it includes a readme of how to build them for a system I’ve yet to need them on. replace the fc7 or el5 with something appropriate for your distribution.

Direct download links:

Redhat/Centos 5:

Fedora 7:

VMware any-any patch

I’ve had troubles with vmware on redhat/fedora in the past. (See here or here) But I’ve now found a one stop solution to putting VMware on all things RedHat or Fedora. Follow the instructions in this VMware forum post. This has worked for me with VMware Server on Fedora 6 and 7 and also VMware Workstation 6 on Fedora 7. Thanks Petr!