Skip to content

Instantly share code, notes, and snippets.

@jbenninghoff
Last active February 10, 2023 23:16
Show Gist options
  • Save jbenninghoff/ef5e5ed8905b534367c54016291faa4f to your computer and use it in GitHub Desktop.
Save jbenninghoff/ef5e5ed8905b534367c54016291faa4f to your computer and use it in GitHub Desktop.
Linux LVM modifications for MapR
#!/bin/bash
umount /home
lsblk -P /dev/sdb | grep -o MOUNTPOINT.*
lvremove -f vg_$(hostname -s|tr A-Z a-z)/lv_home
parted /dev/sdb -- rm 1
grep home /etc/fstab
sed -i.bak '/home/d' /etc/fstab
vgreduce -f vg_$(hostname -s|tr A-Z a-z) --removemissing
vgreduce -f vg_${HOSTNAME,,} --removemissing
pvs
lsblk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment