ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Linux Practicum: Removing an LVM Configuration on CentOS 7

    IT Discussion
    linux sam linux administration lvm storage
    1
    1
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Following our practicum example to create an LVM volume with XFS on CentOS 7, we will now see how to remove it.

      First we need to edit /etc/fstab to remove the entry that we put there. This is generally easiest if done manually.

      Then...

      # umount /var/log2
      # lvremove vg_logs/lv_logs
      Do you really want to remove active logical volume lv_logs? [y/n]: y
        Logical volume "lv_logs" successfully removed
      # vgremove vg_logs
        Volume group "vg_logs" successfully removed
      # pvremove /dev/vdb
        Labels on physical volume "/dev/vdb" successfully wiped
      # pvs
        PV         VG                    Fmt  Attr PSize  PFree 
        /dev/vda2  centos_lab-lnx-centos lvm2 a--  14.41g 40.00m
      

      Quick and easy.

      Part of a series on Linux Systems Administration by Scott Alan Miller

      1 Reply Last reply Reply Quote 3
      • scottalanmillerS scottalanmiller referenced this topic on
      • 1 / 1
      • First post
        Last post