Last active
February 10, 2023 23:16
-
-
Save jbenninghoff/ef5e5ed8905b534367c54016291faa4f to your computer and use it in GitHub Desktop.
Linux LVM modifications for MapR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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