Samba and RAID 1 using gmirror on 2 new disks

L Goodwin xrayv19 at yahoo.com
Thu Apr 19 22:54:23 UTC 2007


There appears to be an issue with da1. 
Please advise as to what the problem is and how to resolve it.

I'm getting similar "SCSI parity error" messages for BOTH of the following commands:

1) gmirror label -b load sambavol /dev/da1 /dev/da2
2) fdisk -BI da1

Here is the output from the gmirror call:
------------------------------------------------------------------------------------------------------
(da1:ahc0:0:0:1:0): WRITE(10): CDB: 2a 0 1 11 61 4f 0 0 10
(da1:ahc0:0:0:1:0): CAM Status: SCSI Status Error
(da1:ahc0:0:0:1:0): SCSI Status: Check Condition
(da1:ahc0:0:0:1:0): ABORTED COMMAND asc:47,0
(da1:ahc0:0:0:1:0): SCSI parity error
...
(da1:ahc0:0:0:1:0): Retries Exhausted
Can't store metadata on /dev/da1: Input/output error.
Not fully done.
------------------------------------------------------------------------------------------------------
 
...and output from fdisk (nearly identical):
------------------------------------------------------------------------------------------------------
WRITE(06): CDB: a 0 0 0 1 0
CAM Status: SCSI Status Error
SCSI Status: Check Condition
ABORTED COMMAND asc:47,0
SCSI parity error
Retrying Command (per Sense Data)
...
Retries Exhausted
fdisk: Failed to write sector zero
 ------------------------------------------------------------------------------------------------------
 
Please note:
* After disk swap, verified that these 3 SCSI drives appear as DEV 0,1 and 2, respectively in the SCSI Disk Utilities device listing.
* Both da1 and da2 appear in /var/run/dmesg.boot. 
* I have the SCSI ID jumpers set correctly for all 3 drives.
* I ran the Hitachi/IBM drive fitness test (Quick Test only) on both of the 9GB drives before moving them from the other server -- both passed. Did not run the Advanced Test on these drives

John Nielsen <lists at jnielsen.net> wrote: On Thursday 19 April 2007 03:24:36 pm L Goodwin wrote:
> Hello. I have a server with 3 SCSI drives. FreeBSD is installed on da0
> (4.3GB), and da1 and da2 (both identical 9GB drives) are to be used in a
> RAID 1 array for file storage on a LAN with Windows XP and Vista clients,
> using Samba to share the filesystem on da1. Backups will be taken from da2.
>
> Drives da1 and da2 are currently "unused" (reclaimed from a Windows
> server). I have not done anything to prepare these 2 drives yet.
>
> I also have not configured Samba yet.
>
> Please walk me through the process of setting up a FreeBSD 6.2 fileserver
> given these conditions?
>
> I tried configuring the RAID1 array using the following sources, but got
> judging from the errors I got, it looks like I need to prepare da1/da2
> first:
>
> http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.html

man gmirror
man newfs
man mount
man fstab
man smb.conf
man samba

gmirror label -b load sambavol /dev/da1 /dev/da2
newfs -U /dev/mirror/sambavol
mkdir /sambavol
mount /dev/mirror/sambavol /sambavol
echo '/dev/mirror/sambavol /sambavol ufs rw 2 2' >> /etc/fstab

The samba config depends a log on how you want to use the share and handle 
authentication and permissions, etc. The sample config file has most of what 
you need.  Here's a starting point for a section to share a /sambavol 
directory with a samba share name of sambavol:

[sambavol]
   path = /sambavol
   browseable = yes
   writable = yes
   printable = no

You will of course need a correctly configured global section and you'll 
probably want additional entries in the volume section like "public", "guest 
ok", "only guest", etc.

JN



       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.


More information about the freebsd-questions mailing list