LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-24-2015, 02:30 AM   #1
mhetreys
LQ Newbie
 
Registered: Jun 2015
Posts: 4

Rep: Reputation: Disabled
how to create volume with lvcreate when no free space


how to create new volume using lvcreate, if there is no free space.
I used fdisk -l, but it is giving error.

my output of vgdisplay command

[root@oc0018158158 Desktop]# vgdisplay
--- Volume group ---
VG Name vg_oc1443230061
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 464.78 GiB
PE Size 32.00 MiB
Total PE 14873
Alloc PE / Size 14873 / 464.78 GiB
Free PE / Size 0 / 0
VG UUID HnQ86q-OOT1-akAA-hCPk-8rMZ-mPXc-kOzTkY



please help me as i am new to linux.
 
Old 06-24-2015, 03:15 AM   #2
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Code:
lvs
will give you info about logical volumes.
You could try deleting unwanted files etc from your lv's, followed by
Code:
lvreduce -r ...
Failing that you need to add more physical storage or take some storage from another volume group.

For a summary, see
Code:
sudo lvm
help
...
...
quit
 
Old 06-24-2015, 04:36 AM   #3
mhetreys
LQ Newbie
 
Registered: Jun 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
here is output of lvs

[root@oc0018158158 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_root vg_oc1443230061 -wi-ao---- 456.78g
lv_swap vg_oc1443230061 -wi-ao---- 8.00g
[root@oc0018158158 ~]#
[root@oc0018158158 ~]#
[root@oc0018158158 ~]#
[root@oc0018158158 ~]# lvreduce -r
Please specify either size or extents but not both.
Run `lvreduce --help' for more information.
 
Old 06-24-2015, 06:28 AM   #4
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
You are in bad situation, all space assigned to / .
You have to umount FS to reduce it and this is not possible for / .

Therefore you have to backup everything, because reducing is dangerous.

Then you will boot from rescue disk, not mounting local disk, vgscan, vgimport, vgchange -ay.
resize2fs to reduce / to desired size, lvreduce to same size +1m (to be sure).
Then you will have plenty free space to create whatever.

From other point of view, the new volume will be mounted under / , probably you can skip all
this headache and just mkdir ?
 
Old 06-24-2015, 07:32 AM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
lvreduce has many variations in parameters - hence the ...
The -r parameter will automatically reduce the file system on the logical volume, safely.
Constructions such as
Code:
lvreduce -r --extents 10%LV /dev/vg-name/lv-name
works for me.
(Change the 10% to whatever is required).

If you presently have one giant extent, this can take a very long time to run.
 
1 members found this post helpful.
Old 06-24-2015, 08:18 AM   #6
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
I see, it useful to reread manuals, I was doing this in old school manner.
 
Old 07-01-2015, 05:16 AM   #7
mhetreys
LQ Newbie
 
Registered: Jun 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks..i solved the problem. its due to only one partition.
 
  


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
[SOLVED] No space to create more partitions, but there is free space anon091 Linux - Newbie 35 10-31-2012 10:46 AM
how to shrink Volume Group and get some space to create new volume Farah_s Linux - Newbie 1 03-14-2012 07:34 AM
lvm: lvcreate -L (all free space) mrmnemo Linux - Hardware 3 03-27-2010 11:00 PM
Help removing free space to create Raw free space nightmare55 Linux - Newbie 11 10-01-2009 03:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:18 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