Freebsd-stable Archive

List Statistics

  • Total Threads: 2123
  • Total Posts: 4994
  #1  
22-07-2010 04:05 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #2  
22-07-2010 04:15 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #3  
22-07-2010 04:32 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #4  
22-07-2010 04:34 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #5  
22-07-2010 04:39 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #6  
22-07-2010 05:20 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #7  
22-07-2010 05:29 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #8  
22-07-2010 07:32 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #9  
22-07-2010 07:59 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #10  
22-07-2010 08:02 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #11  
22-07-2010 08:08 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #12  
22-07-2010 08:18 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #13  
22-07-2010 08:30 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #14  
22-07-2010 08:36 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #15  
22-07-2010 09:03 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>
>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>
>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>> pci7
>>>>>
>>>>> atapci1: port 0xac00-0xac0f mem
>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>> pci3
>>>>>
>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>
>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>
>>> Ahh, thank you.
>>>
>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>> the ZFS array will be messed up. But I do plan to do that for the
>>> system after my plan is implemented. Thank you. :)
>>
>> You may even get hotplug support if you're lucky. :)
>>
>> I just built a box and gave it a spin with the "old" ata stuff and then
>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>> claims it supports hotplug with ahci enabled as well... Still have to
>> test that.
>
> Well, I don't have anything to support hotplug. All my stuff is internal.
>
> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg

The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
backplane, now has none).

I am not certain, but I think with 8.1 (which it's running) and all the
cam integration stuff, hotplug is possible. Is a special backplane
required? I seriously don't know... I'm going to give it a shot though.

Oh, you also might get NCQ. Try:

[root@h21 /tmp]# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32

Charles

>
>
> --
> Dan Langille - http://langille.org/
>
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #16  
22-07-2010 09:06 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>
>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>
>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>> pci7
>>>>>
>>>>> atapci1: port 0xac00-0xac0f mem
>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>> pci3
>>>>>
>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>
>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>
>>> Ahh, thank you.
>>>
>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>> the ZFS array will be messed up. But I do plan to do that for the
>>> system after my plan is implemented. Thank you. :)
>>
>> You may even get hotplug support if you're lucky. :)
>>
>> I just built a box and gave it a spin with the "old" ata stuff and then
>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>> claims it supports hotplug with ahci enabled as well... Still have to
>> test that.
>
> Well, I don't have anything to support hotplug. All my stuff is internal.
>
> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg

The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
backplane, now has none).

I am not certain, but I think with 8.1 (which it's running) and all the
cam integration stuff, hotplug is possible. Is a special backplane
required? I seriously don't know... I'm going to give it a shot though.

Oh, you also might get NCQ. Try:

[root@h21 /tmp]# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32

Charles

>
>
> --
> Dan Langille - http://langille.org/
>
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #17  
22-07-2010 09:08 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>
>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>
>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>> pci7
>>>>>
>>>>> atapci1: port 0xac00-0xac0f mem
>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>> pci3
>>>>>
>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>
>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>
>>> Ahh, thank you.
>>>
>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>> the ZFS array will be messed up. But I do plan to do that for the
>>> system after my plan is implemented. Thank you. :)
>>
>> You may even get hotplug support if you're lucky. :)
>>
>> I just built a box and gave it a spin with the "old" ata stuff and then
>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>> claims it supports hotplug with ahci enabled as well... Still have to
>> test that.
>
> Well, I don't have anything to support hotplug. All my stuff is internal.
>
> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg

The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
backplane, now has none).

I am not certain, but I think with 8.1 (which it's running) and all the
cam integration stuff, hotplug is possible. Is a special backplane
required? I seriously don't know... I'm going to give it a shot though.

Oh, you also might get NCQ. Try:

[root@h21 /tmp]# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32

Charles

>
>
> --
> Dan Langille - http://langille.org/
>
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31

resending with this:

ada{0..4} give the above.

# camcontrol tags ada5
(pass5:ahcich0:0:0:0): device openings: 32

That's part of the gmirror array for the OS, along with ad6 which has
similar output.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #18  
22-07-2010 09:14 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>
>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>
>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>> pci7
>>>>>
>>>>> atapci1: port 0xac00-0xac0f mem
>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>> pci3
>>>>>
>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>
>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>
>>> Ahh, thank you.
>>>
>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>> the ZFS array will be messed up. But I do plan to do that for the
>>> system after my plan is implemented. Thank you. :)
>>
>> You may even get hotplug support if you're lucky. :)
>>
>> I just built a box and gave it a spin with the "old" ata stuff and then
>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>> claims it supports hotplug with ahci enabled as well... Still have to
>> test that.
>
> Well, I don't have anything to support hotplug. All my stuff is internal.
>
> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg

The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
backplane, now has none).

I am not certain, but I think with 8.1 (which it's running) and all the
cam integration stuff, hotplug is possible. Is a special backplane
required? I seriously don't know... I'm going to give it a shot though.

Oh, you also might get NCQ. Try:

[root@h21 /tmp]# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32

Charles

>
>
> --
> Dan Langille - http://langille.org/
>
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31

resending with this:

ada{0..4} give the above.

# camcontrol tags ada5
(pass5:ahcich0:0:0:0): device openings: 32

That's part of the gmirror array for the OS, along with ad6 which has
similar output.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 04:03:05AM -0400, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
> >Well, I don't have anything to support hotplug. All my stuff is internal.
> >
> >http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all
> the cam integration stuff, hotplug is possible. Is a special
> backplane required? I seriously don't know... I'm going to give it
> a shot though.

Yes, a special backplane is required.

> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

NCQ should be enabled by default. "camcontrol identify" will provide
much more verbose details about the state of these disks. Don't confuse
"identify" with "inquiry".

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #19  
22-07-2010 09:20 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>
>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>
>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>> pci7
>>>>>
>>>>> atapci1: port 0xac00-0xac0f mem
>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>> pci3
>>>>>
>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>
>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>
>>> Ahh, thank you.
>>>
>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>> the ZFS array will be messed up. But I do plan to do that for the
>>> system after my plan is implemented. Thank you. :)
>>
>> You may even get hotplug support if you're lucky. :)
>>
>> I just built a box and gave it a spin with the "old" ata stuff and then
>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>> claims it supports hotplug with ahci enabled as well... Still have to
>> test that.
>
> Well, I don't have anything to support hotplug. All my stuff is internal.
>
> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg

The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
backplane, now has none).

I am not certain, but I think with 8.1 (which it's running) and all the
cam integration stuff, hotplug is possible. Is a special backplane
required? I seriously don't know... I'm going to give it a shot though.

Oh, you also might get NCQ. Try:

[root@h21 /tmp]# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32

Charles

>
>
> --
> Dan Langille - http://langille.org/
>
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31

resending with this:

ada{0..4} give the above.

# camcontrol tags ada5
(pass5:ahcich0:0:0:0): device openings: 32

That's part of the gmirror array for the OS, along with ad6 which has
similar output.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 04:03:05AM -0400, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
> >Well, I don't have anything to support hotplug. All my stuff is internal.
> >
> >http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all
> the cam integration stuff, hotplug is possible. Is a special
> backplane required? I seriously don't know... I'm going to give it
> a shot though.

Yes, a special backplane is required.

> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

NCQ should be enabled by default. "camcontrol identify" will provide
much more verbose details about the state of these disks. Don't confuse
"identify" with "inquiry".

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010 23:15:41 -0400 Dan Langille wrote:
> On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> > First, create a new GUID Partition Table partition scheme on the HDD:
> > gpart create -s GPT ad0
> >
> > Let's see how much space we have. This output will be used to determine
> > SOMEVALUE in the next command.
> >
> > gpart show
> >
> > Create a new partition within that scheme:
> > gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
> >
> > Now, label the thing:
> > glabel label -v disk00 /dev/ad0

That command will destroy secondary GPT.

> Or, is this more appropriate?
> glabel label -v disk00 /dev/ad0s1

--
WBR, Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.

  #20  
22-07-2010 09:51 AM
Freebsd-stable member admin is online now
User
 

I hope my terminology is correct....

I have a ZFS array which uses raw devices. I'd rather it use glabel and
supply the GEOM devices to ZFS instead. In addition, I'll also
partition the HDD to avoid using the entire HDD: leave a little bit of
space at the start and end.

Why use glabel?

* So ZFS can find and use the correct HDD should the HDD device ever
get renumbered for whatever reason. e.g. /dev/da0 becomes /dev/da6
when you move it to another controller.

Why use partitions?

* Primarily: two HDD of a given size, say 2TB, do not always provide
the same amount of available space. If you use a slightly smaller
partition instead of the entire physical HDD, you're much more
likely to have a happier experience when it comes time to replace an
HDD.

* There seems to be a consensus amongst some that leaving the start and
and of your HDD empty. Give the rest to ZFS.

Things I've read that led me to the above reasons:

*
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable
*
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/055008.html
* http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003620.html

The plan for this plan, I'm going to play with just two HDD, because
that's what I have available. Let's assume these two HDD are ad0 and
ad1. I am not planning to boot from these HDD; they are for storage only.

First, create a new GUID Partition Table partition scheme on the HDD:

gpart create -s GPT ad0


Let's see how much space we have. This output will be used to determine
SOMEVALUE in the next command.

gpart show


Create a new partition within that scheme:

gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0

Why '-b 34'? Randi pointed me to
http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
the first 33 LBA are used for. It's not for us to use here.

Where SOMEVALUE is the number of blocks to use. I plan not to use all
the available blocks but leave a few hundred MB free at the end.
That'll allow for the variance in HDD size.


Now, label the thing:

glabel label -v disk00 /dev/ad0

Repeat the above with ad1 to get disk01. Repeat for all other HDD...

Then create your zpool:

zpool create bigtank disk00 disk01 ... etc


Any suggestions/comments? Is there any advantage to using the -l option
on 'gpart add' instead of the glabel above?

Thanks


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> First, create a new GUID Partition Table partition scheme on the HDD:
>
> gpart create -s GPT ad0
>
>
> Let's see how much space we have. This output will be used to determine
> SOMEVALUE in the next command.
>
> gpart show
>
>
> Create a new partition within that scheme:
>
> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>
>
> Now, label the thing:
>
> glabel label -v disk00 /dev/ad0

Or, is this more appropriate?

glabel label -v disk00 /dev/ad0s1

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 10:15 AM, Dan Langille <> wrote:
>> glabel label -v disk00 /dev/ad0
>
> Or, is this more appropriate?
>
>  glabel label -v disk00 /dev/ad0s1
>

actually it's /dev/ad0p1.

GPT scheme uses p, not s. And yes, that's more appropriate - if you
create zpool on disk00 labeled as ad0 it'll use entire disk, ignoring
the partitioning.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:

> Why '-b 34'? Randi pointed me to
> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
> the first 33 LBA are used for. It's not for us to use here.
>
> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
> available blocks but leave a few hundred MB free at the end. That'll allow
> for the variance in HDD size.
>
> Any suggestions/comments? Is there any advantage to using the -l option on
> 'gpart add' instead of the glabel above?
>

You'll want to make sure your partitions are aligned, discussion here(says
4k drives, but info pertinent to all):

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

My understanding is that you weren't booting from zfs, just using it as an
data file system. In that case, you'd want to use "gpart add -b 512 ..."
or some other multiple of 16. Even 1024 would be a good safe number. Also
GPT creates partitions not slices. Your resulting partitions with be
labeled something like ad0p1, ad0p2, etc.



--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <>wrote:

>
>
> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option
>> on 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html
>
> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.
>
>
Also if you have an applicable SATA controller, running the ahci module with
give you more speed. Only change one thing a time though. Virtualbox makes
a great testbed for this, you don't need to allocate the VM a lot of RAM
just make sure it boots and such.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010, Adam Vande More wrote:

> On Wed, Jul 21, 2010 at 10:05 PM, Dan Langille <> wrote:
>
>> Why '-b 34'? Randi pointed me to
>> http://en.wikipedia.org/wiki/GUID_Partition_Table where it explains what
>> the first 33 LBA are used for. It's not for us to use here.
>>
>> Where SOMEVALUE is the number of blocks to use. I plan not to use all the
>> available blocks but leave a few hundred MB free at the end. That'll allow
>> for the variance in HDD size.
>>
>> Any suggestions/comments? Is there any advantage to using the -l option on
>> 'gpart add' instead of the glabel above?
>>
>
> You'll want to make sure your partitions are aligned, discussion here(says
> 4k drives, but info pertinent to all):
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html

>From that thread:

http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031173.html

(longer explanation)

I'm not really understanding the alignment issue myself on a few levels:

-Does it only affect the new drives with 4K blocks?
-If it does not, is it generally good to start your first partition at 1MB
in? How exactly does doing this "fix" the alignment issue?

> My understanding is that you weren't booting from zfs, just using it as an
> data file system. In that case, you'd want to use "gpart add -b 512 ..."
> or some other multiple of 16. Even 1024 would be a good safe number. Also
> GPT creates partitions not slices. Your resulting partitions with be
> labeled something like ad0p1, ad0p2, etc.

I assume the same can be applied if you do boot from zfs; you'd still
create the "freebsd-boot" partition starting at 34, but your next
partition (be it swap or zfs) would start either 512 or 1024 sectors in?

Thanks,

Charles

>
>
> --
> Adam Vande More
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, Jul 21, 2010 at 11:20 PM, Charles Sprickman <> wrote:

>
> -Does it only affect the new drives with 4K blocks?
>

No, although blocksize does effect these symptoms


> -If it does not, is it generally good to start your first partition at 1MB
> in? How exactly does doing this "fix" the alignment issue?


To be clear, we are talking about data partitions, not the boot one.
Difficult for me to explain concisely, but basically it has to do with seek
time. A mis-aligned partition will almost always have an extra seek for
each standard seek you'd have on aligned one. There have been some
discussions about in the archives, also this is not unique to FreeBSD so
google will have a more detailed and probably better explanation.


> I assume the same can be applied if you do boot from zfs; you'd still
> create the "freebsd-boot" partition starting at 34, but your next partition
> (be it swap or zfs) would start either 512 or 1024 sectors in?
>

Yes.

--
Adam Vande More
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/21/2010 11:39 PM, Adam Vande More wrote:
> On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> > wrote:

> Also if you have an applicable SATA controller, running the ahci module
> with give you more speed. Only change one thing a time though.
> Virtualbox makes a great testbed for this, you don't need to allocate
> the VM a lot of RAM just make sure it boots and such.

I'm not sure of the criteria, but this is what I'm running:

atapci0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

atapci1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

I added ahci_load="YES" to loader.conf and rebooted. Now I see:

ahci0: port
0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0

Which is the onboard SATA from what I can tell, not the controllers I
installed to handle the ZFS array. The onboard SATA runs a gmirror
array which handles /, /tmp, /usr, and /var (i.e. the OS). ZFS runs
only on on my /storage mount point.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 02:32:48AM -0400, Dan Langille wrote:
> On 7/21/2010 11:39 PM, Adam Vande More wrote:
> >On Wed, Jul 21, 2010 at 10:34 PM, Adam Vande More <
> >> wrote:
>
> >Also if you have an applicable SATA controller, running the ahci module
> >with give you more speed. Only change one thing a time though.
> >Virtualbox makes a great testbed for this, you don't need to allocate
> >the VM a lot of RAM just make sure it boots and such.
>
> I'm not sure of the criteria, but this is what I'm running:
>
> atapci0: port 0xdc00-0xdc0f mem
> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
> pci7
>
> atapci1: port 0xac00-0xac0f mem
> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
> pci3
>
> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> ahci0: port
> 0x8000-0x8007,0x7000-0x7003,0x6000-0x6007,0x5000-0x5003,0x4000-0x400f
> mem 0xfb3fe400-0xfb3fe7ff irq 22 at device 17.0 on pci0
>
> Which is the onboard SATA from what I can tell, not the controllers
> I installed to handle the ZFS array. The onboard SATA runs a
> gmirror array which handles /, /tmp, /usr, and /var (i.e. the OS).
> ZFS runs only on on my /storage mount point.

The Silicon Image controllers have their own driver, siis(4), which uses
AHCI as well. It's just as reliable as ahci(4), and undergoes
similar/thorough testing.

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> On 22.07.2010 10:32, Dan Langille wrote:
>> I'm not sure of the criteria, but this is what I'm running:
>>
>> atapci0: port 0xdc00-0xdc0f mem
>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>
>> atapci1: port 0xac00-0xac0f mem
>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>
>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>
> You can add siis_load="YES" to loader.conf for SiI 3124.

Ahh, thank you.

I'm afraid to do that now, before I label my ZFS drives for fear that
the ZFS array will be messed up. But I do plan to do that for the
system after my plan is implemented. Thank you. :)

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
> >On 22.07.2010 10:32, Dan Langille wrote:
> >>I'm not sure of the criteria, but this is what I'm running:
> >>
> >>atapci0: port 0xdc00-0xdc0f mem
> >>0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
> >>
> >>atapci1: port 0xac00-0xac0f mem
> >>0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
> >>
> >>I added ahci_load="YES" to loader.conf and rebooted. Now I see:
> >
> >You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear
> that the ZFS array will be messed up. But I do plan to do that for
> the system after my plan is implemented. Thank you. :)

They won't be messed up. ZFS will figure out, using its metadata, which
drive is part of what pool despite the device name changing. I don't
use glabel or GPT so I can't comment on whether or not those work
reliably in this situation (I imagine they would, but I keep seeing
problem reports on the lists when people have them in use.......)

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:08 AM, Jeremy Chadwick wrote:
> On Thu, Jul 22, 2010 at 03:02:33AM -0400, Dan Langille wrote:
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear
>> that the ZFS array will be messed up. But I do plan to do that for
>> the system after my plan is implemented. Thank you. :)
>
> They won't be messed up. ZFS will figure out, using its metadata, which
> drive is part of what pool despite the device name changing.

I now have:
siis0: port 0xdc00-0xdc0f mem
0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7

siis1: port 0xac00-0xac0f mem
0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3

And my zpool is now:

$ zpool status
pool: storage
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0

Whereas previously, it was ad devices (see
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=399538+0+current/freebsd-stable).

Thank you (and to Andrey V. Elsukov who posted the same suggestion at
the same time you did). I appreciate it.

> I don't
> use glabel or GPT so I can't comment on whether or not those work
> reliably in this situation (I imagine they would, but I keep seeing
> problem reports on the lists when people have them in use.......)

Really? The whole basis of the action plan I'm highlighting in this
post is to avoid ZFS-related problems when devices get renumbered and
ZFS is using device names (e.g. /dev/ad0> instead of labels (e.g.
gpt/disk00).

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>> On 22.07.2010 10:32, Dan Langille wrote:
>>> I'm not sure of the criteria, but this is what I'm running:
>>>
>>> atapci0: port 0xdc00-0xdc0f mem
>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on pci7
>>>
>>> atapci1: port 0xac00-0xac0f mem
>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on pci3
>>>
>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>
>> You can add siis_load="YES" to loader.conf for SiI 3124.
>
> Ahh, thank you.
>
> I'm afraid to do that now, before I label my ZFS drives for fear that the ZFS
> array will be messed up. But I do plan to do that for the system after my
> plan is implemented. Thank you. :)

You may even get hotplug support if you're lucky. :)

I just built a box and gave it a spin with the "old" ata stuff and then
with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
claims it supports hotplug with ahci enabled as well... Still have to
test that.

Charles

> --
> Dan Langille - http://langille.org/
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 3:30 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>
>>>> atapci0: port 0xdc00-0xdc0f mem
>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>> pci7
>>>>
>>>> atapci1: port 0xac00-0xac0f mem
>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>> pci3
>>>>
>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>
>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>
>> Ahh, thank you.
>>
>> I'm afraid to do that now, before I label my ZFS drives for fear that
>> the ZFS array will be messed up. But I do plan to do that for the
>> system after my plan is implemented. Thank you. :)
>
> You may even get hotplug support if you're lucky. :)
>
> I just built a box and gave it a spin with the "old" ata stuff and then
> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
> claims it supports hotplug with ahci enabled as well... Still have to
> test that.

Well, I don't have anything to support hotplug. All my stuff is internal.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg



--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Dan Langille wrote:

> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>
>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>
>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>> pci7
>>>>>
>>>>> atapci1: port 0xac00-0xac0f mem
>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>> pci3
>>>>>
>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>
>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>
>>> Ahh, thank you.
>>>
>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>> the ZFS array will be messed up. But I do plan to do that for the
>>> system after my plan is implemented. Thank you. :)
>>
>> You may even get hotplug support if you're lucky. :)
>>
>> I just built a box and gave it a spin with the "old" ata stuff and then
>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>> claims it supports hotplug with ahci enabled as well... Still have to
>> test that.
>
> Well, I don't have anything to support hotplug. All my stuff is internal.
>
> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg

The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
backplane, now has none).

I am not certain, but I think with 8.1 (which it's running) and all the
cam integration stuff, hotplug is possible. Is a special backplane
required? I seriously don't know... I'm going to give it a shot though.

Oh, you also might get NCQ. Try:

[root@h21 /tmp]# camcontrol tags ada0
(pass0:ahcich0:0:0:0): device openings: 32

Charles

>
>
> --
> Dan Langille - http://langille.org/
>
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31


--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On 7/22/2010 4:03 AM, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
>
>> On 7/22/2010 3:30 AM, Charles Sprickman wrote:
>>> On Thu, 22 Jul 2010, Dan Langille wrote:
>>>
>>>> On 7/22/2010 2:59 AM, Andrey V. Elsukov wrote:
>>>>> On 22.07.2010 10:32, Dan Langille wrote:
>>>>>> I'm not sure of the criteria, but this is what I'm running:
>>>>>>
>>>>>> atapci0: port 0xdc00-0xdc0f mem
>>>>>> 0xfbeffc00-0xfbeffc7f,0xfbef0000-0xfbef7fff irq 17 at device 4.0 on
>>>>>> pci7
>>>>>>
>>>>>> atapci1: port 0xac00-0xac0f mem
>>>>>> 0xfbbffc00-0xfbbffc7f,0xfbbf0000-0xfbbf7fff irq 19 at device 4.0 on
>>>>>> pci3
>>>>>>
>>>>>> I added ahci_load="YES" to loader.conf and rebooted. Now I see:
>>>>>
>>>>> You can add siis_load="YES" to loader.conf for SiI 3124.
>>>>
>>>> Ahh, thank you.
>>>>
>>>> I'm afraid to do that now, before I label my ZFS drives for fear that
>>>> the ZFS array will be messed up. But I do plan to do that for the
>>>> system after my plan is implemented. Thank you. :)
>>>
>>> You may even get hotplug support if you're lucky. :)
>>>
>>> I just built a box and gave it a spin with the "old" ata stuff and then
>>> with the "new" (AHCI) stuff. It does perform a bit better and my BIOS
>>> claims it supports hotplug with ahci enabled as well... Still have to
>>> test that.
>>
>> Well, I don't have anything to support hotplug. All my stuff is internal.
>>
>> http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>>
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all the
> cam integration stuff, hotplug is possible. Is a special backplane
> required? I seriously don't know... I'm going to give it a shot though.
>
> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

# camcontrol tags ada0
(pass0:siisch2:0:0:0): device openings: 31

resending with this:

ada{0..4} give the above.

# camcontrol tags ada5
(pass5:ahcich0:0:0:0): device openings: 32

That's part of the gmirror array for the OS, along with ad6 which has
similar output.

--
Dan Langille - http://langille.org/
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, Jul 22, 2010 at 04:03:05AM -0400, Charles Sprickman wrote:
> On Thu, 22 Jul 2010, Dan Langille wrote:
> >Well, I don't have anything to support hotplug. All my stuff is internal.
> >
> >http://sphotos.ak.fbcdn.net/hphotos-ak-ash1/hs430.ash1/23778_106837706002537_100000289239443_171753_3508473_n.jpg
>
> The frankenbox I'm testing on is a retrofitted 1U (it had a scsi
> backplane, now has none).
>
> I am not certain, but I think with 8.1 (which it's running) and all
> the cam integration stuff, hotplug is possible. Is a special
> backplane required? I seriously don't know... I'm going to give it
> a shot though.

Yes, a special backplane is required.

> Oh, you also might get NCQ. Try:
>
> [root@h21 /tmp]# camcontrol tags ada0
> (pass0:ahcich0:0:0:0): device openings: 32

NCQ should be enabled by default. "camcontrol identify" will provide
much more verbose details about the state of these disks. Don't confuse
"identify" with "inquiry".

--
| Jeremy Chadwick |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |

_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Wed, 21 Jul 2010 23:15:41 -0400 Dan Langille wrote:
> On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):

> > First, create a new GUID Partition Table partition scheme on the HDD:
> > gpart create -s GPT ad0
> >
> > Let's see how much space we have. This output will be used to determine
> > SOMEVALUE in the next command.
> >
> > gpart show
> >
> > Create a new partition within that scheme:
> > gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
> >
> > Now, label the thing:
> > glabel label -v disk00 /dev/ad0

That command will destroy secondary GPT.

> Or, is this more appropriate?
> glabel label -v disk00 /dev/ad0s1

--
WBR, Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
_______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe. On Thu, 22 Jul 2010, Boris Samorodov wrote:

> On Wed, 21 Jul 2010 23:15:41 -0400 Dan Langille wrote:
>> On 7/21/2010 11:05 PM, Dan Langille wrote (something close to this):
>
>>> First, create a new GUID Partition Table partition scheme on the HDD:
>>> gpart create -s GPT ad0
>>>
>>> Let's see how much space we have. This output will be used to determine
>>> SOMEVALUE in the next command.
>>>
>>> gpart show
>>>
>>> Create a new partition within that scheme:
>>> gpart add -b 34 -s SOMEVALUE -t freebsd-zfs ad0
>>>
>>> Now, label the thing:
>>> glabel label -v disk00 /dev/ad0
>
> That command will destroy secondary GPT.

I was just reading about GUID partitioning last night and saw that one of
the benefits is that there's a copy of the partition table kept at the end
of the disk. That seems like a pretty neat feature.

Do you by any chance have a reference I can point to (I was documenting
stuff about GPT in an internal wiki and this is a nice piece of info to
have)?

Also, how does one access/use the "backup" partition table?

Thanks,

Charles

>> Or, is this more appropriate?
>> glabel label -v disk00 /dev/ad0s1
>
> --
> WBR, Boris Samorodov (bsam)
> Research Engineer, http://www.ipt.ru Telephone & Internet SP
> FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
> _______________________________________________
___________________________________________________

Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: