LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   upgraded servers, is RAID1 correct?(CentOS 5.1) (https://www.linuxquestions.org/questions/linux-server-73/upgraded-servers-is-raid1-correct-centos-5-1-a-643910/)

ncsuapex 05-21-2008 08:16 PM

upgraded servers, is RAID1 correct?(CentOS 5.1)
 
Ive recently upgraded 2 servers to CentOS 5.1 and I just realized that I didn't account for the RAID1 during the upgrade so I need some advice to see if my RAID is functioning correctly.

setup

2.6.18-53.1.14.el5

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md2 55G 4.7G 47G 9% /
/dev/md1 124M 24M 94M 21% /boot
none 1.9G 0 1.9G 0% /dev/shm



fdisk -l

Disk /dev/hda: 61.4 GB, 61492838400 bytes
16 heads, 63 sectors/track, 119150 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 260 131008+ fd Linux raid autodetect
/dev/hda2 261 4421 2097144 fd Linux raid autodetect
/dev/hda3 4422 119150 57823416 fd Linux raid autodetect

Disk /dev/hdb: 61.4 GB, 61492838400 bytes
16 heads, 63 sectors/track, 119150 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 260 131008+ fd Linux raid autodetect
/dev/hdb2 261 4421 2097144 fd Linux raid autodetect
/dev/hdb3 4422 119150 57823416 fd Linux raid autodetect

Disk /dev/md2: 59.2 GB, 59210989568 bytes
2 heads, 4 sectors/track, 14455808 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md0: 2147 MB, 2147221504 bytes
2 heads, 4 sectors/track, 524224 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 133 MB, 133955584 bytes
2 heads, 4 sectors/track, 32704 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table



cat mdstat
Personalities : [raid1]
md1 : active raid1 hdb1[1] hda1[0]
130816 blocks [2/2] [UU]

md0 : active raid1 hdb2[1] hda2[0]
2096896 blocks [2/2] [UU]

md2 : active raid1 hdb3[1] hda3[0]
57823232 blocks [2/2] [UU]

unused devices: <none>




what bugs me is the "Disk /dev/md? doesn't contain a valid partition table"


Should I be concerned? Also in future upgrades is there anything I should do before/after to ensure the RAID is correct after the upgrade?

Speedy Gonzales 05-22-2008 03:05 AM

I have been using RAID 1 for a long time now and as long as BOTH [UU] U's are there it is fully funtional

"cat mdstat
Personalities : [raid1]
md1 : active raid1 hdb1[1] hda1[0]
130816 blocks [2/2] [UU]

md0 : active raid1 hdb2[1] hda2[0]
2096896 blocks [2/2] [UU]

md2 : active raid1 hdb3[1] hda3[0]
57823232 blocks [2/2] [UU]

unused devices: <none>"

ncsuapex 05-22-2008 06:27 AM

thanks. Thats kind of what I had thought.. But the "does not contain a valid partition table" spooked me

ncsuapex 05-22-2008 01:05 PM

i ran a fdisk /dev/md? on each of the devices and came back with this:

fdisk /dev/md2
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 14455808.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.




all I did was a w(write) and on /dev/md0 amd md1 it synced pretty quickly(small partitions) on md2 it's taking a while. Did I screw up by doing this??

ncsuapex 05-27-2008 09:06 AM

I recreated the RAID1 environment on a test box, complete from install to upgrade and got the same not a valid partition errors, I did the fdisk /dev/md? and did option w(write) and rebooted. So that seemed to work ok.


All times are GMT -5. The time now is 07:47 AM.