Best Practice To Remove An ISCSI LVM From A System

Home » CentOS » Best Practice To Remove An ISCSI LVM From A System
CentOS 6 Comments

Hi,

I’d like to know what would be the best way to remove an iscsi lvm storage from a server. (removing all reference to that storage etc.)

The storage in question will be reset and reformated and used on a different server; so no LVM export is needed.

Do I have to do lvremove …, vgremove …, pvremove … and do an

iscsiadm -m node -T … -p … -u and

iscsiadm -m node -o delete -T … -p …

in order to achieve that?

Or is there some more simple way?

Thanks for any suggestion and best regards . G

6 thoughts on - Best Practice To Remove An ISCSI LVM From A System

  • Götz Reinicke – IT Koordinator wrote:
    from everywhere, maybe the iscsiadm commands, and then just unplug the thing? Why do you need to do *anything* with lvm?

    mark

  • My approach would be:

    * Disable all volume groups on the iSCSI LUN(s) with “vgchange -a n …”

    * Use iscsiadm to log out of the target and delete it from the database

    * Run vgscan to update the LVM cache

    HTH

  • umount any file systems, remove them from /etc/fstab, then vgremove the volume group should be sufficient to remove history of the LV’s and VG’s
    … I don’t believe its neccessary to pvremove the individual disks.

    then drop the target LUN on the storage server.

LEAVE A COMMENT