How to expand three LVMs?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to expand three LVMs?
# 1  
Old 04-20-2016
How to expand three LVMs?

Hello All,

It goes like this.. I have increased the data hard drive of server by 100GB and rebooted the server.
I want to expand each of the LVM's by 30GB each .There are totally three LVMS to be expanded.Any help on complete commands that needs to be followed?Thanks

Last edited by gull05; 04-20-2016 at 03:38 AM.. Reason: Delete extraneous QUOTE tags.
# 2  
Old 04-20-2016
https://access.redhat.com/documentat...lv_extend.html

I googled this for you Smilie

But note this in the article:
Quote:
...
After you have extended the logical volume it is necessary to increase the file system size to match.

By default, most file system resizing tools will increase the size of the file system to be the size of the underlying logical volume so you do not need to worry about specifying the same size for each of the two commands.
...
# 3  
Old 04-20-2016
Hello Zaxxon ,

That was a very good document.Thanks.I am finding difficulty in locating where the free space is,

Code:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      5.9G  2.9G  2.7G  53% /
/dev/mapper/VolGroup00-LogVol03
                      3.9G  178M  3.6G   5% /tmp
/dev/mapper/VolGroup00-LogVol02
                      7.8G  7.5G     0 100% /var
/dev/mapper/VolGroup00-LogVol05
                      992M  125M  816M  14% /home
/dev/mapper/VolGroup00-LogVol04
                      7.8G  6.7G  667M  92% /opt
/dev/mapper/VolGroup00-LogVol06
                      496M   19M  452M   4% /var/crash
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 250M     0  250M   0% /dev/shm
/dev/mapper/vg_ftpdata-lv_distribution
                      148G  138G  2.0G  99% /var/ftp/b
/dev/mapper/vg_ftpdata-lv_incoming
                       50G   47G  316M 100% /var/ftp/c
/dev/mapper/vg_ftpdata-lv_mining
                       97G   90G  2.4G  98% /var/ftp/d

Code:
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               vg_ftpdata
  PV Size               300.00 GB / not usable 4.03 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              76798
  Free PE               427
  Allocated PE          76371
  PV UUID               tuJPoe-nHD6-R3C7-Mcss-njlT-yMei-e25Kde

  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               29.90 GB / not usable 24.06 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              956
  Free PE               44
  Allocated PE          912
  PV UUID               hmTbbr-3IaH-Pl8f-pw0Z-FArk-2wtW-UecJpM

Code:
]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        3916    31350847+  8e  Linux LVM

Disk /dev/sdb: 429.4 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       39162   314568733+  8e  Linux LVM

No idea on where the 100 GB has gone.Any help?

---------- Post updated at 08:50 PM ---------- Previous update was at 08:48 PM ----------

I need to ow find the 100 GB increased space in command line as there is no gparted and then extend the partition, extend lun .Please help me with the findings.Thanks
# 4  
Old 04-21-2016
Your PV shows:
Code:
  PV Name               /dev/sdb1
  VG Name               vg_ftpdata
  PV Size               300.00 GB / not usable 4.03 MB

where fdisk shows:
Code:
Disk /dev/sdb: 429.4 GB, 429496729600 bytes

So space is there, just yet not assigned to PV/Partition /dev/sdb1.
Try this:
Code:
pvresize /dev/sdb1

and check again. If it doesn't change, you can try setting the new size of the PV manually with the option --setphysicalvolumesize.

Last edited by zaxxon; 04-21-2016 at 03:36 AM..
# 5  
Old 04-21-2016
Hello Zaxxon,

Thank you again,

I tried
Code:
pvresize /dev/sdb1

This didn't change the value and hence i went ahead and executed the command manually,

Code:
# pvresize --setphysicalvolumesize 420G /dev/sdb1
  WARNING: /dev/sdb1: Overriding real size. You could lose data.
  Physical volume "/dev/sdb1" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized

This has very well changed the value ,
Code:
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               vg_ftpdata
  PV Size               420.00 GB / not usable 3.81 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              107519
  Free PE               31148
  Allocated PE          76371
  PV UUID               tuJPoe-nHD6-R3C7-Mcss-njlT-yMei-e25Kde

But fdisk remains unchanged,
Code:
fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        3916    31350847+  8e  Linux LVM

Disk /dev/sdb: 429.4 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       39162   314568733+  8e  Linux LVM

How can i increase the size in fdisk , so that fdisk shows the increase value.Kindly help.Thanks

---------- Post updated at 07:53 PM ---------- Previous update was at 07:46 PM ----------

After knowing the answer for the above, i will go ahead and increase the LVM size.ThanksSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

How to Expand a File System?

Hello everyone, I'm planning to expand a filesystem on solaris 10. This filesystem is managed by Solaris Volume Manager and Sun Cluster 3.2 /dev/md/APP-set/dsk/d120 50G 49G 1G 98% /MyFileSystem Can I do that by using this command: growfs -M ... (1 Reply)
Discussion started by: adilyos
1 Replies

2. AIX

Expand LV

Under the df command, one of my logical volumes, /dev/hd4, was showing 100% Used, so I added 2 logical partitions, but its still showing 100% used. Is there a separate command I need to execute to reallocate? (5 Replies)
Discussion started by: markper
5 Replies

3. AIX

Expand LUN

Hello all, I have the following env: * DS4300 storage SAN * AIX 5.3 Lpar (storage through vio server) * AIX 5.3 Server Some FS are too small do I'm setting up a process to increase the size of the FS. To expand the size of the FS I plan to do the following for the physical AIX server,... (1 Reply)
Discussion started by: petervg
1 Replies

4. UNIX for Dummies Questions & Answers

How to expand who command?

When I do the who command it doesn't show all my info: $w gscn 6:08PM up 4 days, 20:33, 177 users, load averages: 7.46, 3.78, 3.43 USER TTY FROM LOGIN@ IDLE WHAT gscn R1 pool-92-199-17-1 5:46PM - w gscn Like in the 'From' column.... (8 Replies)
Discussion started by: guitarscn
8 Replies

5. What is on Your Mind?

looking to expand skillset to the next level

Hi, This forum is great, I lurk here a lot and use a lot of what is posted here to help expand my skills. I have taken zero computer courses my entire life and for the most part and self taught. I am a Systems Administrator for a public school system that runs a 1:1 (6,000 Macbooks, 2,000+ Mac... (0 Replies)
Discussion started by: tlarkin
0 Replies

6. Shell Programming and Scripting

How to expand the same word?

Hi All, May I know how to expand the words? e.g: a aa aaa aaaa I have try to use for (i=0;i<5;i++) do c="a" echo -n $c done but the output is aaaaa. Is it need to use array?:confused: Thanks for your help! (5 Replies)
Discussion started by: natalie23
5 Replies

7. Shell Programming and Scripting

expand and uuencode...

I have a log file that looks fine when you view it in Unix but when I send it as an attachment to myself it looses its formatting... so I am using "expand" to replace the tabs with spaces and the format looks good. The code below works great but I was wondering if there was a way to do this without... (2 Replies)
Discussion started by: sethcoop
2 Replies

8. Shell Programming and Scripting

expand logic for > and <

Hi Input A12345678901234567890 < A12345678901234567890 AND C12345678901234567890 < D12345678901234567890 AND E12345678901234567890 > F12345678901234567890 If the length of the line at any point exceed more than 60 chars it should come to next line but it should not break a variable... (0 Replies)
Discussion started by: pbsrinivas
0 Replies

9. UNIX for Advanced & Expert Users

Terminal Expand

hi guys. i have written a script/program and i would strongly prefer if this script automatically expands the user's terminal whenever he or she starts the script. this is so the script/program can fit on the user's screeen without user having to manually drag and spread his screen. what... (2 Replies)
Discussion started by: Terrible
2 Replies
Login or Register to Ask a Question