System is on da0s1, but unable to use da0s2 at all?!

2009-08-03 Thread Ralf S. Engelschall
I've a server installed under a fresh FreeBSD 7.2-STABLE and on a single
UFS filesystem da0s1a. Surprisingly, I cannot access the unused da0s2
slice (where I want to place the ZFS pool onto):

| # id
| uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
| # uname -a
| FreeBSD en4.engelschall.com 7.2-STABLE FreeBSD 7.2-STABLE #0: Sat Aug
| 1 21:06:34 CEST 2009 r...@en4.engelschall.com:/usr/obj/usr/src/sys/EN4
| # sysctl kern.geom.debugflags
| kern.geom.debugflags: 16
| # df
| Filesystem  1K-blocks   Used Avail Capacity  Mounted on
| /dev/da0s1a507630 442508 2451295%/
| devfs   1  1 0   100%/dev
| # fdisk da0
| *** Working on device /dev/da0 ***
| parameters extracted from in-core disklabel are:
| cylinders=35139 heads=255 sectors/track=32 (8160 blks/cyl)
|
| Figures below won't work with BIOS for partitions not in cyl 1
| parameters to be used for BIOS calculations are:
| cylinders=35139 heads=255 sectors/track=32 (8160 blks/cyl)
|
| 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 32, size 1052608 (513 Meg), flag 80 (active)
| beg: cyl 0/ head 1/ sector 1;
| end: cyl 128/ head 254/ sector 32
| The data for partition 2 is:
| sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
| start 1052608, size 285673472 (139489 Meg), flag 0
| beg: cyl 128/ head 254/ sector 1;
| end: cyl 321/ head 254/ sector 32
| The data for partition 3 is:
| UNUSED
| The data for partition 4 is:
| UNUSED
| # dd if=/dev/zero of=/dev/da0s2 bs=1024 count=100
| dd: /dev/da0s2: Operation not permitted
| # zpool create zp1 /dev/da0s2
| cannot create 'zp1': permission denied

As you can see, even with the usual kern.geom.debugflags workaround
(which GEOM knows about and then usually lets one use a used provider)
I'm not able to access da0s2 at all. But da0s2 is not used at all (it is
not even formatted).

Does anybody has any ideas why da0s2 is not available just because the
system is running from da0s1? When I boot from a fixit CDROM I can
access da0s2 just fine, of course...

How can I now put my ZFS pool onto da0s2? I even have done the
zpool create from the fixit CDROM and then copied over the
/boot/zfs/zfs.cache file. But then ZFS also has the same problem: it
cannot access da0s2 one booted into the regular system...

--
r...@freebsd.orgRalf S. Engelschall
FreeBSD.org/~rse   r...@engelschall.com
FreeBSD committer  www.engelschall.com

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: System is on da0s1, but unable to use da0s2 at all?!

2009-08-03 Thread Arnaud Houdelette

Ralf S. Engelschall wrote:

I've a server installed under a fresh FreeBSD 7.2-STABLE and on a single
UFS filesystem da0s1a. Surprisingly, I cannot access the unused da0s2
slice (where I want to place the ZFS pool onto):

| # id
| uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
| # uname -a
| FreeBSD en4.engelschall.com 7.2-STABLE FreeBSD 7.2-STABLE #0: Sat Aug
| 1 21:06:34 CEST 2009 r...@en4.engelschall.com:/usr/obj/usr/src/sys/EN4
| # sysctl kern.geom.debugflags
| kern.geom.debugflags: 16
| # df
| Filesystem  1K-blocks   Used Avail Capacity  Mounted on
| /dev/da0s1a507630 442508 2451295%/
| devfs   1  1 0   100%/dev
| # fdisk da0
| *** Working on device /dev/da0 ***
| parameters extracted from in-core disklabel are:
| cylinders=35139 heads=255 sectors/track=32 (8160 blks/cyl)
|
| Figures below won't work with BIOS for partitions not in cyl 1
| parameters to be used for BIOS calculations are:
| cylinders=35139 heads=255 sectors/track=32 (8160 blks/cyl)
|
| 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 32, size 1052608 (513 Meg), flag 80 (active)
| beg: cyl 0/ head 1/ sector 1;
| end: cyl 128/ head 254/ sector 32
| The data for partition 2 is:
| sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
| start 1052608, size 285673472 (139489 Meg), flag 0
| beg: cyl 128/ head 254/ sector 1;
| end: cyl 321/ head 254/ sector 32
| The data for partition 3 is:
| UNUSED
| The data for partition 4 is:
| UNUSED
| # dd if=/dev/zero of=/dev/da0s2 bs=1024 count=100
| dd: /dev/da0s2: Operation not permitted
| # zpool create zp1 /dev/da0s2
| cannot create 'zp1': permission denied

As you can see, even with the usual kern.geom.debugflags workaround
(which GEOM knows about and then usually lets one use a used provider)
I'm not able to access da0s2 at all. But da0s2 is not used at all (it is
not even formatted).

Does anybody has any ideas why da0s2 is not available just because the
system is running from da0s1? When I boot from a fixit CDROM I can
access da0s2 just fine, of course...

How can I now put my ZFS pool onto da0s2? I even have done the
zpool create from the fixit CDROM and then copied over the
/boot/zfs/zfs.cache file. But then ZFS also has the same problem: it
cannot access da0s2 one booted into the regular system...

--
r...@freebsd.orgRalf S. Engelschall
FreeBSD.org/~rse   r...@engelschall.com
FreeBSD committer  www.engelschall.com

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org

  

If I read correctly fdisk's output, your two slices overlap with 32 sectors.
1rst : start 32, size 1052608 ( so end  = 1052608 + 32 )
2nd : start 1052608 (which is  1rst end )

BTW you could also use a bsdlabel on 1rst slice (using whole disk) to 
put your zfs pool on.


Arnaud.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org