LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-27-2015, 09:27 AM   #1
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Rep: Reputation: 23
Presenting logical volume from host to KVM guest. Partition within guest?


Hi everyone

I've just been looking at rebuilding a small KVM host I've had running for a couple of years.

Just checked and there's a mail server guest (large database) where I have presented a logical volume to it. But inside that guest I'm not using LVM but have created a single partition with a regular file system.

Would it not be better to add the host's LV as a PV within the guest?
Then I can expand the LV at the host level, do a vgextend, lvextend and a resize2fs. Instead of worrying about having to resize a partition.

That wouldn't cause any issues at the host level would it?
The guest storing LVM metadata within a host's LV?

Cheers, B
 
Old 07-27-2015, 11:25 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,147

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
It wouldn't hurt, but there is not a big advantage.

You can put a filesystem on the unpartitioned PV in the guest. When you expand the LVM on the host, reboot the guest or run blockdev to update the size, then expand the filesystem.
 
Old 07-27-2015, 03:53 PM   #3
batfastad
Member
 
Registered: Nov 2004
Location: London, UK
Distribution: CentOS, RHEL, Debian, IPCop, PS2Linux
Posts: 95

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by smallpond View Post
You can put a filesystem on the unpartitioned PV in the guest. When you expand the LVM on the host, reboot the guest or run blockdev to update the size, then expand the filesystem.
Woah, an FS on an unpartitioned PV in the guest? So no VG/LV in the guest?

In a normal LVM scenario I never bother partitioning PVs first because I always end up having to reboot the VM. I understand the risk of not partitioning is that if you took the disk to a machine that didn't understand LVM then it might try and "initialize" it automatically and start partitioning/nuking data. But I can't think of any time where that's been even a vague consideration so I prefer to just increase the size of the disk in VMware then increase the VG, LV, FS.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting host partition on KVM guest KroniK Linux - Virtualization and Cloud 3 10-26-2013 02:46 PM
Redirect logs from KVM guest to KVM host essential1 Linux - Virtualization and Cloud 2 10-08-2013 03:29 PM
Guest to Host message passing - guest's memory usage statistics & guest's IP address Prince_Pangeni Linux - Virtualization and Cloud 2 03-03-2012 03:06 AM
KVM with Ubuntu guest - guest crashes when some apps are 'full screened' TonyRogers Linux - Virtualization and Cloud 0 05-15-2011 12:18 PM
Guest OS installation failed on a logical volume in CentOS 5.1 64bit! jimmyjiang Red Hat 1 04-11-2008 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration