Vreme: 10/20/2011 10:22 AM, Müfit Eribol piše: > On 19.10.2011 21:07, Ljubomir Ljubojevic wrote: >> Vreme: 10/19/2011 06:34 PM, Müfit Eribol piše: >>> Hi, >>> >>> My host and guest are CentOS 6. The guest is going to be a web server in >>> production. I am trying to resize (extend) of the base partition of my >>> guest. But I can of course start the installation of CentOS 6 guest all >>> over again with a larger image size. However, just for the sake of >>> better understanding I an trying to solve things not to be end up in a >>> dead end after some years. >>> >>> 1. I created a guest CentOS 6 with 12G total disk (on a iscsi drive). No >>> Desktop, just for terminal use. No LVM, just a simple basic partitioning. >>> 2. Later I wanted to increase the size of total image to 200G. >>> 3. I managed to resize the image to 200G on my iscsi drive. So, there is >>> 188G unallocated/unformatted volume within the guest image. >>> >>> Now, the hardest part. I have to resize the partition. I have been >>> trying to find a way to do that. A search on Google showed that GParted >>> is tool to do that. I had to install all Desktop and X as Gparted is a >>> GUI tool. Installed vncserver. Then, I found out that GParted can not >>> resize the live guest. So, I downloaded GParted Live CD. >>> >>> Now, the questions: >>> >>> 1. If it was a physical machine I would boot from the CD. If I can boot >>> it from host CDROM but then how should I operate on a specific guest? >>> What is the easiest way to access GUI of the guest if I boot from Live CD. >>> 2. I am wondering if a simple LVM route at the beginning would be >>> preferred. Changing size of the iscsi volume on my NAS is easy. I >>> thought there was no need for more complication, so went with basic >>> /boot / and swap partitions. Is resizing partitions for LVM easier than >>> basic partitioning (without LVM)? >>> 3. Is there a specific tool in KVM suit which performs resizing >>> partition within the image? Or as I prefer command line tools, is there >>> a way to achieve resizing without any graphical tool like GParted? With >>> GParted I had to install all the X and Gnome files, vncserver which >>> otherwise I don't need. >>> >>> I would appreciate any information/hint/experience. >>> >>> All the best. >> Hi. >> >> My view is: >> >> a) Use LVM so you can manipulate size of partition(s). Resizing etx4 >> partitions is horrible job, long and dangerous. >> >> b) You can mount ISO image file of any CD via Guests VirtualCD, no need >> to mess with physical CD/DVD drives. There is System Rescue CD, CentOS >> LiveCD (I have one 5.3 with mdadm raid support and bunch of tools,I will >> soon be making 6.1 version) or Hiren's Boot CD - Parted. Root partition >> needs offline resize since extX partitions can not be mounted at the >> time of the resizing. >> >> c) All text-based resize tools require higher knowledge and/or >> experience, like alignment to sectors and similar mambo-jumbo. When you >> need to make it happen on production server without experimentation and >> you have done it only once 3 years ago it IS mambo-jumbo. >> >> d) As far as I know, KVM can not mount virtual hard drives, so meesing >> with them is not an option, unless you use "raw" partition on the Host >> (still haven't tried it). >> > > It is good to know at the very beginning that LVM is the way to go. So, > I am reinstalling the server with LVM. It is good to know about it so early. > > Just for learning, could you please provide some more info about booting > up the LiveCD ISO image (uploaded to the host) to work on a guest? How > is the command line? > > Thank you for your kind help. > > _______________________________________________ > CentOS mailing list > CentOS@xxxxxxxxxx > http://lists.centos.org/mailman/listinfo/centos > > Sorry, I do not use command line for KVM. I use my Desktop to connect to Servers KVM Domain: Virtual Machine Manager -> File -> Add New Connection -> Fill: Hipervisor: QEMU/KVM; Connect to remote host; Metod: SSHl username + password; Hostname: xxx And you should have full access to your servers KVM domain. But even if you need to use command line, I am sure you will be able to find it by googling for "kvm linux boot from cd command line". Also check out CentOS-virt mailing list Archive (on this same mailing list server). http://www.linux-kvm.org is official site for KVM. -- Ljubomir Ljubojevic (Love is in the Air) PL Computers Serbia, Europe Google is the Mother, Google is the Father, and traceroute is your trusty Spiderman... StarOS, Mikrotik and CentOS/RHEL/Linux consultant _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos