RE: How do I create large partitions in FreeBSD?

2009-12-08 Thread Walt Pawley
>>b) go with gpt / gpart, which is okay if FreeBSD will
>>  be the only OS that accesses the disk(s) in question,
>>  as I may assume by your statements.
>That's correct; these will be strictly BSD accessible drives.

FWIW: I've used GUID drives with Mac OS X, Windows XP, Ubuntu
and PC-BSD all resident in their own GUID partitions. Haven't
had 11TB to try, however. ;-)
-- 

Walter M. Pawley 
Wump Research & Company
676 River Bend Road, Roseburg, OR 97471
 541-672-8975
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Polytropon
On Tue, 8 Dec 2009 20:52:52 +, krad  wrote:
> stay away from dangerously dedicated it seems as though they are being
> phased out

I've followed the related discussion, but I'm not sure what
to conclude from it... as far as I understood, creating an
installation "dangerously dedicated" mode isn't possible
from sysinstall anymore, but still possible via the command
line tools. I don't see a reason why it is considered to be
something bad, but the inclusion of a "carrier slice" for
the OS's partitions has always been recommended. But for
data disks where only one partition is intended, why create
it inside a slice?

By the way, the OP intends to create more than one slice
and then create one or two partitions within each slice,
so "dangerously dedicated" disks wouldn't be a solution
for him anyway.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread krad
2009/12/8 Polytropon 

> On Tue, 8 Dec 2009 13:43:41 -0600, Peter Steele 
> wrote:
> > Yes, I know what a BSD slice is compared to a BSD partition.
> > Considering that fdisk uses "partition" interchangeably in
> > cases with "slice", I often do as well. I guess it can be
> > confusing if one isn't careful with context.
>
> You're right - fdisk uses different terminology.
>
>
>
> > We already have a configuration in place on our smaller 1U
> > boxes which are divided into three slices, one for the OS
> > (with 2 partitions), one for swap, and the third slice for
> > data. The third slice is divided into two partitions, one
> > UFS and one raw. The first two slices are gmirrored, the
> > third slice is not.
>
> Okay, now I understand. It's much more complex than it seemed
> from your initial statement. :-)
>
> What you want in the end is e. g.
>/dev/da1s1a = /
>/dev/da1s1d = /usr (or maybe /usr/local)
>/dev/da1s2b = swap
>/dev/da1s3d = /bigstorage (or something similar)
>/dev/da1s3e = raw
>
>
>
> > For consistency we want to use the same slice configuration
> > for these large drives. We don't *have* to do it this way
> > but it simplifies things for our legacy code. We're not
> > using any gmirroring on these raid boxes of course, and we
> > only need one partition on the third slice (no raw partition)
> > but otherwise the layout will largely be the same.
>
> Then it looks to me that using gpt / gpart is the way to go...
>
>
>
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>

stay away from dangerously dedicated it seems as though they are being
phased out
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Polytropon
On Tue, 8 Dec 2009 13:43:41 -0600, Peter Steele  wrote:
> Yes, I know what a BSD slice is compared to a BSD partition.
> Considering that fdisk uses "partition" interchangeably in
> cases with "slice", I often do as well. I guess it can be
> confusing if one isn't careful with context.

You're right - fdisk uses different terminology.



> We already have a configuration in place on our smaller 1U
> boxes which are divided into three slices, one for the OS
> (with 2 partitions), one for swap, and the third slice for
> data. The third slice is divided into two partitions, one
> UFS and one raw. The first two slices are gmirrored, the
> third slice is not.

Okay, now I understand. It's much more complex than it seemed
from your initial statement. :-)

What you want in the end is e. g.
/dev/da1s1a = /
/dev/da1s1d = /usr (or maybe /usr/local)
/dev/da1s2b = swap
/dev/da1s3d = /bigstorage (or something similar)
/dev/da1s3e = raw



> For consistency we want to use the same slice configuration
> for these large drives. We don't *have* to do it this way
> but it simplifies things for our legacy code. We're not
> using any gmirroring on these raid boxes of course, and we
> only need one partition on the third slice (no raw partition)
> but otherwise the layout will largely be the same.

Then it looks to me that using gpt / gpart is the way to go...



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: How do I create large partitions in FreeBSD?

2009-12-08 Thread Peter Steele
>b) go with gpt / gpart, which is okay if FreeBSD will
>  be the only OS that accesses the disk(s) in question,
>  as I may assume by your statements.
That's correct; these will be strictly BSD accessible drives.


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


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Maxim Khitrov
On Tue, Dec 8, 2009 at 2:24 PM, Peter Steele  wrote:
>>You cannot use fdisk for this, because fdisk creates MBR partition tables and 
>>these partitions are limited to 2 TB. You have three
>>options:
>>
>>1. Use GPT instead of MBR. This is handled by gpt (FreeBSD 7) and gpart 
>>(FreeBSD 8) commands.
>
> We're running 8.0. I'll have to check out gpart.
>
>>2. Use a "dangerously dedicated" partitioning scheme.
>>3. Bypass all partitioning issues and do what Polytropon suggested.
>>
>>The third option will only work if you don't need to boot from the array and 
>>are happy with a single 11TB file system.
>
> We do need to boot from these drives so this is not an option.
>
>> The second option gives you partitions and the ability to boot FreeBSD, but 
>> no other operating system will recognize the array.
>>Device names will be da1a, da1b, etc. To do this run the following
>>commands:
>>
>>bsdlabel -w -B da1
>
> When I run this command I get:
>
> # bsdlabel -w -B da1
> bsdlabel: disks with more than 2^32-1 sectors are not supported

I forgot about that one, sorry.

> So that seems we are limited to option 1. We didn't anticipate this; hope 
> there aren't unexpected gotchas lurking around the corner...

Not sure if you're able to do this, but I would advise you against
using the same array for OS, swap, and data. For all the servers I've
configured, I always use a two small (32-64 GB) drives in RAID 1
configuration for the first two functions. The data is always on a
physically-separate array, which means that I'm free to use newfs on
the entire thing and never have to deal with partitions.

This setup is simpler, safer, and faster since your data drives are
now performing just one function.

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


RE: How do I create large partitions in FreeBSD?

2009-12-08 Thread Peter Steele
>Excuse me, you're mixing up terminology here. Let me explain:
>
>A SLICE is what "Windows" calls a "DOS primary partition", often just named a 
>"partition".

Yes, I know what a BSD slice is compared to a BSD partition. Considering that 
fdisk uses "partition" interchangeably in cases with "slice", I often do as 
well. I guess it can be confusing if one isn't careful with context.

>I'm not sure if I understood you correctly. You won't need to create three 
>slices, just one slice, containin three partitions.

We already have a configuration in place on our smaller 1U boxes which are 
divided into three slices, one for the OS (with 2 partitions), one for swap, 
and the third slice for data. The third slice is divided into two partitions, 
one UFS and one raw. The first two slices are gmirrored, the third slice is not.

For consistency we want to use the same slice configuration for these large 
drives. We don't *have* to do it this way but it simplifies things for our 
legacy code. We're not using any gmirroring on these raid boxes of course, and 
we only need one partition on the third slice (no raw partition) but otherwise 
the layout will largely be the same.


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


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Adam Vande More
On Tue, Dec 8, 2009 at 1:27 PM, Polytropon  wrote:

>
>
> b) go with gpt / gpart, which is okay if FreeBSD will
>   be the only OS that accesses the disk(s) in question,
>   as I may assume by your statements.
>
>
GUID partitions are recognized by many more OS's than just FreeBSD although
I admit I haven't tried such an endeavor.  Is there some other gotcha?


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Polytropon
On Tue, 8 Dec 2009 13:14:05 -0600, Peter Steele  wrote:
> > In the subject line, you wrote "large partition", so I
> > assume you won't want to boot from from the device, but
> > use it as a big storage area instead. Correct me if I'm wrong.
> 
> For simplicity I didn't include all the details. In fact
> we need three slices, one for the OS, one for swap, and
> the rest for data.

Excuse me, you're mixing up terminology here. Let me explain:

A SLICE is what "Windows" calls a "DOS primary partition",
often just named a "partition".

A PARTITION is a subdivision of a slice. It holds a file
system. It is comparable (but not the same as) what "Windows"
calls a "logical volume inside a DOS extended partition".

To re-express your requirements:

You need one slice covering the whole disk. This slice
should contain three partitions: One for the OS, one for
swap, and one for data. What you will need to do is
basically what Maxim suggested, which is

a) use the "dedicated" approach, which means that you
   don't create a slice, just three partitions on the
   disk, or,

b) go with gpt / gpart, which is okay if FreeBSD will
   be the only OS that accesses the disk(s) in question,
   as I may assume by your statements.



> I can create the first two slices the way I normally do
> using fdisk/bsdlabel/newfs. But I'm stumped on how to
> create the large third slice.

I'm not sure if I understood you correctly. You won't need
to create three slices, just one slice, containin three
partitions.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: How do I create large partitions in FreeBSD?

2009-12-08 Thread Peter Steele
>You cannot use fdisk for this, because fdisk creates MBR partition tables and 
>these partitions are limited to 2 TB. You have three
>options:
>
>1. Use GPT instead of MBR. This is handled by gpt (FreeBSD 7) and gpart 
>(FreeBSD 8) commands.

We're running 8.0. I'll have to check out gpart.

>2. Use a "dangerously dedicated" partitioning scheme.
>3. Bypass all partitioning issues and do what Polytropon suggested.
>
>The third option will only work if you don't need to boot from the array and 
>are happy with a single 11TB file system.

We do need to boot from these drives so this is not an option.

