1

I have a HDD of size 120Gb, that has RHEL6 with 2 physical partitions sda1: /boot sda2: LVM managed Logical volumes VolGroup00

VolGroup00 contains following logical volumes /lv_root 36G /lv_opt 45G /lv_home 24G /lv_tmp 3G /lv_audit 3G /lv_log 3G

I had tried shrinking /opt by 4Gb using lvresize, resize2fs and mkfs commands and created new physical partition from the new free space. In this case, /opt was present as last logical volume (as printed by fdisk -l). Freeing space from /opt and creating new partition worked fine. sda3 was created at the end of hdd.

But I want to free space from /home which is present in the middle of logical volume group. When I try to create sda3 by freeing space from /home, all existing logical volumes gets corrupted and OS fails to boot.

Kindly suggest on how this could be achieved. Thanks in advance.

2
  • Please clarify your question, because you make very bad mix of physical disks, partitions, physical volumes and logical volumes. At least provide result of mount command May 29, 2015 at 8:04
  • apologies for my incomplete question. Please check the edited question May 29, 2015 at 9:31

1 Answer 1

0

With LVM you do not need to take care about harddisks. So sda? have nothing to do with logical volumes and free space in volume group. If you free diskspace resize2fs and lvreduce you free diskspace in volume group. And you can use this space to create with lvcreate new logical volume. Here is one good manual how to shrink logical volume

3
  • I think I still didnt clearly put my question. Apologies again for that. I do not want to create logical volume but a physical partition. I want to free space from logical volume /home that is present in sda2 physical partition and create new physical partition sda3. Since /home is present in middle of logical volumes on VolGroup00 that is present on partition sda2, I am not able to create new partition. It is leading to crashing the system. May 29, 2015 at 10:20
  • Do you have special reason for creating partition instead of logical volume. In all the cases i know you can use LV as normal disk partition. And again: start thinking in sense of LVM or physical hardisks and partitions. Not both of them May 29, 2015 at 10:24
  • Yes. I wanted a separate partition for rescue and upgrades purpose. And logical volumes will not be available during boot time. Kindly ignore the physical harddisk. I must have misplaced and thats the cause of confusion. The real issue is as I mentioned before, our current version of OS has sda1 as ext3 and sda2 as LVM. I want to create sda3 as ext3 fs by making free space from shrinking /home present on sda2. May 29, 2015 at 10:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .