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
|