WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] A dumb question

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] A dumb question
From: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Date: Fri, 10 Oct 2003 17:48:00 +0100
Cc: Nicolas Bougues <nbougues-listes@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx, Ian.Pratt@xxxxxxxxxxxx
Delivery-date: Fri, 10 Oct 2003 17:49:14 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Fri, 10 Oct 2003 17:11:00 BST." <E1A7zr2-0003dO-00@xxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> I haven't been able to try the "virtual disk" stuff as I haven't a
> spare partition on my test machine. I'll make one free if you're
> still having problems ;-)

With the 3 lines hacked out of xenctl, I've successfully
"formatted" a partition to contain virtual disks, created a
virtual disk, attached it as a "virtual block device" to domain0,
made a file system on it, and even mounted it.

Amazingly, the code hasn't rotted! (other than the java goop)

The log is attached, with comments. The UI for the tools isn't exactly
intuitive. The web-based interface was pretty cool until it
rotted.

Cheers,
Ian


iap10 > mkdir /var/lib/xen

#we need a directory in which the vdstate.xml file will be
#created. This keeps track of which chunks of disk space are used
#by which virtual disks.

iap10 > xenctl partitions add -psda15 -f
warning: state file not found [/var/lib/xen/vdstate.xml]
Added partition sda15

#'format' /dev/sda15 to allow it to hold virtual disks. The '-f'
#option must be given as the type field in the partition table is
#not set to some magic value I can't remember.

iap10 > ll /var/lib/xen/vdstate.xml
-rw-rw-r--    1 root     user         2373 Oct 10 17:36 /var/lib/xen/vdstate.xml

# The vdstate file has been created and initialised with the
# 'chunks' from sda15. I think the default chunk size is 128MB.

iap10 > xenctl partitions list
     maj:min     blocks start sect  num sects name
   1   3:0       439780          0     879560 hda    
   2   8:0    143358272          0  286716544 sda    
   3   8:1        56196         63     112392 sda1   
   4   8:2      8418060     112455   16836120 sda2   
   5   8:3      8418060   16948575   16836120 sda3   
   6   8:4            1   33784695          2 sda4   
   7   8:5      8418028   33784758   16836057 sda5   
   8   8:6      8418028   50620878   16836057 sda6   
   9   8:7      8418028   67456998   16836057 sda7   
  10   8:8      8418028   84293118   16836057 sda8   
  11   8:9      4208998  101129238    8417997 sda9   
  12   8:10     4208998  109547298    8417997 sda10  
  13   8:11     4208998  117965358    8417997 sda11  
  14   8:12     2104483  126383418    4208967 sda12  
  15   8:13     2104483  130592448    4208967 sda13  
  16   8:14     2104483  134801478    4208967 sda14  
[ 17   8:15     2104483  139010508    4208967 sda15  ]


# The square brackets indicate that this is a virtual disk
# partition. Multiple partitions on a disk can contain virtual
# disks.

iap10 > xenctl vd create -nMyFirstVD -s100000
Virtual Disk created with key: 6838196657

# Create a 100MB partition. This gets rounded up to 128MB because
# of our large chunk size.

iap10 > xenctl vd show
key        expiry                       name                 size
6838196657                              MyFirstVD            128M

# List all virtual disks, along with their keys. This VD is
# permanent as it doesn't have an expiry time. (The disk space
# belonging to expired VDs is reclaimed in a
# least-recently-expired-first fashion, but VDs that haven't been
# reclaimed can be 'refreshed' to revive them.)

iap10 > xenctl vbd create -k6838196657 -v0 -n0 -w
Created virtual block device 0 for domain 0

# attach the first virtual block device of domain0 to our virtual
# disk.

iap10 > mkfs -t ext3 /dev/xvda

# make a file system

iap10 > mount /dev/xvda /mnt

# it all works!





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>