LVM- extending PV


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat LVM- extending PV
# 1  
Old 09-07-2012
LVM- extending PV

Hi All,
I have one VG on single PV /dev/sda3 with two LV
Physically after /dev/sda3 i have 40G unallocated
I want to extend /dev/sda3 + 40G and extend its VG, then extend last LV in VG to take new free space
What is correct procedure?
// I cannot create second PV after /dev/sda3 because of patition number limit

Thanks and regards
P.
# 2  
Old 09-07-2012
You could backup those 2 LVs on /dev/sda3, delete them from the VG, recreate the partition with the new size.
Or create it as an extended partition and use logical partitions. So you could add logical partitions later, if you don't want to use up the whole 40G right now.
This User Gave Thanks to zaxxon For This Post:
# 3  
Old 09-07-2012
Thank you zaxxon
By backup you mean LVM backup or data backup?(for both, recreate or creating extended)?
# 4  
Old 09-07-2012
Yes, for both you'll need a backup as you would destroy the file systems in the LVs.
If you are unsure, do a backup of all your stuff, just in case. Better safe than sorry Smilie

I don't know which tools you have for backup. Having a full backup at hand won't harm.

When I got it right, your layout is:
Code:
FS1 ----- LV1 ----- \
                     >----- VG ----- PV ------ Partition /dev/sda3
FS2 ----- LV2 ----- /

I would backup data in FS1 and FS2, umount them, delete the FSes and LVs, delete the VG (as I understood there is only those 2 FSes so nothing else will be harmed), delete the PV, and delete the partition underneath it.
Then recreate as you like it (see my previous post) and then recreate all levels of LVM objects on that new partition.

If you dislike to do it on command line, there are graphical tools/frontends like gparted etc.
# 5  
Old 09-07-2012
Nothing more in this thread.
Thank you again zaxxon

OT: Good to know that LVM is flexible but not fullproof. I do not know what I was thinking when creating 4 prim. part. and leaving unallocated gaps.
# 6  
Old 09-12-2012
You can't add unallocated space in Physical Volume ....you can create new extended partition or logical partition of that unallocated space and extend it in VG and then LV ...otherwise you have option whatever ZAXXON said ...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Extending swap space

I've to install Oracle binaries (I'm oracle DBA) and for that I've extend swap space in my home computer. My situation is like this. # parted -s /dev/sda print free Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 38.7GB Sector size (logical/physical): 512B/512B Partition Table: msdos ... (8 Replies)
Discussion started by: Mukul Sharma
8 Replies

2. Red Hat

Extending swap space

I've to install Oracle binaries (I'm oracle DBA) and for that I've extend swap space in my home computer. My situation is like this. # parted -s /dev/sda print free Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 38.7GB Sector size (logical/physical): 512B/512B Partition Table: msdos ... (1 Reply)
Discussion started by: Mukul Sharma
1 Replies

3. HP-UX

Extending file system in HP-UX

Hi Guys, Hope everyone is doing great. We've few servers on HP-UX. I'm not sure of extending file systems in HP-UX. Please help me. It could be helpful If you provide the commmand basing on the details below. Thanks in Advance. # hostname ******* # date Sun Sep 7 14:39:59 EDT 2014 #... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

4. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

5. AIX

Extending database filesystem

Ok, I'm a newbie to AIX so I just want to make sure my thinking is correct with regards to this issue. Any insight you guys could give would be appreciated. A main question I have is should I shutdown the database to extend this LV? The filesystem the dba wants to extend is /dev/fslv83 ... (3 Replies)
Discussion started by: Steelysteel
3 Replies

6. HP-UX

How to reduce LVM to create another LVM

Hi, I'm new to HP-UX. I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3 Thanks (4 Replies)
Discussion started by: lamoul
4 Replies

7. AIX

Extending filesystems

Hi to all i want to increase the /usr size. but, it is mirrored on hdisk0 and hdisk1. i know that chfs will work, but i am not confident about mirroring. can anyone tell me the procedure. thanks (2 Replies)
Discussion started by: honeym210
2 Replies

8. Solaris

extending /var in solaris 10

Hi all, i need to extend /var file system on my solaris 10 box /var is part of rootdg current size 2GB Required size 6GB layout mirror veritas 4.1 solaris 5.10 pls let me know the steps and the procedure to follow. regards Ajay S (2 Replies)
Discussion started by: ajays
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

10. Programming

Help in extending netfilter

Hi everybody, I have to write a module for matching in netfilter , extending the netfilter but I'm facing some problems can somebody guide me in that. I know that I need to write matching module working in kernel space and a program in userspace. I went through the HOWTO on netfilter-hacking but... (0 Replies)
Discussion started by: Trusted Penguin
0 Replies
Login or Register to Ask a Question