Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2005 17:42:16 +0700
From:      Victor Sudakov <sudakov@sibptus.tomsk.ru>
To:        freebsd-geom@freebsd.org
Subject:   Re: Create a mirror on disk with valid data
Message-ID:  <20050916104216.GA33576@admin.sibptus.tomsk.ru>
In-Reply-To: <20050916073012.GA31056@admin.sibptus.tomsk.ru>
References:  <20050916073012.GA31056@admin.sibptus.tomsk.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Victor Sudakov wrote:
> 
> How could it then be possible to create a mirror from a disk with
> existing data, like the man page suggests?  The gmirror metadata could
> then be overwritten with user data or vice versa.

Perhaps someone would like to comment on this, which I think proves my
point:



testbsd5# dd if=/dev/zero of=/dev/ad2 count=500
500+0 records in
500+0 records out
256000 bytes transferred in 1.243238 secs (205914 bytes/sec)
testbsd5# fdisk -BI ad2
******* Working on device /dev/ad2 *******
fdisk: invalid fdisk partition table found
testbsd5# fdisk -BI ad2
******* Working on device /dev/ad2 *******
testbsd5# disklabel -w /dev/ad2s1 auto
testbsd5# newfs ad2s1a
/dev/ad2s1a: 1023.7MB (2096560 sectors) block size 16384, fragment size 2048
        using 6 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920
testbsd5#
testbsd5# gmirror label gm1 ad2
testbsd5# newfs /dev/mirror/gm1s1a
newfs: wtfs: 512 bytes at sector 2096560: Unknown error: 0
testbsd5#
testbsd5# disklabel  /dev/mirror/gm1s1
# /dev/mirror/gm1s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2096561       16    4.2BSD     2048 16384 28552
  c:  2096577        0    unused        0     0         # "raw" part, don't edit
testbsd5#

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050916104216.GA33576>