Single Disk Not Partitioned at Ubuntu installation, Installed Xen, Unable to create LV, error: Size not enough
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Single Disk Not Partitioned at Ubuntu installation, Installed Xen, Unable to create LV, error: Size not enough
Am following https://help.ubuntu.com/community/Xen url and had covered upto "Manually installing an HVM Guest VM". But only late I realized that I had not done the "During the install of Ubuntu for the partitioning method choose 'Guided - use the entire disk and setup LVM'..." Now can I do anything about it? If possible I don't want to use live CD/USB etc.
Had you told us what you had done, rather than what you hadn't, we might be able to offer some suggestions. Also post relevant info - disk layout including sizes, pv/vg/lsv lists, that sort of thing.
Do a lvresize before the lvcreate - you need to get unallocated space in the vg before you can add new lv's.
Make sure you add the "-r" to automatically resize the filesystem for you at the same time.
Last edited by syg00; 05-14-2021 at 04:56 AM.
Reason: resize
I have run vgdisplay
--- Volume group ---
VG Name vgubuntu
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 237.97 GiB
PE Size 4.00 MiB
Total PE 60921
Alloc PE / Size 60915 / <237.95 GiB
Free PE / Size 6 / 24.00 MiB
I don't know if I had understood it correctly, but does the line: Alloc PE / Size 60915 / <237.95 GiB means that most of the memory in vgubuntu is already allocated? I have only around 250 GB overall space(SSD). Am new to these things so please be patient with me.
LVM is a disk emulation layer that provides flexibility in managing space - somewhat analogous to dynamic disks in Windows. Somewhat.
But it also adds complexity and new concepts. I suggest you search for a "what is LVM" quick tutorial online. From this page download the "Configuring and managing logical volumes" for a very good manual that covers everything.
Essentially the vg is equivalent to a disk - you allocate lv's within that just like you would partitions, then format the lv as a filesystem for use. So you don't want (or need) to alter the size of the vg, you need to shrink the root lv to something more sensible, then you will have space you can use for other lv's. Later you can move space back and forth between the lv's if needed - much easier than real partitions.
Last edited by syg00; 05-14-2021 at 07:20 PM.
Reason: typo
Thanks, let me learn first! Is it ok if I keep this open so that I can come back and ask any doubts(until I accomplish)? This is a very responsive site!
What I plan to do is:
1. lvreduce --resizefs -L 212G vgubuntu/root
2. lvcreate -L 8G -n ubuntu-hvm /dev/vgubuntu
Is there any problem/risks with this strategy? Is it the correct way?
And its says it must unmount first!
what will happen when it gets unmounted, will I need live CD or USB on the way?
Go back and re-read that link you posted. There is no point in having the Dom0 root that big - I wouldn't go as small as they suggest, but 30 Gig might be a reasonable first guess, it will allow for things like logs and such as well as updates.
Then you have plenty of space for the guests and any data they will need.
Forgot to mention - I'm surprised you can't resize online; I hope you aren't using XFS. Lets'see these outputs.
Code:
df -hT
lsblk -f
Last edited by syg00; 05-17-2021 at 01:12 AM.
Reason: forgot ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.