- 3,714,551 Users
- 2,242,576 Discussions
- 7,844,931 Comments
Forum Stats
Discussions
Categories
- Industry Applications
- 3.2K Intelligent Advisor
- Insurance
- 1K On-Premises Infrastructure
- 356 Analytics Software
- 32 Application Development Software
- 1.7K Cloud Platform
- 700.5K Database Software
- 17.4K Enterprise Manager
- 7 Hardware
- 164 Infrastructure Software
- 87 Integration
- 51 Security Software
question on lvcreate

OL 8.3 , a vm under VBox
After initial creation of the vm and installtion of OL 8.3, I added a second 'disk', and wish to create a lvol on it.
The disk was sized at 12g. I got the disk partitioned (one single partition) and created a vgroup with it, yielding this:
[email protected] ~]# vgdisplay vg_u01 --- Volume group --- VG Name vg_u01 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size <12.00 GiB PE Size 4.00 MiB Total PE 3071 Alloc PE / Size 0 / 0 Free PE / Size 3071 / <12.00 GiB VG UUID c93T67-gZXF-CMSW-1b7u-3ZBt-x3P3-F9dIGP
Now, when I try to create the lvol, I get this:
[[email protected] ~]# lvcreate --size 12G vg_u01 Volume group "vg_u01" has insufficient free space (3071 extents): 3072 required.
So what should I be applying for the size? How does the math work out on this?
Best Answer
-
Avi Miller-Oracle Senior Solution Architect, Oracle Cloud Infrastructure Developer Adoption Melbourne, AustraliaPosts: 4,727 Employee
I generally just use
-l 100%FREE
to specify "all available free space". But you can see that the output states that GiB is available, so trying to create something at 12 GiB isn't going to work.The LVM metadata and partition table eat into the 12 GB virtual disk. It's also probably a mismatch of specificity, i.e. gigabytes (GB) used by VirtualBox vs Gibibytes (GiB) used by LVM.
Answers
-
Avi Miller-Oracle Senior Solution Architect, Oracle Cloud Infrastructure Developer Adoption Melbourne, AustraliaPosts: 4,727 Employee
I generally just use
-l 100%FREE
to specify "all available free space". But you can see that the output states that GiB is available, so trying to create something at 12 GiB isn't going to work.The LVM metadata and partition table eat into the 12 GB virtual disk. It's also probably a mismatch of specificity, i.e. gigabytes (GB) used by VirtualBox vs Gibibytes (GiB) used by LVM.
-
Got it. Thanks again.