Subject: Re: Large disks and NetBSD 4.0?
To: Jukka Marin <jmarin@embedtronics.fi>
From: Ronald Roskens <ronr@econet.com>
List: netbsd-users
Date: 10/27/2007 13:00:02
On Sat, 2007-10-27 at 09:46 +0300, Jukka Marin wrote:
> On Fri, Oct 26, 2007 at 06:04:45PM -0500, Ronald Roskens wrote:
> > On Fri, 2007-10-26 at 14:14 +0300, Jukka Marin wrote:
> > > I will try setting up a new server with a 3 TB (or so) RAID disk to be used
> > > for XEN virtual machines.  What is the best way of partitioning the disk -
> > > is it possible to disklabel disks this big in the normal way or should I be
> > > using wedges or something?  Do wedges work with XEN?
> > 
> > While I'm still new to setting up Xen under netbsd, here's some things
> > I've learned:
> > 
> > 1- NetBSD as a domU sees the disk you give it as a "real" disk.
> > 
> > While you might assign the domU /dev/raid0e, and further bsdlabel that
> > partition inside the domU, accessing a particular filesystem under dom0
> > isnt easy.
> 
> Well, at this moment I'm mostly worried about FFS and multiple terabyte
> disks - does FFS support them and is it reliable?  I have a 3ware RAID
> controller and six 1 TB disks, so NetBSD will probably see a single 5 TB
> disk (if I decide to configure a 6-disk RAID5 system).  Will this work?
> 
> I think I'll have to get one more disk and first install NetBSD on that
> disk and then play with the 5 TB disk for a while.


If you only need 14 partitions, then you would put a BSD label on your 5
TB raid. If you need more, then your probably either going to create
CCDs on individual partitions, or use a GPT partition table and wedges.


> > Makes it hard if you dont have networking setup between the domU's to
> > transfer files around, or just want to mount up a domU's filesystems.
> 
> I think I can live with that, if NetBSD just supports the 5 TB disk.
> 
> > 2- The standard XEN3_DOM{0,U} kernels do not include the options for
> > DKWEDGE_* and drvctl.
> 
> grep didn't find "wedge" in any kernel config file.
> 
> > wedges seem to be pretty cutting edge, and theres not a lot of
> > documentation written about them. In particular, the ptype argument for
> > dkctl addwedge isnt well defined. The types arent the same as their
> > disklabel versions. (ie: ffs = 4.2BSD, lfs = 4.4LFS)
> 
> Yep, I noticed that there is no howto - I find any other documentation
> but two or three man pages.  I have no idea if the system can boot from
> a large disk with wedges on it (is the boot program able to find a kernel
> etc.).
> 
> > You need to use gpt to create a GPT on the disk, but raidframe devices
> > do not seem to be supported. If your not using raidframe, then GPT would
> > seem to give you the flexibility in terms of the number of partitions it
> > would support as wedges.
> 
> GPT?  Never heard :)


As far as I can tell, wedges (when added via dkctl) do not "stick"
beyond the current running kernel. Reboot and they are lost. In order to
have the kernel autoconfig them from your disks, you need to create an
on-disk partition table (MBR, BSDLABEL, GPT). Otherwise your stuck
creating a shell script to re-create them everytime the system boots.

-Ron