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

Re: [Xen-users] what's correct way of shrinking LVM based domU?



Jean Charles Delepine wrote:
Rudi Ahlers <Rudi@xxxxxxxxxxx> écrivait (wrote) :

This is what I have:

[root@cPanel002 ~]# [root@HF-LINSRV01 ~]# lvscan
 ACTIVE            '/dev/data/cpanel002' [100.00 GB] inherit
 ACTIVE            '/dev/data/windows2003_web' [30.00 GB] inherit
 ACTIVE            '/dev/data/storage' [50.00 GB] inherit
 ACTIVE            '/dev/data/cacti' [20.00 GB] inherit
 ACTIVE            '/dev/data/cpanel2' [30.00 GB] inherit
 ACTIVE            '/dev/system/root' [39.06 GB] inherit
 ACTIVE            '/dev/system/swap' [9.75 GB] inherit


I need to resize the 100GB /dev/data/cpanel002

1) shutdown the domu : xm shutdown 'name of domu'
   wait for the domu to be shutdown  (xm list)
2) reduce the filesystem : If it's ext3 :
      e2fsck -f -y /dev/data/cpanel00
      resize2fs -p /dev/data/cpanel00 90G
3) reduce the logical volume :
      lvreduce -L 90G /dev/data/cpanel00

4) restart the domu.

              Jean Charles
I don't think those commands will work on ext3

[root@HF-LINSRV01 i386]# e2fsck -f -y /dev/data/cpanel002
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/data/cpanel002

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
   e2fsck -b 8193 <device>


--

Kind Regards
Rudi Ahlers
CEO, SoftDux

Web:   http://www.SoftDux.com
Check out my technical blog, http://blog.softdux.com for Linux or other 
technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stuff



_______________________________________________
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®.