LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 12-16-2008, 03:22 PM   #1
cswebb
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Extending a logical volume in a reconfigured RAID 5 array set


I have recently reconfigured a RAID 5 array on a Dell 2850 to add an additional disk (from 3 to 4 disks). All worked accordingly through the reconfigure and now parted displays the additional space:

Disk geometry for /dev/sda: 0.000-858240.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot
2 101.975 204899.348 primary lvm
3 204899.348 227428.000 primary lvm
4 227428.000 572158.740 extended
5 227428.031 572158.740 logical lvm

If I want to add the additional space to the "extended" partition. I can do this with parted (filesystem using this partion is unmounted):

# parted /dev/sda "resize 4 227428.000 858239.000"
Information: Don't forget to update /etc/fstab, if necessary.

# parted /dev/sda print
Disk geometry for /dev/sda: 0.000-858240.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot
2 101.975 204899.348 primary lvm
3 204899.348 227428.000 primary lvm
4 227428.000 858238.110 extended
5 227428.031 572158.740 logical lvm

pvdisplay shows the following:
--- Physical volume ---
PV Name /dev/sda5
VG Name VolGroup003
PV Size 336.65 GB / not usable 26.52 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 10772
Free PE 1
Allocated PE 10771
PV UUID 03Y1mj-0TGl-0RmQ-tCrU-1kIy-d99M-7qRCu0

--- Physical volume ---
PV Name /dev/sda3
VG Name VolGroup001
PV Size 22.00 GB / not usable 668.00 KB
Allocatable yes
PE Size (KByte) 32768
Total PE 704
Free PE 64
Allocated PE 640
PV UUID Zj2zv9-78cK-thi9-uLYg-kU0C-9uRs-O2lXrc

--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup002
PV Size 200.00 GB / not usable 29.37 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 6399
Free PE 1
Allocated PE 6398
PV UUID wTSVUU-X4W4-6I13-Nj60-4hnk-giJB-9fKwTc


Did I miss something? Can this be done on the fly with parted or fdisk?

If so, I can't get the physical volume to take on the additional space. With pvresize I get this

#pvresize /dev/sda5
Physical volume "/dev/sda5" changed
1 physical volume(s) resized / 0 physical volume(s) not resized

...and nothing has changed in pvdisplay. I got the pvdisplay to correctly display the added size previously (forgot what I did...maybe the reboot helped then), but the lvextend command kept giving me ioctl errors when trying to increase the size of the lv. So I reduced the size back to what it was previously. Pvdisplay and vgdisplay showed expected output. When I tried it again nothing...again maybe the reboot. Even with that I could not get parted to correctly display the logical volume under the extended partition to report correctly. How is that done?


Thanks.
 
Old 12-17-2008, 08:45 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,

If I understood correctly, you have resized a pv but you can't see the changes.

What I do is run resize2fs after extending an lv. Maybe you need to do the same.

Here is an example form my notes:

# lvextend -L 60G /dev/vg90/lv_crypt

* check file system integrity. Might have to run it twice
# e2fsck -f /dev/mapper/testcrypt; e2fsck -f /dev/mapper/testcrypt

* resize the filesystem
# resize2fs -p /dev/mapper/testcrypt
 
Old 12-18-2008, 06:27 PM   #3
cswebb
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the response. The problem I'm having is probably not knowing the complete sequence/order of actions to take. What I'm seeing is that after growing the array with the hardware utility, parted and fdisk both show an increase in available space. However, the partitions I've created (pv) are still showing the previous configuration. For instance, I have 4 partitions, 1 for the boot partition, and three others. The last of the "three others" lies underneath the "extended" partition as a logical volume. I can use parted to "resize" the extended partition or "MINOR" (parted speak) and it displays correctly within parted and/or fdisk:

Disk geometry for /dev/sda: 0.000-858240.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot
2 101.975 204899.348 primary lvm
3 204899.348 227428.000 primary lvm
4 227428.000 858239.000 extended
5 227428.031 572158.740 logical lvm

When I attempt to see the change with pvdisplay I see nothing new. So I run the pvresize /dev/sda5 (which is supposed to expand to new size)....and nothing.

So I cannot lvextend because I cannot get /dev/sda5 to resize...lvextend doesn't see any available space or extents to expand upon. What am I missing?
 
Old 12-19-2008, 02:16 AM   #4
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
To be honest I have never expanded a hardware RAID and then tried to expand a PV. If the fdisk shows there is more space, why not simply create a new PV and add it to the VG you want to expand?

I might be missing something but it seems easier to me.

Please make a backup and check it before you do any more! Too many disasters in my life time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LVM - Extending logical volume - Insufficient free space deim Linux - Newbie 0 04-07-2007 09:47 PM
RAID Array Set-up chowdah45416 Linux - Hardware 3 11-29-2006 12:44 AM
lvm extending logical partation Ammad Linux - General 0 09-25-2005 04:39 AM
Mount a raid array with SGID bit set, howto? anand_kt Linux - General 4 04-01-2005 01:30 AM
difference between hardware raid and logical volume manager pve Linux - General 6 12-28-2004 10:37 PM


All times are GMT -5. The time now is 02:00 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration