Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
First of all, how did your new disk end up as /dev/sda? How come none of your existing drives show up as /dev/sda? And if you created a single partition on the new drive, why did it end up as /dev/sda4? It seems a bit odd.
Anyway, you've added a new Physical Volume to the Volume Group, and extended the Logical Volume. This means you've extended the device (in this case, the LV) on which the file system resides, but not the file system itself.
Do NOT run any version of mkfs against a partition or device that's part of an LVM Volume Group! It could destroy the entire VG and any Logical Volumes inside it.
Instead, you should run resize2fs to update the file system structures to reflect the new device size. For ext2/3/4, you can do this while the file system is mounted.
hpacucli is a command line interface used to configure RAID arrays on HP Smart controllers. It has nothing to do with LVM or file systems.
(By the way, are you sure you didn't want to extend the RAID array rather than the LVM drive?)
Let me share the steps mentioned in the Change in which I was asked to jump in at Step 5 given below. So, I did not perform all the steps. I was handed over the case when my colleague had already completed the first 4 steps given below. i have indicated this by inserting this line: I STARTED WORKING ON THIS ACTIVITY FROM HERE:
Code:
Step 1: Ask the onsite person to replace physicaldrive 1I:1:4 (port 1I:box 1:bay 4,146 GB)
=> hpacucli ctrl all show config
=> hpacucli controller slot=0 logicaldrive all show
(will show the drive status e.g. OK/Rebuilding/Ready for rebuild)
Once drive rebuilding is complete.
Step 2: Ask the onsite person to replace physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 146 GB)
=> hpacucli ctrl all show config
=> hpacucli controller slot=0 logicaldrive all show
(will show the drive status e.g. OK/Rebuilding/Ready for rebuild)
Once drive rebuilding is complete.
Step 3 ask the onsite person to replace physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 146 GB)
=> hpacucli ctrl all show config
=> hpacucli controller slot=0 logicaldrive all show
(will show the drive status e.g. OK/Rebuilding/Ready for rebuild)
Once drive rebuild complete.
Step 4: ask the onsite person to replace physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 146 GB)
=> hpacucli ctrl all show config
=> hpacucli controller slot=0 logicaldrive all show
(will show the drive status e.g. OK/Rebuilding/Ready for rebuild)
Once drive rebuilding is complete.
====================================
Step 5
once all drive replace check drive status
=> hpacucli ctrl all show config
expand logical drive size.
=> hpacucli ctrl slot=0 logicaldrive 1 modify size=max
=> hpacucli ctrl slot=0 logicaldrive 2 modify size=max
=> hpacucli ctrl all show config
check disk size in fdisk
=> fdisk -l (if not showing the new size reboot the server)
I STARTED WORKING ON THIS ACTIVITY FROM HERE:
reboot the server(if not showing the any extra unallocated/free space)
=> shutdown -r now
once the server up after reboot create new partition from unpartition/free space
=> fdisk /dev/<Disk>
Note: The <Disk> should be "sda" here. Run "fdisk -l" OR "cat /proc/partitions" commands to verify.
=> In the above step make sure that you specify a Linux LVM Type for the new partition and it has to be a Primary Partition.
=> pvresize /dev/sdb
=> shutdown -r now
=> run "pvcreate <parition>" on the new partition created above.
=> vgextend VolGroup01 <New Partition>
=> vgdisplay
OR vgscan
=> pvdisplay
OR pvscan
(We may not need to allocate all of the free space. So, let's allocate 250G as we did in the original case.)
=> lvextend -L +250G /dev/mapper/VolGroup01-app001
=> resize2fs /dev/mapper/VolGroup01
Verify that the total disk space has grown now:
=> df -h /app001
I understand now. /dev/sda is a logical drive (one of two, according to the previous post) presented to the OS by the RAID controller.
You've just replaced all the drives in the array with larger drives, one by one, and told the RAID controller to extend the logical RAID devices. As a result, the /dev/sda device has grown, and you've opted to use this space to create a new partition, /dev/sda4 (as opposed to extending an existing partition).
A new LVM Physical Volume was created in this new partition, and the Physical Volume was used to extend an existing Volume Group. A Logical Volume was then extended to take advantage of the newly available space in the Volume Group.
It all sounds good. You just need to extend the file system with resize2fs and you'll be done.
Just out of curiosity: As it seems the RAID array contains two logical devices, does the second device appear as /dev/sdb? And did the second "modify" command issued in hpacucli cause it to grow in size, or did the first device get all the new disk space?
Just out of curiosity: As it seems the RAID array contains two logical devices, does the second device appear as /dev/sdb? And did the second "modify" command issued in hpacucli cause it to grow in size, or did the first device get all the new disk space?
You are right! I saw /dev/sdb and I was asked just to run "pvresize" on that one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.