[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] bsd disklabel & lvm


  • To: Dylan Martin <dmartin@xxxxxxxxxxxx>
  • From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
  • Date: Sat, 21 Jul 2007 00:02:09 +0100
  • Cc: Xen Users <xen-users@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 20 Jul 2007 15:55:38 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=pdJPvUuUXdHd2qf1JCEZ148v8qu5W9laCk7eosTUThv8Pol0BFZUWUUlluT1+YyG6VZEmOVKTTbdnLi0lUGCC8ov2/LlbiVqdoDKr8qEj3T0Eeph4NcOuPWlCD3sBJ5QCSonf27yoOSK6OUhxTw0JjRfPsF9C8RPbznPo/o0sWw=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Dylan Martin wrote:
Okay, here's another question that no one will be able to answer.

I have an OpenBSD HVM domU, and I wanted to mount its filesystem in
my Linux dom0.  The domU's disk lives on a logical volume.  Kpartx
does detect that partition 4 contains the disklabel, but that's as far
as I get.

I think my fedora kernel just doesn't support disklabels...

Anyone know how this is supposed to work?
So why use them. Disklabels for ext2 and ext3 are useful abut the partitions can still be accessed as /dev/hda1, /dev/VolGroup00/whatever, or if you use "kpartx -a /dev/VolGroup00/whatever" then you can access /dev/mapper/whatever0, /dev/mapper/whatever1, etc.

Or did you do something too clever and use LVM instide of the OpenBSD DomU and need to go through extra arcanery?

I think there is some file system label and disklabel confusion here.
Disklabel is like fdisk for bsd.. sort of.  In PC hardware when
running bsd, you first have to partition your disk using fdisk.  If
you're only running one OS, you just make one partition with all the
space in it.  Then you take that partition and break it up into
sub-partitions (for lack of a better word) using disklabel.  I think
the reason for this has to do with PC hardware vs. other kinds that
don't use dos-type partition tables.
Ahhh. Extended partitions! OK, that becomes more comprehensible.

There's frankly no reason to do it for Xen guest domains: Simply add the new host partitions as new drives, /dev/sda or /dev/xvda dep, and break them down into up to 4 individual sub partitions per the maximum classical "primary" partitions, unless you're in love with the old multi-multi-partition model of /, /usr, /tmp, /var/tmp, /var, /var/spool, /usr/local, /lenny, /joey, /usr/var/beta/gamma/mygreat/ant/matilda/, etc.

There were reasons to do that much partitoning 20 years ago when drives were much smaller and more expensive and gnu-tar didn't exist yet and we did UNIX backups with "dump".: they're mostly gone now..

Anyway, the upshot is that in order for Linux to see my OpenBSD
partitions, it would have to read the disklabel to know where my
filesystems are.

Another way to say it is:

[dom0          ...]
[lv ] [fdisk part ]
[disklabel    ]
[wd0a][wd0d]..

-Dylan
It really sounds like an extended partition table residing on LVM partition. I'm sure there are tools to pull that out of a Linux Xen partition, I just don't know what they are off the top of my head.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.