Last active
March 5, 2021 23:23
-
-
Save tjhartmann/6175104 to your computer and use it in GitHub Desktop.
Useful Linux storage commands
This file contains hidden or 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
# concise logical disk enumeration | |
MegaCli -LDInfo -Lall -aAll | egrep 'Size|State|Number|Adapter|Virtual' | |
# concise physical disks enumeration | |
MegaCli -PDList -aALL | egrep 'Enclosure|Raw Size|Slot Number|Device Id|Firmware state|Inquiry|Adapter' |
This file contains hidden or 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
# FC disks | |
echo "1" > /sys/class/fc_host/host#/issue_lip | |
# SCSI disks | |
echo "- - -" > /sys/class/scsi_host/host#/scan | |
echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan | |
# rescan partition table (i.e. after running fdisk but w/o rebooting) | |
partprobe -s | |
# Extend Volume Group - 2nd argument must be pv | |
vgextend VolGroup00 /dev/sda3 | |
# Extend LVM logical volume to use all space on VG | |
lvextend -l +100%FREE /dev/vg0/lv_root | |
# ext2/3 resize uses the device | |
resize2fs /dev/vg0/lv_root | |
# xfs resize uses the mount point | |
xfs_growfs mount-point |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment