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

Problem with disklabel and filesystem over iSCSI



Hi,

the last days I tried to get a 1TB SAN to work with FreeBSD 7.x. I tried it with the following releases:

FreeBSD web3 7.0-RELEASE FreeBSD 7.0-RELEASE #0: i386
FreeBSD	     7.1-RC1 amd64
FreeBSD	     7.1-RC2 amd64

Unfortunatly I could not get it to work. I think there is a problem with the disklabels. The UFS could not be written successfully. So I tried the same with ZFS. ZFS seems to work. After creating a pool and mounting the FS it can be used normally. But after unmounting the FS and rebooting the system, the FS is corrupted. Remounting the FS without rebooting works without any problems.

Here the "log":

***********************************************************************************

(iSCSI Session successfully created, the device is known as da0)
(creating the partition)

web3# fdisk /dev/da0s1
******* Working on device /dev/da0s1 *******
parameters extracted from in-core disklabel are:
cylinders=99693 heads=255 sectors/track=63 (16065 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=99693 heads=255 sectors/track=63 (16065 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 1601567982 (782015 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 364/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

(writeout the partition table)
web3# dd if=/dev/da0 of=/partition1.bin bs=1 count=64 skip=446 seek=446

***********************************************************************************

(write the label)
web3# bsdlabel -w /dev/da0s1

web3# bsdlabel /dev/da0s1
bsdlabel: /dev/da0s1: no valid label found

(writeout the partition table)
web3# dd if=/dev/da0 of=/partition2.bin bs=1 count=64 skip=446 seek=446

***********************************************************************************

(create the filesystem)
newfs -O2 /dev/da0s1
/dev/da0s1: 782023.5MB (1601584044 sectors) block size 16384, fragment size 2048
	using 4256 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376512, 752864, ... ... ...
 1601377920
internal error: can't find block in cyl 0

(writeout the partition table)
web3# dd if=/dev/da0 of=/partition3.bin bs=1 count=64 skip=446 seek=446

***********************************************************************************

(after the ufs was not successfull, the partition is destroyed again)
(now trying to use a zfs)

web3# zpool create tank da0

web3# zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	tank        ONLINE       0     0     0
	  da0       ONLINE       0     0     0

errors: No known data errors

***********************************************************************************

(list of mounted volumes)

web3# mount
/dev/ad4s1a on / (ufs, local)
devfs on /dev (devfs, local)
tank on /tank (zfs, local)

***********************************************************************************

(copy a file to the zfs and check md5 before and after)

web3# md5 /sbin/init
MD5 (/sbin/init) = 6a374bc84a8b89822964e2a73ed2af18
web3# cp /sbin/init /tank/.
web3# md5 /tank/init
MD5 (/tank/init) = 6a374bc84a8b89822964e2a73ed2af18

(the zfs volume can be unmounted and mounted again - md5 still correct)

***********************************************************************************

(system reboot)
(iSCSI Session reinitiated)

web3# zpool status
  pool: tank
 state: FAULTED
status: One or more devices could not be used because the label is missing
	or invalid.  There are insufficient replicas for the pool to continue
	functioning.
action: Destroy and re-create the pool from a backup source.
   see: http://www.sun.com/msg/ZFS-8000-5E
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	tank        FAULTED      0     0     0  corrupted data
	  da0       UNAVAIL      0     0     0  corrupted data

(FS not useable anymore - files are lost)

***********************************************************************************

In the attachment you'll find the results of the dd.

Greetings,
Erik

-----
ArgonSoft GmbH      | Im Ermlisgrund 3      | 76337 Waldbronn
Tel: +49 7243 71520 | Fax: +49 7243 715222  | http://www.argonsoft.de
Umsatzsteuer-Identnummer: DE205762306       | Handelsregister: HRB2372E
Geschäftsführer: Erik Scholtz
_______________________________________________
freebsd-scsi_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
To unsubscribe, send any mail to "freebsd-scsi-unsubscribe_(_at_)_freebsd_(_dot_)_org"

Visit your host, monkey.org