Re: Hard disk, format, filesystem SOLVED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Jussi Hirvi wrote:
Les Mikesell <lesmikesell@xxxxxxxxx> escribio (15.8.2008 20:01)
I would have just used fdisk instead of partd.  If you are adding this
to a raid, you don't need a filesystem, just a partition of the right
size.  The contents are going to be wiped by the raid sync anyway.

Thanks for comment. Fdisk was recommended me by another experienced user
too, so there is probably a good reason. Though I don't know, what's wrong
with using parted.
BTW, this problem partition was not the raid1 partition, but a copy of the
boot partition on the startup disk. In case the boot disk ever fails, I hope
I can make the 2nd disk bootable by just installing grub.

- Jussi

I had this same boot problem you had and i found the following script made by Alex Tkachenko (Thanks Alex!):


====================== CUT HERE ====================================
#!/bin/sh
#
# Update MBR on both mirror drives
# (grub/swraid has problems updating the slave, # as of RHEL3)
# Should be run after grub rpm updates as well
#
# By Alex Tkachenko <alex at ingrian.com>

ADMINDIR=/root/admin



if [ ! -d $ADMINDIR ]
then
        echo $ADMINDIR does not exists.
        echo Creating $ADMINDIR for storing boot sector backups...
        mkdir -p $ADMINDIR
else
        echo $ADMINDIR exists.
fi


BOOT_ARRAY=`df /boot | awk '/dev/{print $1}'`

# Select only active disks (skip spares)
DISKS=`mdadm --query --detail /dev/md0 | awk '/active sync/{print $7}'| sed '
s@/dev/@@g
s/,/ /g
s/[0-9]//g
'`

for d in $DISKS
do

        cat <<EOF | /sbin/grub --batch --no-floppy
device (hd0) /dev/$d
root (hd0,0)
setup (hd0)
quit
EOF

        # Save updated mbr
        dd if=/dev/$d of=$ADMINDIR/mbr.$d count=1
done
====================== CUT HERE ====================================



Guy Boisvert, ing.
IngTegration inc.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux