How to increase the storage to Linux VM without rebooting the OS#

  • Clear messages
dmesg -c
  • Go to the appropriate Vcenter and edit the VM to have the additional disk drive
  • Run the following on the linux VM
for i in /sys/class/scsi_host/host*; do echo "- - -" > $i/scan; done
  • View information about physical drives that are used by LVM
pvs
  • Check if new disk can be seen by OS by running "dmesg" again. Type 'ls /dev/sd' and double tab - should see the next disk that was not in the previous "pvs"command - run the below commands with that new letter
ls /dev/sd[x]
pvcreate /dev/sd[x]
  • Check if you can see the new drive and extend the Volume Group
pvs
vgs
vgextend [VolGroup] /dev/sd[x]
vgextend centos /dev/sd[x] (For Centos 7)
vgs
lvs #Use this to display which LV group is being used for storage if LV group not specified already 
  • Extend the disk and check it has been extended
pvdisplay
lvextend -l +100%FREE /dev/[VolGroup]/[lv_root]
lvs
  • Check what type of filesystem is being used
df -T
  • If ext4 filesystem resize the disk with
resize2fs /dev/[VolGroup]/[lv_root]
  • If xfs filesystem resize the disk with
xfs_growfs /dev/[VolGroup]/[lv_root] 
mount -o remount,inode64 /mnt/nfs # remount the directory to work around the bug in xfs 

Keywords: VMware, extending storage, Linux, without reboot

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 28-Nov-2018 12:44 by Hyve Support
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 71

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1