Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 2009 22:08:26 +0200
From:      "Ralf S. Engelschall" <rse+freebsd-stable@FreeBSD.org>
To:        freebsd-stable@freebsd.org
Subject:   System is on da0s1, but unable to use da0s2 at all?!
Message-ID:  <20090803200826.GA32931@engelschall.com>

next in thread | raw e-mail | index | archive | help
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 root@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/da0s1a    507630 442508 24512    95%    /
| 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...

--
rse@FreeBSD.org                        Ralf S. Engelschall
FreeBSD.org/~rse                       rse@engelschall.com
FreeBSD committer                      www.engelschall.com




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