Reset Search
 

 

Article

Expanding disk space for Netsight Apppliance using expandLVM.sh

« Go Back

Information

 
TitleExpanding disk space for Netsight Apppliance using expandLVM.sh
Objective
To expand the hard drive space of Netsight appliance for a virtual machine that has no allocated more hard drive space.
Environment
Netsight Appliance
Procedure
First, according to your VM platform, add a new hard disk drive to the VM. The script used in the next section will try and detect an new Hard Disk Drive, if you expand the existing space on the current hard disk the next step will not wok.

Take a working snapshot of the VM, in case the solution fails.

Second, for the underyling linux shell to utilize this disk space, the script must be used.

1. SSH to Netsight Appliance
2.  cd /root/scripts
3.  ./expandLVM.sh

 
Additional notes
Help files for this are available in the Netsight 6.3 platform and above under the topic, Adding Disk Space to a Virtual Appliance.

Here is the CLI output after the VM has been expanded.

*******************************************************************************

root@nsvmwaretest:~$ df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/systemvg-root  140G   11G  123G   8% /
udev                       3.9G  4.0K  3.9G   1% /dev
tmpfs                      799M  268K  799M   1% /run
none                       5.0M     0  5.0M   0% /run/lock
none                       3.9G     0  3.9G   0% /run/shm
/dev/sda1                  228M   49M  167M  23% /boot
root@nsvmwaretest:~$ df -h
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/systemvg-root  140G   11G  123G   8% /
udev                       3.9G  4.0K  3.9G   1% /dev
tmpfs                      799M  268K  799M   1% /run
none                       5.0M     0  5.0M   0% /run/lock
none                       3.9G     0  3.9G   0% /run/shm
/dev/sda1                  228M   49M  167M  23% /boot
root@nsvmwaretest:~$ pwd

/root
root@nsvmwaretest:~$ cd scripts/
root@nsvmwaretest:~/scripts$ ls
connTest.php*       expandLVM.shnaccapturewebserviceclient.php*
echoTagConfig.phpisEarlier*     nachelp*     wsCall.php*
expandLVM.log       managelogs*    nacstatus*
root@nsvmwaretest:~/scripts$ ./expandLVM.sh 
WARNING:

This script will attempt to locate a new virtual drive and add it to 
the current LVM configuration.  This script will format the new drive,
and should only be used in accordance with official instructions 
to increase the size of the hard drive.

Would you like to proceed? [n]: y

Starting partition resizing.  Start size is 148GB
Logging to expandLVM.log
Scanning for new partition sdc
Found sdc, mapping partition
Adding to volume group
Adding to logical volume
Formating new partition
Resize completed successfully.  New size is 164GB

root@nsvmwaretest:~/scripts$ df -h

Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/systemvg-root  156G   11G  138G   7% /
udev                       3.9G  4.0K  3.9G   1% /dev
tmpfs                      799M  276K  799M   1% /run
none                       5.0M     0  5.0M   0% /run/lock
none                       3.9G     0  3.9G   0% /run/shm
/dev/sda1                  228M   49M  167M  23% /boot
root@nsvmwaretest:~/scripts$ 


 

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255