[ale] Xen Server adding a virtual disk to a VM

Lightner, Jeffrey JLightner at dsservices.com
Wed Oct 19 08:41:47 EDT 2016


+1

LVM makes your life simple.   We do LVM on both bare metal and virtual systems.   People often treat LVM like it is unnecessarily complicated but once you use it you wonder how you ever lived without it.

That being said I do recall first meeting LVM on HP-UX in the mid-90s and asking the question:
Why would I combine all my disks together (into VGs) just to break them up again (into LVs)?

I now know the answer is because I can add (and even remove) disks (or partitions thereof) after the fact and/or can make the LVs any size I want.  I can also have an unlimited number of LVs (space limited of course) which can be added, deleted or resized without any consideration of other LVs.

From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Jim Kinney
Sent: Monday, October 17, 2016 4:12 PM
To: Atlanta Linux Enthusiasts - Yes! We run Linux!
Subject: Re: [ale] Xen Server adding a virtual disk to a VM


I use LVM for vm disks as well as physical ones. I am often needing to expand the virtual disk space and LVM makes is easy.

On Oct 17, 2016 2:51 PM, "Scott Plante" <splante at insightsys.com<mailto:splante at insightsys.com>> wrote:
Thanks guys. This thread has been very informative.

So you don't LVM inside a VM, but do you partition? I've always partitioned because it's how I was taught (pre-VM), but suppose you have a Linux VM, and you want to add a 200GB partition for some application. You go into your VM software and create the virtual disk and attach it to the VM. Inside the VM it appears as a new device, say /dev/xvde. You could create a partition and /dev/xvde1 would appear and you could mkfs /dev/xvde1 or you could skip the partitioning and just mkfs /dev/xvde. One reason you generally partition is for the sector alignment stuff, but (correct me if I'm wrong) that doesn't apply to a virtual disk. The sector alignment would be taken care of when you partition the drive inside XenServer, VMWare or whatever's running on the bare metal. Another reason you might normally partition a drive is to separate your OS  from your data, to make sure run-away log files don't crash your database, etc., but that doesn't apply here because you've already created a separate virtual disk for that purpose.

I asked a friend at the pub Friday night who works with lots of VMs and he says he partitions just as a reminder to himself that he has or hasn't done something with the virtual disk. So he might go add a new disk to a half-dozen VMs, and when he goes into each one he can more easily tell whether he has taken care of it yet or something like that. If I add or remove a disk once a month it's a lot, so that's not a big selling point for me. Still, I suppose it could be useful as some longer term "documentation" kind of thing.

So those of you on the list who deal with VMs: do you partition your virtual disks?

Scott

p.s. my recent VM experience is mostly with XenServer, so forgive me if my question and/or terminology doesn't make sense for ESXi, KVM, or other VM environments.
________________________________
From: "Phil Turmel" <philip at turmel.org<mailto:philip at turmel.org>>
To: ale at ale.org<mailto:ale at ale.org>
Sent: Saturday, October 15, 2016 11:08:35 AM
Subject: Re: [ale] Xen Server adding a virtual disk to a VM

On 10/14/2016 05:13 PM, DJ-Pfulio wrote:
> Ok, so fdisk was patched, but I'm still waiting for that patch to
> actually make it into every distro I see. I keep seeing fdisk complain
> about GPT disks - easier to just use parted, IMHO. Parted also aligns
> partitions correctly, as does gparted.  fdisk does not. If you use only
> SSDs, don't think that it matters, but on spinning disks, there can be a
> real, noticeable, performance hit.

Interesting.  I've been using 'gdisk' for quite some time now.  Same
style of interface but supports GPT, plus conversions to/from MBR and
BSD.  I thought is was packaged with util-linux, but I just found out
otherwise.

It is part of the base install of Ubuntu Server at least since 14.04.
It came in as a default dependency of udisks on my gentoo systems, which
is pulled in by a variety of things.  So I assumed it was part of the
system set.

I like gdisk *way* more than parted.

> GPT has many upgrades over MBR, like duplication at the front/end of the
> storage, not only at the beginning. Plus not having to deal with
> "logical/extended" partitions ever again is nice. Wikipdeia has more.
>
> Inside a VM, I don't don't use LVM.  Only outside on the hostOS. There
> are multiple pros/cons to either method. I can understand if folks want
> LVM inside a VM and why they wouldn't. Do some research.

I do the same.  LVM on bare metal, not in VMs.  All of my VM disks are
LVs, not files.  Virt-manager makes that easy, btw -- you can make any
volume group in a host a "pool" for VM allocations.  It was one of the
final straws that got me off of virtualbox.

> Haven't touched btrfs. Seems there is always some "issue" that is
> important to me with it. Whether that is true or not is completely
> irrelevant. It is a hassle that I don't need. Understand many people
> love btrfs, which is great. More users will eventually fix the issues I
> have! Thanks!

Yup.  I played with it once.  Haven't touched it since.

> lsblk is nice. Plus, it doesn't need sudo to work (at least not on any
> systems I manage).

I wrote lsdrv[1] because I didn't like the way lsblk repeated trees when
raid arrays were present, and I wanted something that would document
controller ports, device SNs, and UUIDs for later recovery tasks.
Basically lsblk + blkid + lspci + lsusb in one report.

Phil

[1] https://github.com/pturmel/lsblk

_______________________________________________
Ale mailing list
Ale at ale.org<mailto:Ale at ale.org>
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo


_______________________________________________
Ale mailing list
Ale at ale.org<mailto:Ale at ale.org>
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20161019/0325cbfe/attachment.html>


More information about the Ale mailing list