Hi, I use xen on centos 5.2 x86 and used virt-install to create a few virtual machines. A few days ago centos 5.3 emerged, but I did not allocate enough diskspace for these virtual machines, only 2 gb. That''s way too small for running yum-upgrade. So I tried to increase them. With no luck. I found a howto that instructs me to mount -o loop /mnt /vm/foo.img, but that fails: "mount: you must specify the filesystem type" . Specifying ext2 says: "mount: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so" In dmesg: "loop: loaded (max 8 devices) hfs: unable to find HFS+ superblock VFS: Can''t find an ext2 filesystem on dev loop0." Another option I saw was just appending a gigabyte of /dev/zero using dd. I did that, but the diskspace in the virtual machine stays 2gb. I think I ran outta options. Any hints or advice ? Besides building new machines from scratch using the correct sizes ;-/ Regards. P _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
This looks backwards. I would think "mount -o loop /mnt /vm/foo.img" should be "mount -o loop /vm/foo.img /mnt" Paul Eskello wrote:> Hi, > > I use xen on centos 5.2 x86 and used virt-install to create a few > virtual machines. > > A few days ago centos 5.3 emerged, but I did not allocate enough > diskspace for these virtual machines, only 2 gb. That''s way too small > for running yum-upgrade. > > So I tried to increase them. With no luck. I found a howto that > instructs me to mount -o loop /mnt /vm/foo.img, but that fails: > "mount: you must specify the filesystem type" . > > Specifying ext2 says: > "mount: wrong fs type, bad option, bad superblock on /dev/loop0, > missing codepage or other error > In some cases useful info is found in syslog - try > dmesg | tail or so" > > In dmesg: > "loop: loaded (max 8 devices) > hfs: unable to find HFS+ superblock > VFS: Can''t find an ext2 filesystem on dev loop0." > > Another option I saw was just appending a gigabyte of /dev/zero using > dd. I did that, but the diskspace in the virtual machine stays 2gb. > > I think I ran outta options. > Any hints or advice ? Besides building new machines from scratch using > the correct sizes ;-/ > > Regards. > P > > _______________________________________________ >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Prior to changing my system over to using filesystems on LVM, I had expanded a DomU disk image file by using the dd option you explained. Expanding the disk image file was done on the Dom0 machine with the DomU shutdown. I then started the DomU and expanded the filesystem on the DomU. It appeared to work okay, but I now find LVM is easier to deal with and has better performance. Tom Jensen | President Digital Toolbox -------------------------------------------------- From: "Roy" <onion@garlic.com> Sent: Monday, April 13, 2009 12:51 PM To: "Paul Eskello" <paul.eskello@gmail.com> Cc: <xen-users@lists.xensource.com> Subject: Re: [Xen-users] expanding img file> This looks backwards. I would think "mount -o loop /mnt /vm/foo.img" > should be "mount -o loop /vm/foo.img /mnt" > > > Paul Eskello wrote: >> Hi, >> >> I use xen on centos 5.2 x86 and used virt-install to create a few >> virtual machines. >> >> A few days ago centos 5.3 emerged, but I did not allocate enough >> diskspace for these virtual machines, only 2 gb. That''s way too small >> for running yum-upgrade. >> >> So I tried to increase them. With no luck. I found a howto that >> instructs me to mount -o loop /mnt /vm/foo.img, but that fails: >> "mount: you must specify the filesystem type" . >> >> Specifying ext2 says: >> "mount: wrong fs type, bad option, bad superblock on /dev/loop0, >> missing codepage or other error >> In some cases useful info is found in syslog - try >> dmesg | tail or so" >> >> In dmesg: >> "loop: loaded (max 8 devices) >> hfs: unable to find HFS+ superblock >> VFS: Can''t find an ext2 filesystem on dev loop0." >> >> Another option I saw was just appending a gigabyte of /dev/zero using >> dd. I did that, but the diskspace in the virtual machine stays 2gb. >> >> I think I ran outta options. >> Any hints or advice ? Besides building new machines from scratch using >> the correct sizes ;-/ >> >> Regards. >> P >> >> _______________________________________________ >> > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Paul, On Debian (Etch/Lenny), I''ve successfully expanded img files, several times, with the following commands (from http://wiki.kartbuilding.net/index.php/Resize/Increase_the_Size_of_a_File_Based_DomU_Xen_Filesystem) : Backup the File based image firstly, making sure it is not mounted nor running as a xen domU. dd if=/dev/zero of=file.img bs=1M conv=notrunc count=1 seek=2000 #This resizes the file.img to 2GB. losetup /dev/loop1 file.img #loop1 had to be used as xen was already running a different domU via loop0. e2fsck -f /dev/loop1 resize2fs /dev/loop1 e2fsck -f /dev/loop1 losetup -d /dev/loop1 I am not really familiar with Centos, I hope this will work for you. Best regards, Paul Eskello a écrit :> Hi, > > I use xen on centos 5.2 x86 and used virt-install to create a few > virtual machines. > > A few days ago centos 5.3 emerged, but I did not allocate enough > diskspace for these virtual machines, only 2 gb. That''s way too small > for running yum-upgrade. > > So I tried to increase them. With no luck. I found a howto that > instructs me to mount -o loop /mnt /vm/foo.img, but that fails: > "mount: you must specify the filesystem type" . > > Specifying ext2 says: > "mount: wrong fs type, bad option, bad superblock on /dev/loop0, > missing codepage or other error > In some cases useful info is found in syslog - try > dmesg | tail or so" > > In dmesg: > "loop: loaded (max 8 devices) > hfs: unable to find HFS+ superblock > VFS: Can''t find an ext2 filesystem on dev loop0." > > Another option I saw was just appending a gigabyte of /dev/zero using > dd. I did that, but the diskspace in the virtual machine stays 2gb. > > I think I ran outta options. > Any hints or advice ? Besides building new machines from scratch using > the correct sizes ;-/ > > Regards. > P > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Alexis de BRUYN email : alexis@de-bruyn.fr _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Apr 13, 2009 at 10:54 PM, Paul Eskello <paul.eskello@gmail.com> wrote:> Hi, > > I use xen on centos 5.2 x86 and used virt-install to create a few > virtual machines.That could be ... tricky. Did you use LVM on domU, or is it plain partition? (Hint: if you don''t know what I''m talking about, run "fdisk -l" and "df -h" on your domU)> > A few days ago centos 5.3 emerged, but I did not allocate enough > diskspace for these virtual machines, only 2 gb. That''s way too small > for running yum-upgrade. > > So I tried to increase them. With no luck. I found a howto that > instructs me to mount -o loop /mnt /vm/foo.img, but that fails: > "mount: you must specify the filesystem type" .It won''t work. Depends on how you setup domU, to mount it on dom0 you also need: - kpartx - pvscan/vgscan (only if domU uses LVM)> Another option I saw was just appending a gigabyte of /dev/zero using > dd. I did that, but the diskspace in the virtual machine stays 2gb.I hope you backup your domU first before trying that :) Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users