From owner-freebsd-questions Wed Oct 9 1:33:56 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7A5B37B401 for ; Wed, 9 Oct 2002 01:33:51 -0700 (PDT) Received: from empty1.ekahuna.com (empty1.ekahuna.com [198.144.200.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DE7A43E42 for ; Wed, 9 Oct 2002 01:33:47 -0700 (PDT) (envelope-from pjklist@ekahuna.com) Received: from pc-17 (dyn205.ekahuna.com [198.144.200.205]) by empty1.ekahuna.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com for ; Wed, 9 Oct 2002 01:33:46 -0700 From: "Philip J. Koenig" Organization: The Electric Kahuna Organization To: questions@FreeBSD.ORG Date: Wed, 09 Oct 2002 01:33:44 -0700 MIME-Version: 1.0 Subject: "amnesiac" disklabel on RAID logical drive Reply-To: pjklist@ekahuna.com X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-ID: <20021009083346615.AAA1134@empty1.ekahuna.com@dyn205.ekahuna.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I posted about this a few weeks ago but didn't get many responses and I really have to fix it now. Somewhere in the course of using sysinstall it blew away part of my disklabel. This box has an AMI RAID controller on it which I want to replace. (not least because of its horrible error handling - ie not being able to delete a logical drive without replacing the failed disk first - catch-22) It also has an embedded Adaptec SCSI interface, but I can't even partition or backup to that drive while I've got this disklabel problem on the RAID controller. On other boxes I have with standard SCSI interfaces, the disklabel for the whole device pretty much matches the disklabel for the FreeBSD slice. But I don't know how this should look for the RAID controller. There are 2 logical drives defined on the RAID but one is failed/offline. Pertinent snippets from dmesg: > amr0: mem 0xfc000000-0xfc00ffff irq 9 at device 7.1 on pci2 > amr0: Firmware H79N, BIOS 2.10, 32MB RAM > ahc0: port 0x2000-0x20ff mem 0xf4100000-0xf4100fff irq 2 at device 12.0 on pci0 > aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs > ahc1: port 0x2400-0x24ff mem 0xf4101000-0xf4101fff irq 2 at device 12.1 on pci0 > aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs > amrd0: on amr0 > amrd0: 8714MB (17846272 sectors) RAID 1 (optimal) > amrd1: on amr0 > amrd1: 8714MB (17846272 sectors) RAID 0 (offline) > > Mounting root from ufs:/dev/amrd0s2a > da0 at ahc0 bus 0 target 3 lun 0 > da0: Fixed Direct Access SCSI-4 device > da0: 80.000MB/s transfers (40.000MHz, offset 127, 16bit), Tagged Queueing Enabled > da0: 8715MB (17850264 512 byte sectors: 255H 63S/T 1111C) If I try to read the disklabel directly from the whole disk, I get this error: > # disklabel -r amrd0 > disklabel: bad pack magic number (label is damaged, or pack is unlabeled) But if I specify the slice, it seems OK: > # disklabel -r amrd0s2 > > # /dev/amrd0s2: > type: ESDI > disk: amrd0s2 > label: > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 1092 > sectors/unit: 17542980 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0 > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 409600 0 4.2BSD 2048 16384 97 # (Cyl. 0 - 25*) > b: 1024000 409600 swap # (Cyl. 25*- 89*) > c: 17542980 0 unused 0 0 # (Cyl. 0 - 1091) > e: 2097152 1433600 4.2BSD 2048 16384 89 # (Cyl. 89*- 219*) > f: 2097152 3530752 4.2BSD 2048 16384 89 # (Cyl. 219*- 350*) > g: 11915076 5627904 4.2BSD 2048 16384 89 # (Cyl. 350*- 1091*) However if I attempt to read it from the in-core copy for the whole device, it says it's "amnesiac" (doing it for the FreeBSD slice only looks OK like above): > # disklabel amrd0 > > # /dev/amrd0: > type: SCSI > disk: amnesiac > label: fictitious > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 1110 > sectors/unit: 17846272 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0 > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 17846272 0 unused 0 0 # (Cyl. 0 - 1110*) So I'm not sure what the disklabel for amrd0 should look like - certainly it seems it's not as simple as copying the disklabel from amrd0s2 like I can sometimes do with a non-RAID system. All I want to do is copy off the data and get rid of this AMI controller, but with the disklabel in this condition I can't even use dump, or partition a 2nd disk on a different controller. (more info below) Suggestions appreciated! Phil > # mount > > /dev/amrd0s2a on / (ufs, local) > /dev/amrd0s2f on /obj (ufs, local, soft-updates) > /dev/amrd0s2g on /usr (ufs, local, soft-updates) > /dev/amrd0s2e on /var (ufs, local, soft-updates) > procfs on /proc (procfs, local) > # df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/amrd0s2a 201518 46714 138684 25% / > /dev/amrd0s2f 1032142 385096 564476 41% /obj > /dev/amrd0s2g 5864592 956586 4438840 18% /usr > /dev/amrd0s2e 1032142 3398 946174 0% /var > procfs 4 4 0 100% /proc > # cat /etc/fstab > > # See the fstab(5) manual page for important information on automatic mounts > # of network filesystems before modifying this file. > # > # Device Mountpoint FStype Options Dump Pass# > /dev/amrd0s2b none swap sw 0 0 > /dev/amrd0s2a / ufs rw 1 1 > /dev/amrd0s2f /obj ufs rw 2 2 > /dev/amrd0s2g /usr ufs rw 2 2 > /dev/amrd0s2e /var ufs rw 2 2 > /dev/acd0c /cdrom cd9660 ro,noauto 0 0 > proc /proc procfs rw 0 0 -- Philip J. Koenig pjklist@ekahuna.com Electric Kahuna Systems -- Computers & Communications for the New Millenium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message