1

Please make me sure did I wrong thing, or not.

I'm resizing the root partition which is under the LVM. This server is a VMWare's virtual machine with Oracle Linux. I'm using this article: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006371

I think I made a mistake. After 2nd part I booted the VM in a rescue mode, checked that size was the same. Then I recreated 3rd partition (root under LVM) and gave its type as 8e for LVM. I received a partition with the same start point and extended last point. I wrote changes of frisk.

Then I executed pvcreate /dev/sda3 command. It didn't allowed me to do this without -ff key.

So, I made a mistake and can't turn back. I didn't rebooted yet, I passed the system in rescue mode for a time.

Please give an advising is it possible to cancel this situation and make corrections?

Thank you.

1

You had everything right, up until pvcreate. It's not necessary to do this if you resized the existing disk partition instead of creating a new one. If you actually ran it with the force flag, then it destroyed all your data. If you did not, then you are safe.

The next step, of course, is to restart the system and lvextend -r your desired logical volume. (-r here automatically resizes the filesystem in the logical volume, so you don't have to do that separately as the outdated KB article indicates.)

  • Thanks for the answer. Yes, I executed pvcreate with the force flag. :( But good news is that I experimented with the not important VM. I'm trying lvextend -L +250G -r -t -v /dev/mapper/VolGroup-lv_root (the test run). As I see, pv wasn't extended: "fsadm: "ext4" filesystem found on "/dev/mapper/VolGroup-lv_root". fsadm: Skipping filesystem check for device "/dev/mapper/VolGroup-lv_root" as the filesystem is mounted on /. fsadm failed: 3. Extending logical volume lv_root to 291.68 GiB. Insufficient free space: 64000 extents needed, but only 0 available." Should I run pvextend? – Evgenii Iablokov Sep 4 '14 at 4:42
  • Oh, there is no pvextend command. pvscan shows this: PV /dev/sda2 VG VolGroup lvm2 [49.51 GiB / 0 free] Total: 1 [49.51 GiB] / in use: 1 [49.51 GiB] / in no VG: 0 [0 ] – Evgenii Iablokov Sep 4 '14 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.