> The second option gives you partitions and the ability to boot FreeBSD, but 
> no other operating system will recognize the array.
>Device names will be da1a, da1b, etc. To do this run the following
>commands:
>
>bsdlabel -w -B da1

When I run this command I get:

# bsdlabel -w -B da1
bsdlabel: disks with more than 2^32-1 sectors are not supported

So that seems we are limited to option 1. We didn't anticipate this; hope there 
aren't unexpected gotchas lurking around the corner...

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

RE: How do I create large partitions in FreeBSD?

2009-12-08 Thread Peter Steele
> In the subject line, you wrote "large partition", so I assume you won't want 
> to boot from from the device, but use it as a big storage area instead. 
> Correct me if I'm wrong.

For simplicity I didn't include all the details. In fact we need three slices, 
one for the OS, one for swap, and the rest for data. I can create the first two 
slices the way I normally do using fdisk/bsdlabel/newfs. But I'm stumped on how 
to create the large third slice.

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


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Maxim Khitrov
On Tue, Dec 8, 2009 at 1:36 PM, Peter Steele  wrote:
> We have 3U systems with 3Ware raid controllers configured to give us large 
> 11TB logical drives. The diskinfo command shows this:
>
> # diskinfo -v da1
> da1
>        512             # sectorsize
>        1133104128  # mediasize in bytes (11T)
>        23437369344     # mediasize in sectors
>        1458908         # Cylinders according to firmware.
>        255             # Heads according to firmware.
>        63              # Sectors according to firmware.
>        Y08210901E792700BAB9    # Disk ident.
>
> We want to create a BSD slice to cover the entire drive. My plan was to use 
> the fdisk -I option:
>
> [snip]

You cannot use fdisk for this, because fdisk creates MBR partition
tables and these partitions are limited to 2 TB. You have three
options:

1. Use GPT instead of MBR. This is handled by gpt (FreeBSD 7) and
gpart (FreeBSD 8) commands.
2. Use a "dangerously dedicated" partitioning scheme.
3. Bypass all partitioning issues and do what Polytropon suggested.

The third option will only work if you don't need to boot from the
array and are happy with a single 11TB file system.

The second option gives you partitions and the ability to boot
FreeBSD, but no other operating system will recognize the array.
Device names will be da1a, da1b, etc. To do this run the following
commands:

bsdlabel -w -B da1
bsdlabel -e da1

newfs /dev/da1a
newfs -U /dev/da1d
...

I've never used GPT, but that's what you would have become familiar
with if you want these arrays to be recognized by operating systems
other than FreeBSD.

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


Re: How do I create large partitions in FreeBSD?

2009-12-08 Thread Polytropon
On Tue, 8 Dec 2009 12:36:54 -0600, Peter Steele  wrote:
> We have 3U systems with 3Ware raid controllers configured to give
> us large 11TB logical drives. The diskinfo command shows this:
> [...]
> We want to create a BSD slice to cover the entire drive. My plan
> was to use the fdisk -I option:
> [...]
> How do we resolve this? We want a full size partition spanning
> the entire disk, and we need a scriptable solution since the
> configuration of these servers is handled through an automated
> process.

Why not directly formatting the whole device?

In the subject line, you wrote "large partition", so I assume
you won't want to boot from from the device, but use it as a
big storage area instead. Correct me if I'm wrong.

I am often using disks without slice if I don't boot from them,
but use them for storage.

# newfs /dev/da1

would be the command to create a partition with file system
that covers the whole disk. It will be /dev/da1c (which is
/dev/da1), and you can easily mount it:

# mount /dev/da1 /bigstorage

Of course, this solution is completely scriptable, given the
fact that you know which device to newfs.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


How do I create large partitions in FreeBSD?

2009-12-08 Thread Peter Steele
We have 3U systems with 3Ware raid controllers configured to give us large 11TB 
logical drives. The diskinfo command shows this:

# diskinfo -v da1
da1
512 # sectorsize
1133104128  # mediasize in bytes (11T)
23437369344 # mediasize in sectors
1458908 # Cylinders according to firmware.
255 # Heads according to firmware.
63  # Sectors according to firmware.
Y08210901E792700BAB9# Disk ident.

We want to create a BSD slice to cover the entire drive. My plan was to use the 
fdisk -I option:

# fdisk -I da1
*** Working on device /dev/da1 ***
fdisk: Class not found

# fdisk -p da1
# /dev/da1
g c1458908 h255 s63
p 1 0xa5 63 1962532467
a 1

but as you can see, the partition size that this creates is only 1TB 
(1962532467*512=1004816623104 bytes). The fdisk command clearly knows how large 
the disk really is:

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

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

If I compute 1458908*255*63*512 this gives me 1126794240, which is the 
correct size. But the -I option doesn't create a full sized partition.

How do we resolve this? We want a full size partition spanning the entire disk, 
and we need a scriptable solution since the configuration of these servers is 
handled through an automated process.


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