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-users

Re: [Xen-users] Reg Disk space in guest domain with fedora img

To: "Rajiv Rajaian" <rajiv.grid@xxxxxxxxx>
Subject: Re: [Xen-users] Reg Disk space in guest domain with fedora img
From: "Todd Deshane" <deshantm@xxxxxxxxx>
Date: Wed, 13 Feb 2008 11:14:41 -0500
Cc: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 13 Feb 2008 08:15:23 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=8hx+Cedv3HIYhootakKtrSMNtsOKeZMTMqrtcNX2Fk0=; b=aEDYJbpS23SpmkBoV13G1b1/QfXLZ5rV4iBJZmODAwTI338ZOnoC3mviGEyxBV3ihtb9V+VuYU2ljzb5DoHOlr3mZ/G6NT41hBO+v3myEP6R4bTGHCvqXFkdYu2xo7tPnA/Pa/aoTucY76TmkG9zpoAgeYRB02VOe7e7YpA1XtQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qa1+OnvcKsQGRkFFzCQAvtUBLEeN/GAzqqNkJFPTokEeRN5sAk4u48Dty2IERWBXAVN2T2ir//pwBAqOOZrkrUsna9zdH1IMFFNe92zmZb9LMvjEG5RueA2z69u//dNhJhiI2MKo+dHNU1wcZ+2vR/HkzKXMOmOAQ7q82MpliMs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <cd5be5dd0802130656m4dfb1367j47ef775a0fa3e530@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <cd5be5dd0802120847r4f39416dm2e43b20d0402bee@xxxxxxxxxxxxxx> <1e16a9ed0802121050g16ba633dt6454dcf11838bf69@xxxxxxxxxxxxxx> <cd5be5dd0802122253s6a41bea7s63bbbd2398f9035b@xxxxxxxxxxxxxx> <1e16a9ed0802130559s58da0c6en33b3c14f0ba8cd5b@xxxxxxxxxxxxxx> <cd5be5dd0802130656m4dfb1367j47ef775a0fa3e530@xxxxxxxxxxxxxx>
Reply-to: deshantm@xxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On Feb 13, 2008 9:56 AM, Rajiv Rajaian <rajiv.grid@xxxxxxxxx> wrote:
> Thanks Todd
> I d manually mounted my /dev/vg/fedora before copying the
> fedora.img(bootable image)
> Total size shows 10GB
> And after copying the image it shows only 2.2GB
> Now i need to resize the lvm.. But  my host os(Scientific linux )
> doesn't have resize2fs command ..
> Also my the filesystem type is ext3...How to resize the ext3 filesystem.
>
http://e2fsprogs.sourceforge.net/


>
> Thanks in Advance
> Rajiv
>
>
> On 2/13/08, Todd Deshane <deshantm@xxxxxxxxx> wrote:
> > Hi Rajiv,
> >
> > You should keep replies to the list as others may have insights that I
> > don't know about.
> >
> > I think I might notice something though...
> >
> > On Feb 13, 2008 1:53 AM, Rajiv Rajaian <rajiv.grid@xxxxxxxxx> wrote:
> > > Hi Todd
> > >
> > > These are the steps I'd used to create the fedora domain
> > > lvcreate -L10G -n compnode vg
> > > cat fedora.img > /dev/vg/fedora
> > >
> >
> > What is fedora.img?
> >
> > if fedora fedora.img is a file acting as a partition (or disk) than
> > that may be the problem.
> >
> > You would need to use the resize2fs command (or a similar command
> > based on the file system type of the fedora.img) that you mention
> > below.
> >
> > The size of the partition needs to match the 10G that you are using
> > for the logical volume.
> >
> > It depends on how fedora.img was created as to how to work with it.
> >
> > The two cases as stated above are:
> >
> > 1) It's a partition image (or in other words simply a file system)
> >
> > In this case, the best bet to get the resize to work is to first make
> > sure it isn't in use and not mounted. Then do something like:
> >
> > resize2fs fedora.img 10G (you may also need the -F option, since it is
> > not actually a file system partition, but a file representing one)
> >
> > 2) It's a disk image
> >
> > losetup -f
> >
> > losetup `losetup -f` fedora.img
> > kpartx -av /dev/loopX  <-- replace X with the appropriate number from
> > losetup -f output above
> > fdisk -l /dev/mapper/loopX
> > resize2fs /dev/mapper/loopXpY 10G <-- replace Y with appropriate
> > number from fdisk -l output (resize command changes if file system is
> > not ext2 or ext3
> >
> > a similar process is documented in [1]
> >
> > If you don't know if you fall into case 1 or 2, then you have two ways to
> > check
> >
> > 1) fdisk -l fedora.img (is there partitions?)
> >
> > 2) mount -o loop fedora.img /mnt/temp
> > be sure to umount /mnt/temp before resizing etc.
> >
> > Hope that helps.
> >
> > Best regards,
> > Todd
> >
> > [1] http://docs.cosi/wiki/Resizing_an_Image
> >
> > > Also i found one commad to resize2fs
> > > resize2fs /dev/vg/fedora
> > >  Is this step has to done or optional
> > >
> > > Now i ve seen the lvm size of created domain as 10GB with lvdisplay
> > command
> > >
> > > [root@g40 vm_creator]# lvdisplay /dev/vg/fedora
> > >   --- Logical volume ---
> > >   LV Name                /dev/vg/fedora
> > >    VG Name                vg
> > >   LV UUID                MwIi5u-kZRD-q4co-8imB-i9cf-PvuO-cO3fI5
> > >   LV Write Access        read/write
> > >   LV Status              available
> > >   # open                 1
> > >   LV Size                10.00 GB
> > >    Current LE             2560
> > >   Segments               1
> > >   Allocation             inherit
> > >   Read ahead sectors     0
> > >   Block device           253:0
> > >
> > > In my xm config file disk option given by me was
> > >
> > >
> > >  disk = ['phy:vg/fedora,sda6,w','phy:vg/compswap,sda7,w',
> > > 'phy:vg/modules,sda5,r']
> > >
> > > Also the size of the feora image ive used is
> > > [root@g40 images]# ls -ls fedora.img
> > > 2100232 -rw-r--r--  1 root root 2148532224 Feb 12 12:06 fedora.img
> > >
> > > Only this disk space is shown in df -H command inside the created domain
> > >
> > >  df -H
> > > Filesystem             Size   Used  Avail Use% Mounted on
> > > /dev/sda6              2.2G   904M   1.2G  46% /
> > >
> > > Whether it will show this disk size as 2GB only or it will show 10GB as my
> > > lvdisplay shows
> > >
> > > Fdisk command shows like this
> > >
> > > Disk /dev/sda6: 10.7 GB, 10737418240 bytes
> > >
> > > 255 heads, 63 sectors/track, 1305 cylinders
> > > Units = cylinders of 16065 * 512 = 8225280 bytes
> > >
> > > Disk /dev/sda6 doesn't contain a valid partition table
> > >
> > > Is this an error ??? Im getting little bit confused..
> > >
> > > Thanks in advanced
> > >
> > > Rajiv
> > > Project Associate
> > > CARE,MIT
> > > Anna University
> > >
> > >
> > >
> > >
> >
>

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

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