logical volume remove

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat logical volume remove
# 1  
Old 08-27-2009
logical volume remove

I have a buch of logical volumes and I need to remove. I can able to remove them but when i remove lvm which has 5gb, i dont see
that space is alloted to root partition. Any ideas.Thanks
# 2  
Old 08-27-2009
You will not see any change in partitions. However, if you remove logical volumes, you should see a corresponding increase in free space within its volume group. You can then extend volumes within that volgroup by the new free amount and then grow its filesystem.
# 3  
Old 08-27-2009
Thanks for your reply.

I'm in confusion. I have LVM's like
/dev/mapper/VolGroup00-LogVol00 -10gb /
/dev/mapper/VolGroup00-LogVol01 -2gb /tmp
/dev/mapper/VolGroup00-LogVol03- 500mb /opt
/dev/mapper/VolGroup00-LogVol04 - 10gb /var

so if i remove /dev/mapper/VolGroup00-LogVol01, i should see 2gb free space right? how can I check that?
and also I need to increase /dev/mapper/VolGroup00-LogVol03 to 2gb from 500mb. how can i do this?
Thanks
# 4  
Old 08-27-2009
You type vgdisplay and look for Free PE. Those free physical extents are what you can allocate to LogVol03. You would use lvextend -l [extents] [path to logvol]. But after that you have to use resize2fs to grow the filesystem.
# 5  
Old 08-27-2009
Thanks it works.

---------- Post updated at 01:35 PM ---------- Previous update was at 01:15 PM ----------

it works with extending the size. But when i remove "/dev/mapper/VolGroup00-LogVol04 - 10gb /var" and I check for the Free PE with vgdisplay command, i see same free PE even after lvm. is there anything i missed? Thanks
# 6  
Old 08-27-2009
Hopefully this illustrates how it should go

Code:
[root@F10 ~]# vgdisplay Beatles
  --- Volume group ---
  VG Name               Beatles
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.00 GB
  PE Size               4.00 MB
  Total PE              511
  Alloc PE / Size       511 / 2.00 GB
  Free  PE / Size       0 / 0  
  VG UUID               ZEama4-bjx6-DUnz-xEAR-Zcir-YM1L-pHvZHp
  
[root@F10 ~]# lvdisplay Beatles
  --- Logical volume ---
  LV Name                /dev/Beatles/John
  VG Name                Beatles
  LV UUID                HeNEwB-HYTo-ke3G-bNYJ-W2Xu-JNze-yaZ9tE
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                512.00 MB
  Current LE             128
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
  
  --- Logical volume ---
  LV Name                /dev/Beatles/Paul
  VG Name                Beatles
  LV UUID                toWU48-FghQ-WkBy-mPxH-s9bP-ORpF-Xh6XZ7
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                512.00 MB
  Current LE             128
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
  
  --- Logical volume ---
  LV Name                /dev/Beatles/George
  VG Name                Beatles
  LV UUID                iZivOZ-ZBoo-vSG6-1Lvn-7FcC-RAPx-GJe5mR
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                512.00 MB
  Current LE             128
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4
  
  --- Logical volume ---
  LV Name                /dev/Beatles/Ringo
  VG Name                Beatles
  LV UUID                ClIOwj-P1n0-i6MB-F4aS-CSlK-puUZ-ZAp0fn
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                508.00 MB
  Current LE             127
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5

[root@F10 ~]# lvremove /dev/Beatles/John
Do you really want to remove active logical volume "John"? [y/n]: y
  Logical volume "John" successfully removed

[root@F10 ~]# vgdisplay Beatles
  --- Volume group ---
  VG Name               Beatles
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.00 GB
  PE Size               4.00 MB
  Total PE              511
  Alloc PE / Size       383 / 1.50 GB
  Free  PE / Size       128 / 512.00 MB
  VG UUID               ZEama4-bjx6-DUnz-xEAR-Zcir-YM1L-pHvZHp

There's enough room now for a new Beatles member.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

2. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

3. AIX

Position of the logical volume on the physical volume

Hello everyone, I just read that while creating a logical volume(LV) we can choose the region of the physical volume (PV) in which the LV should be created. When I say region I mean: outer edge - outer middle - center - inner middle and inner edge. Can anyone help me understand the utility... (11 Replies)
Discussion started by: adilyos
11 Replies

4. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

5. AIX

Logical volume name conflict in two volume group

Hello, I am a french computer technician, and i speak English just a little. On Aix 5.3, I encounter a name conflict logical volume on two volume group. The first volume lvnode01 is OK in rootvg and mounted. It is also consistent in the ODM root # lsvg -l rootvg |grep lvnode01 ... (10 Replies)
Discussion started by: dantares
10 Replies

6. HP-UX

Unmount and remove all Logical vol.Volume group and physical disk

Hi, Someone please help me with how i can unmount and remove all the files systems from a cluster. This is being shared by two servers that are active_standby. (3 Replies)
Discussion started by: joeli
3 Replies

7. AIX

Basic Filesystem / Physical Volume / Logical Volume Check

Hi! Can anyone help me on how I can do a basic check on the Unix filesystems / physical volumes and logical volumes? What items should I check, like where do I look at in smit? Or are there commands that I should execute? I need to do this as I was informed by IBM that there seems to be... (1 Reply)
Discussion started by: chipahoys
1 Replies

8. AIX

Moving a Logical Volume from one Volume Group to Another

Does anyone have any simple methods for moving a current logical volume from one volume group to another? I do not wish to move the data from one physical volume to another. Basically, I want to "relink" the logical volume to exist in a different volume group. Any ideas? (2 Replies)
Discussion started by: krisw
2 Replies

9. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies
Login or Register to Ask a Question