Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: axessit on May 30, 2011, 09:21:33 AM
-
How can I tell what physical hard drive my filesystem is on?
I have two hard drives sda and sdb. RAID is working for the boot volume only (/dev/md1). I need to rebuild the second RAID, but how can I tell which drive is running the main filesystem as I did have both drives running RAID OK before a reboot.
-
axessit
It should be mirrored on both drives if RAID1 is working.
Show output of
cat /proc/mdstat
Review your drives with
fdisk -l |more
Please read the wiki RAID article
-
It's not good,
[root@server ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda1[0] sdb1[1]
104320 blocks [2/2] [UU]
unused devices: <none>
[root@server ~]#
see Bug 6631
-
axessit
I would be very careful what you do next, you may lose all data (if it still exists).
Your data may still exist on the drives, it might just be that they have both been partially tossed out of the array.
You can boot up to the install CD in rescue mode
see http://wiki.contribs.org/Booting#Rescue_Mode_Help
and then see if data exists on all partitions, and then run tests and checks on both hard drives to confirm they are OK or not
eg use smartctl
see http://wiki.contribs.org/Monitor_Disk_Health
Do you have a good & current backup ?
It might be good to physically remove one or both drives from the server and set them aside while you play & learn about rebuilding arrays with clean disk(s) without data, if you are not already competent in that area.
See this re RAID
http://wiki.contribs.org/Raid
You can use this Howto to rebuild the array
http://wiki.contribs.org/Raid:Manual_Rebuild
Oh I see further comments in bug 6631.
I think what you manually did when resizing the array is the cause of the problem, ie user error.
-
Bug classed not a bug, so back here.
The server will reboot, but the raid is still broken. The following is from the mesages logs.
Main message log
Jun 23 09:28:45 server kernel: Vendor: ATA Model: WDC WD5000AAKX-0 Rev: 15.0
Jun 23 09:28:45 server kernel: Type: Direct-Access ANSI SCSI revision: 05
Jun 23 09:28:45 server kernel: SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Jun 23 09:28:45 server kernel: SCSI device sda: drive cache: write back
Jun 23 09:28:45 server kernel: SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Jun 23 09:28:45 server kernel: SCSI device sda: drive cache: write back
Jun 23 09:28:45 server kernel: sda: sda1 sda2
Jun 23 09:28:45 server kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Jun 23 09:28:45 server kernel: Vendor: ATA Model: WDC WD5000AAKX-0 Rev: 15.0
Jun 23 09:28:45 server kernel: Type: Direct-Access ANSI SCSI revision: 05
Jun 23 09:28:45 server kernel: SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)
Jun 23 09:28:45 server kernel: SCSI device sdb: drive cache: write back
Jun 23 09:28:45 server kernel: SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)
Jun 23 09:28:45 server kernel: SCSI device sdb: drive cache: write back
Jun 23 09:28:45 server kernel: sdb: sdb1 sdb2
Jun 23 09:28:45 server kernel: Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0
Jun 23 09:28:45 server kernel: Vendor: hp Model: DVDROM DH20N Rev: EB00
Jun 23 09:28:45 server kernel: Type: CD-ROM ANSI SCSI revision: 05
Jun 23 09:28:45 server kernel: device-mapper: 4.5.5-ioctl (2006-12-01) initialised: dm-devel@redhat.com
Jun 23 09:28:45 server kernel: md: raid1 personality registered as nr 3
Jun 23 09:28:45 server kernel: md: md1 stopped.
Jun 23 09:28:45 server kernel: md: bind<sdb1>
Jun 23 09:28:45 server kernel: md: bind<sda1>
Jun 23 09:28:45 server kernel: raid1: raid set md1 active with 2 out of 2 mirrors
Jun 23 09:28:45 server kernel: md: md2 stopped.
Jun 23 09:28:45 server kernel: EXT3-fs: INFO: recovery required on readonly filesystem.
Jun 23 09:28:45 server kernel: EXT3-fs: write access will be enabled during recovery.
Jun 23 09:28:45 server kernel: kjournald starting. Commit interval 5 seconds
Jun 23 09:28:45 server kernel: EXT3-fs: dm-0: orphan cleanup on readonly fs
Jun 23 09:28:45 server kernel: ext3_orphan_cleanup: deleting unreferenced inode 15960882
Jun 23 09:28:45 server kernel: EXT3-fs: dm-0: 1 orphan inode deleted
Jun 23 09:28:45 server kernel: EXT3-fs: recovery complete.
Jun 23 09:28:45 server kernel: EXT3-fs: mounted filesystem with ordered data mode.
.....
Jun 23 09:28:45 server kernel: md: Autodetecting RAID arrays.
Jun 23 09:28:45 server kernel: md: could not bd_claim sda1.
Jun 23 09:28:45 server kernel: md: invalid raid superblock magic on sda2
Jun 23 09:28:45 server kernel: md: sda2 has invalid sb, not importing!
Jun 23 09:28:45 server kernel: md: could not bd_claim sdb1.
Jun 23 09:28:45 server kernel: md: could not bd_claim sdb2.
Jun 23 09:28:45 server kernel: md: autorun ...
Jun 23 09:28:45 server kernel: md: ... autorun DONE.
.......
Jun 23 09:28:45 server kernel: md: md2 stopped.
And for fun
[root@server ~]# mount
/dev/mapper/main-root on / type ext3 (rw,usrquota,grpquota)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/md1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@server ~]#
and
[root@server ~]# more /etc/fstab
#------------------------------------------------------------
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the SME server software. A few entries are updated during
# the template processing of the file and white space is removed,
# but otherwise changes to the file are preserved.
# For more information, see http://www.e-smith.org/custom/ and
# the template fragments in /etc/e-smith/templates/etc/fstab/.
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/main/root / ext3 usrquota,grpquota
1 1
/dev/md1 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/main/swap swap swap defaults 0 0
/dev/sdd1 /media/usbdisk ext3 defaults
/dev/scd0 /media/cdrom auto pamconsole,exec,noauto,m
anaged 0 0
[root@server ~]#
from the bootlog
Jun 23 09:28:35 server fsck: /dev/main/root: clean, 579408/29868032 files, 36939551/59736064 blocks
Jun 23 09:28:35 server rc.sysinit: Checking root filesystem succeeded
Jun 23 09:28:35 server rc.sysinit: Remounting root filesystem in read-write mode: succeeded
Jun 23 09:28:37 server rc.sysinit: Setting up Logical Volume Management: succeeded
Jun 23 09:28:39 server rc.sysinit: Setting up Logical Volume Management: succeeded
Jun 23 09:28:39 server fsck: /dev/md1: recovering journal
Jun 23 09:28:40 server fsck: /dev/md1: clean, 54/26104 files, 26742/104320 blocks
Jun 23 09:28:40 server rc.sysinit: Checking filesystems succeeded
Jun 23 09:28:40 server mount: mount: special device /dev/sdd1 does not exist
Jun 23 09:28:40 server rc.sysinit: Mounting local filesystems: failed
Jun 23 09:28:40 server rc.sysinit: Enabling local filesystem quotas: succeeded
Jun 23 09:28:40 server rc.sysinit: Enabling swap space: succeeded
and the raidmonitor log
2011-06-23 09:28:46.290694500 Event: DeviceDisappeared, Device: /dev/md2, Member:
2011-06-23 09:28:46.356698500 Event: SparesMissing, Device: /dev/md1, Member:
So how can I rebuild the second RAID volume ?