Sorry for my ignorance. When I create xen virtual machines on lvm I need to create a filesystem on lvm container? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mauro wrote:>When I create xen virtual machines on lvm I need to create a >filesystem on lvm container?I assume you mean you create an LVM LV in Dom0 and use that as a virtual disk for a DomU ? The answer is that you treat the disk inside DomU just as you would treat a real disk on a real machine - you optionally partition it, and create filesystems as required. You have more flexibility with Xen as you can create multiple LVs in Dom0 and give the DomU multiple virtual disks - and then create a filesystem in each disk without partitioning it. This is what I do as it gives great flexibility and the filesystems can be easily mounted in Dom0 if required (eg to repair it, with the DomU shut down of course). Others create one big LV and partition it within the DomU the same as you would with a real disk - it''s more logical within the DomU, works with OS installers, but is harder if you want to mount a filesystem in Dom0. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thursday 03 June 2010 13:11:43 Mauro wrote:> Sorry for my ignorance. > When I create xen virtual machines on lvm I need to create a > filesystem on lvm container? > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >Depends on if you want to work with an image file (you do) or with a block device (you don''t). Rgds, Bart _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mauro wrote:> Sorry for my ignorance. > When I create xen virtual machines on lvm I need to create a > filesystem on lvm container? > >assuming you''re using LVs as your root and swap devices, yes it does get just a bit trickier: 1. if you''re using xen-tools to create your image, then it will create the file systems and swap device for you (assuming you give xen-tools the proper information about your LVMs) 2. if you''re using your LVs as backing store for a block device (e.g., DRBD), then you have to create your DRBD device, and then make filesystems and swap on the block devices (again if you use xen-tools, it will do the right thing for you -- note: you need to tell xen-create-image to use your block devices, e.g. with options like --image-dev=/dev/drbd1 --swap-dev=/dev/drbd2 -- these are buried in the documentation) 3. if you''re not using xen-create-image or something similar, you''ll need to explicitly make your filesystem and swap device Miles Fidelman (who''s just finished doing this for several VMs, so it''s all fresh in his mind) -- In theory, there is no difference between theory and practice. In<fnord> practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 3 June 2010 14:50, Miles Fidelman <mfidelman@meetinghouse.net> wrote:> Mauro wrote: >> >> Sorry for my ignorance. >> When I create xen virtual machines on lvm I need to create a >> filesystem on lvm container? >> >> > > assuming you''re using LVs as your root and swap devices, yesI''m italian and my english is very bad. If I''ve understood well xen-tools create the LV, then the filesystem on it and then put the VM image. So if I set, for example, 50G for my VM disk space and later I need more space I simply do lvextend on the LV and then resize2fs, then change the parameter on the VM config file, for example 100G, and simply restart the VM. Is it wrong? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mauro wrote:> On 3 June 2010 14:50, Miles Fidelman<mfidelman@meetinghouse.net> wrote: > >> Mauro wrote: >> >>> Sorry for my ignorance. >>> When I create xen virtual machines on lvm I need to create a >>> filesystem on lvm container? >>> >> assuming you''re using LVs as your root and swap devices, yes >> > I''m italian and my english is very bad. > If I''ve understood well xen-tools create the LV, then the filesystem > on it and then put the VM image. > So if I set, for example, 50G for my VM disk space and later I need > more space I simply do lvextend on the LV and then resize2fs, then > change the parameter on the VM config file, for example 100G, and > simply restart the VM. >That''s basically it. I don''t think you have to change anything in the config file if you resize the LV later, but I''ve never actually played with resizing volumes. Miles -- In theory, there is no difference between theory and practice. In<fnord> practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Friday 04 June 2010 04:04:02 Miles Fidelman wrote:> Mauro wrote: > > On 3 June 2010 14:50, Miles Fidelman<mfidelman@meetinghouse.net> wrote: > >> Mauro wrote: > >>> Sorry for my ignorance. > >>> When I create xen virtual machines on lvm I need to create a > >>> filesystem on lvm container? > >> > >> assuming you''re using LVs as your root and swap devices, yes > > > > I''m italian and my english is very bad. > > If I''ve understood well xen-tools create the LV, then the filesystem > > on it and then put the VM image. > > So if I set, for example, 50G for my VM disk space and later I need > > more space I simply do lvextend on the LV and then resize2fs, then > > change the parameter on the VM config file, for example 100G, and > > simply restart the VM. > > That''s basically it. I don''t think you have to change anything in the > config file if you resize the LV later, but I''ve never actually played > with resizing volumes. > > Miles >The config-file for the Virtual Machines (Domains) only mention where to find the disk-images. (LVs) When you resize these LVs, the config does not need to be changed. I would, however, suggest you test this properly before using it in a production environment. This way you will be certain how it all works. -- Joost PS. Mauro, your English doesn''t look that bad, I have seen much worse :) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thursday 03 June 2010 22:54:04 Mauro wrote:> On 3 June 2010 14:50, Miles Fidelman <mfidelman@meetinghouse.net> wrote: > > Mauro wrote: > >> Sorry for my ignorance. > >> When I create xen virtual machines on lvm I need to create a > >> filesystem on lvm container? > > > > assuming you''re using LVs as your root and swap devices, yes > > I''m italian and my english is very bad. > If I''ve understood well xen-tools create the LV, then the filesystem > on it and then put the VM image. > So if I set, for example, 50G for my VM disk space and later I need > more space I simply do lvextend on the LV and then resize2fs, then > change the parameter on the VM config file, for example 100G, and > simply restart the VM. > Is it wrong?Mauro, I would do a different sequence here. I would suggest you do: 1) stop VM 2) use "lvextend" to increase the LV 3) use "resize2fs" to increate the filesystem 4) start the VM Do NOT resize the filesystem if the VM is not aware of the new change, weird things WILL happen this way. Also, "resize2fs" is for EXT2 and EXT3 filesystems. If you use a different filesystem (for example: XFS, Reiserfs,...) you will need to use a different tool. Also, recent XEN-versions (xen-kernels) support "online" resizing of LVs. This means, that when you "lvextend" the LV, the DomU (VM) is informed of the new size. You can then "resize2fs" the filesystem from within the DomU. -- Joost _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users