LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-14-2012, 09:45 AM   #1
pipopopo822
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Rep: Reputation: 0
Hardware RAID expansion and LVM


Hi All, this is my first post so sorry if its messy.

I am running into some problems when trying to expand my LVM
The first part : extending the RAID 5 was successfull as far as I can see. (/dev/cciss/c0d0 8TB total)

I had a configuration of 3 disks of 2TB in RAID 5 and 1 2TB disk in spare.
I expanded this with 2 more disks of 2TB.

Some hardware details :
HP smart array P410i controller

Now my problem is finding the right way to expand my LVM volume :

The result of an fdisk -l :

WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d0'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/cciss/c0d0: 8001.5 GB, 8001461248000 bytes
255 heads, 63 sectors/track, 972788 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 1 267350 2147483647+ ee GPT

Disk /dev/dm-0: 3903.4 GB, 3903403851776 bytes
255 heads, 63 sectors/track, 474561 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 16.4 GB, 16374562816 bytes
255 heads, 63 sectors/track, 1990 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 8996 MB, 8996782080 bytes
255 heads, 63 sectors/track, 1093 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table

Disk /dev/dm-3: 11.6 GB, 11588861952 bytes
255 heads, 63 sectors/track, 1408 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-3 doesn't contain a valid partition table

Disk /dev/dm-4: 398 MB, 398458880 bytes
255 heads, 63 sectors/track, 48 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-4 doesn't contain a valid partition table

Disk /dev/dm-5: 59.5 GB, 59500396544 bytes
255 heads, 63 sectors/track, 7233 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-5 doesn't contain a valid partition table



Vgdisplay :

--- Volume group ---
VG Name bacula
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 22
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 6
Open LV 6
Max PV 0
Cur PV 1
Act PV 1
VG Size 3,64 TiB
PE Size 4,00 MiB
Total PE 953787
Alloc PE / Size 953737 / 3,64 TiB
Free PE / Size 50 / 200,00 MiB
VG UUID hBqSQT-rkx0-o7nV-XEE9-4FDs-pWq2-xoL81j

pvdisplay :

--- Physical volume ---
PV Name /dev/block/104:3
VG Name bacula
PV Size 3,64 TiB / not usable 781,00 KiB
Allocatable yes
PE Size 4,00 MiB
Total PE 953787
Free PE 50
Allocated PE 953737
PV UUID Vfv4OY-T4JO-1XQZ-tBfe-pAxH-ZXYq-q9054N

pvscan :

PV /dev/block/104:3 VG bacula lvm2 [3,64 TiB / 200,00 MiB free]
Total: 1 [3,64 TiB] / in use: 1 [3,64 TiB] / in no VG: 0 [0 ]

lvdisplay :


--- Logical volume ---
LV Name /dev/bacula/root
VG Name bacula
LV UUID p8kF4B-o8ax-zcyH-0JvS-jFOI-PV0f-l7biXf
LV Write Access read/write
LV Status available
# open 1
LV Size 3,55 TiB
Current LE 930644
Segments 4
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0

--- Logical volume ---
LV Name /dev/bacula/usr
VG Name bacula
LV UUID zUZhp8-b0gW-b01z-AuBb-3hFZ-dtvL-qEQjef
LV Write Access read/write
LV Status available
# open 1
LV Size 8,38 GiB
Current LE 2145
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2

--- Logical volume ---
LV Name /dev/bacula/var
VG Name bacula
LV UUID iAjmsj-uS7O-Nj3H-t73d-3BS1-Vb7n-GZlKqy
LV Write Access read/write
LV Status available
# open 1
LV Size 10,79 GiB
Current LE 2763
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:3

--- Logical volume ---
LV Name /dev/bacula/swap_1
VG Name bacula
LV UUID Z3WsNj-1f8Z-AVxr-4qee-MJxr-Yfr6-EvyokB
LV Write Access read/write
LV Status available
# open 1
LV Size 15,25 GiB
Current LE 3904
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1

--- Logical volume ---
LV Name /dev/bacula/tmp
VG Name bacula
LV UUID bvXrgX-ODVQ-dqpk-2lmQ-fIuP-fbSG-05d7C9
LV Write Access read/write
LV Status available
# open 1
LV Size 380,00 MiB
Current LE 95
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4

--- Logical volume ---
LV Name /dev/bacula/home
VG Name bacula
LV UUID 3KpAuy-TcEM-59UL-Bebp-CmmN-EuIw-jaARFn
LV Write Access read/write
LV Status available
# open 1
LV Size 55,41 GiB
Current LE 14186
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:5


Now what should I do to expand my lvm volume ?

Last edited by pipopopo822; 06-14-2012 at 09:50 AM.
 
Old 06-14-2012, 10:16 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
fdisk confirms that the RAID volume has been successfully expanded, as it reports the size to be 8001.5 Gb.

Note that it also says that fdisk should not be used on this device, as it has a GUID partition table. fdisk only supports the older MBR partition label type, so you must use a partitioning tool with GPT support, like parted.

There are (at least) two different ways to add the unused disk space to the LVM volume group:
  1. Extend the partition containing the physical volume with parted, then run pvresize to extend the physical volume
  2. Create a new partition with parted, run pvcreate to create a new physical volume in the new partition and finally add the new physical volume to the volume group with vgextend
 
Old 06-15-2012, 04:38 AM   #3
pipopopo822
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your reply Ser Olmy

It worked like a charm.

Solution I used :
Create a new partition with parted, run pvcreate to create a new physical volume in the new partition and finally add the new physical volume to the volume group with vgextend
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware RAID expansion and LVM dzollinger Linux - Server 8 11-26-2008 12:13 AM
Should I use LVM on top of 3ware Hardware RAID? bfoddy Linux - Hardware 2 09-22-2007 04:06 PM
hardware raid 5, online capacity expansion, and parted hondaman Linux - Software 0 07-05-2006 12:00 PM
Hardware Raid Setup Question - LVM? funbags Linux - Hardware 0 11-13-2005 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:24 AM.

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