Resize the CentOS LVM inside VM from a secondary virtual hard disk

Requirement:
Airwave installed on a VM, with a secondary virtual hard disk.
we have a KB "Resizing the centOS LVM inside VM", is only useful if we have one hard disk for that VM instance.
https://arubanetworkskb.secure.force.com/pkb/articles/FAQ/Resizing-CentOS-LVM-inside-VM
However,  This KB will be helpful in the scenario's where VM Administrators has to create a secondary virtual Hard disk, instead of increasing the disk space for current hard disk (could be for any reason for example: he cannot increase the disk space for the same disk as the pool that provides space to that disk has no space etc..).
Solution:
In this case, when we have added a secondary virtual hard disk, when we do # fdisk -l, we will see the secondary disk as /dev/sdb  as shown below:
[root@localhost mercury]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000650f3
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        5222    41839616   8e  Linux LVM
Disk /dev/sdb: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup00-LogVol01: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup00-LogVol00: 38.5 GB, 38520487936 bytes
255 heads, 63 sectors/track, 4683 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
And this is the # df -h, command output, before the LVM extension:
[root@localhost mercury]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       36G   11G   23G  32% /
tmpfs                 3.7G     0  3.7G   0% /dev/shm
/dev/sda1              97M   37M   56M  40% /boot
We need to extend the sdb disk space to VG group to combine to use the disk space as shown below in the configuration:
Configuration:
1. First, we need to create a partition in /dev/sdb
[root@localhost mercury]# fdisk /dev/sdb
# n {new partition}
# p {primary partition}
# 1 {select partition number, by default 3 is the next available}
# use the default cylinder values for First and last
# t {select partition id we just made (1)}
# 8e {Linux LVM partition}
# p {print. the new device should be described as Linux LVM}
# w {write to memory}
2. We need pv reate /dev/sdb1:
[root@localhost mercury]# pvcreate /dev/sdb1
3. Execute the command to extend the VG to sdb1:
[root@localhost mercury]# vgextend VolGroup00 /dev/sdb1
4. Enter the command to extend the LV to sdb1:
[root@localhost mercury]# lvextend /dev/VolGroup00/LogVol00 /dev/sdb1
5. Resize the VG:
[root@localhost mercury]# resize2fs /dev/VolGroup00/LogVol00
Done.
Verification
Now look at the # df -h, output, which will be different:
[root@localhost mercury]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       52G   11G   38G  22% /
tmpfs                 3.7G     0  3.7G   0% /dev/shm
/dev/sda1              97M   37M   56M  40% /boot

Hi Eric,
"My first thought was to do is reduce the drive, which I know cannot be done. I then thought to convert the disk but it consumes the whole of the dynamic potential, which somehow is a maximum of 2TB."
Yes , we can not get the disk space less  than 2TB .
As a workaround , you can try the following steps :
1) defrag the volume  in VM , after that shutdown the VM
2) use "edit disk" in hyper-v manager to compact the VHD file
3) start that VM then shrink the volume that the disk space is larger than the VM needs in disk manager
This may limits the expansion accordingly .
Hope it helps
Best Regards
Elton JI
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.

Similar Messages

  • I'm not able to copy and paste files from my mac to hard disk and usb. I have tried dragging the items to those devices but it won't work. I also have tried copying and pasting those files onto those devices but that doesn't work too. Can any one help?

    I'm not able to copy and paste files from my mac to hard disk and usb. I have tried dragging the items I want to copy to those devices but it won't work. I also have tried copying and pasting those files onto those devices too but that doesn't work too. Can any one help?

    Hi BobRz
    Thanks for you suggestion but it didn't work - are there other ways for solving this problem? Or is it because my files that I want to copy and paste onto my hard disk etc are too big? (However there is space on my hard disk and it works on a PC)

  • HT4889 Migration Assistant to update my new Mountain Lion iMac from an external USB hard disk drive, it is constantly saying that it is "looking for other computers". It doesn't find the external drive. Why is it looking for other computers?

    I'm trying to use Migration Assistant to update my new Mountain Lion iMac from an external USB hard disk drive. I told it to look for a drive, yet it is constantly saying that it is "looking for other computers". It doesn't find the external drive ... it just endlessly looks for other computers. Why is it looking for other computers at all, when I told it not to?

    Wow, the wording in Migration Assistant is misleading. I've never used it before, so I thought I would try to copy my files from the external drive ... my old iMac died, but I managed to get everything I need off it, using the 'cp' command in single-user mode. So I guess I'll just have to manually copy the files from the external drive to the new machine. I was hoping that Migration Assistant might help somehow, but obviously not.
    Thanks for the quick reply!

  • Error (23317) The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks. Recommended Action The operation Change properties of virtual machine is not permitted on a virtual machine that h

    Experts !
    Error (23317)
    The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks.
    Recommended Action
    The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks.
    Is this limitation by design? If we have a shared VHDX between two VMs, then I am not able to change the VM properties from SCVMM.
    SCVMM 2012 R2 with Windows Server 2012 R2 Hyper-V.
    Appreciate any help !
    Optimism is the faith that leads to achievement. Nothing can be done without hope and confidence.
    InsideVirtualization.com

    Hello,
    that is a VMM issue.
    If you did not deploy your virtual cluster from a VMM service template, VMM doesn't recognize the configuration.
    Until MS got it fixed, you could use the workaround from system center central:
    http://www.systemcentercentral.com/tag/shared-vhdx/
    This posting is provided >AS IS< with no warranties.

  • A problem was encountered opening a virtual hard disk in the chain of differencing disks -- when try to import vm in hyper v

    Hi All,
    I am new to the hyper V stuff. I have managed to install hyper-V on Windows 8. Now I am trying to import VM which got three foleders and one file batch file
    Snapshots
    Virtual Hard Disks
    Virtual Machines
    VM-Pre-Import 10961A-LON-CL1 (Batch file)
    but I am getting this error
    Please help me.
    Thanks

    Hi Tom,
    Thanks for giving me direction. I am student and totally new to this hyper-v, so bit slow in understanding right now
    This is the location of the files when i had extracted from rar file
     Directory of C:\Program Files\Microsoft Learning\10961\Drives\10961A-LON-CL1
    06/13/2014  07:54 AM    <DIR>          .
    06/13/2014  07:54 AM    <DIR>          ..
    03/16/2013  12:05 AM    <DIR>          Snapshots
    06/13/2014  07:25 AM    <DIR>          Virtual Hard Disks
    06/13/2014  06:25 AM    <DIR>          Virtual Machines
    03/15/2013  07:38 PM               135 VM-Pre-Import-10961A-LON-CL1.bat
                   1 File(s)            135 bytes
                   5 Dir(s)  477,346,160,640 bytes free
    when I opened the bat file -- location of the file
    SET SUBDIR=%~dp0
    mklink "%SUBDIR%Virtual Hard Disks\Base12B-W8.vhd" "C:\Program Files\Microsoft Learning\Base\Base12B-W8.vhd"
    pause
    and then i have changed the dir path to
    SET SUBDIR=%~dp0
    mklink "%SUBDIR%Virtual Hard Disks\Base12B-W8.vhd" "C:\Program Files\Microsoft Learning\10961\Drives\10961A-LON-CLI\Base12B-W8.vhd"
    pause
    When I tried to run the batch file then I got following message -- Can't creat a file when that file already exists.
    Please advise

  • SCVMM 2012 RC - Unable to remove a VHD in the library because it has a dependency (Virtual Hard Disk deployment configuration)

    When attempting to delete a VHD in the library, I am getting the below error message. Any thoughts on where I might look for the dependency "Virtual Hard Disk deployment configuration"?
    Exact error message:
    The library object (os_disk) cannot be removed because following objects are dependent on it:
    Virtual Hard Disk deployment configuration
    Please ensure that no objects are dependent on this library object and try the operation again.
    ID: 848

    On the final version (tested in 2012 SP1)
    Suggest this instead of hacking around in the database:
    You will receive a message that objects are dependent on the library object. Note the name that is listed after "VM Template"
    Go to powershell in scvmm
    Run:
    remove-scvmtemplate -vmtemplate "NAME_YOU_RECORDED_FROM_ERROR"
    Then, you can delete the template from SCVMM,
    Wow Microsoft, Wow.

  • The storage where the virtual hard disk is located does not support virtual disk sharing

    Hi everyone,
    I deployed 2 hyper v vitual machines a while ago, and i did that because I needed to test my current game Project, which is an
    online game. However, i've had some problems with my Windows installation then I had to reset the pc by making it a refresh
    install. I still have the hyper v virtual disks, but i cannot attach it to a new hyper-v virtual machine. it pops up this message:
    "the storage
    where the virtual hard disk is located does not support virtual disk sharing". I dont know anything about virtual machines, so I
    didnt know I had to make the disk sharable. How can I force to attach the hard disk to a new hyper-v? I dont want to go t
    hrough the whole proccess of installing the operating system all over again and updating it....
    Any help is greatly appreciated!
    Thanks in advance,
    Romulo Romero

    Hi MrDebugging,
    >>
    When I Try to add a SCSI Controller, and then I click browse to add a UNC I get this:
    C:\Users\Public\Documents\Hyper-V\Virtual hard disks\ClienMachine.vhdx
    but I tried placing in different location, and the same problem occurs!
    By the way, Im not on a server , I am a domestic user and I am running it on my
    Windows 8.1
    According to the error message , it seems that it is not a permission issue .
    The VM is Gen 1 or Gen2 ?
    Generally the error message occurs when you enable "shared vhdx" on standalone/client hyper-v host :
    Please try to attach the VHDx file to IDE controller if it is a Gen 1 virtual machine (because only the SCSI controller has the option "virtual hard disk sharing" and Gen 1 VM only can boot from IDE )
    All in all , please do not use this feature without CSV or Scale-Out File Server with SMB 3.0 on file-based storage .
    If it is not the case , please detail steps what you did .
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • HT1526 trash from my  segate external hard disk.But i am unable to empty my trash box ,getting an error(Error code -36)how to trash?

    I had moved some folder to trash from my  segate external hard disk.But i am unable to empty my trash box ,getting an error:The Finder can’t complete the operation because some data in “” can’t be read or written. (Error code -36): pls advise,how to trash

    Hi, what format is the external drive?
    Well, in pure Apple File System talk... -36 
    ioErr 
    I/O error (bummers)
    Not very helpful, but generally means a Drive quit being Readable or Writable since starting the operation...
    http://fuzzy.wordpress.com/2006/12/10/ioerror-36/
    The other -36 is a Windows/SMB issue.
    Solving Trash Problems...
    http://thexlab.com/faqs/trash.html

  • Error adding VM through Powershell: Virtual hard disk in the chain of differencing

    I'm trying to programmatically create a VM from a .vhd file - my code is below.  I'm getting a weirdo file not found error about disk chaining, but I've TRIPLE checked all my paths.  Help is much appreciated!!!
    Thanks,
    Error:
    ADD-VMHardDiskDrive : 'Testing' failed to add device 'Virtual Hard Disk'. (Virtual machine ID ADC7CF7D-2EC5-4428-B27C-6EDCF29F5922)
    Failed to open virtual disk 'E:\will\VMTesting\Flash.480x800.vhd'. A problem was encountered opening a virtual hard disk in the chain of differencing
    disks, 'E:\will\VMTesting\Flash.vhd' (referenced by 'E:\will\VMTesting\Flash.480x800.vhd'): 'The system cannot find the file specified.' (0x80070002).
    My PowerShell code:
    $n = "Testing";
    $directory = "E:\will\VMTesting";
    $vhdxPath = "$directory\$n.vhdx";
    $vhdPath = "$directory\Flash.480x800.vhd";
    $vm = Get-VM $n;
    if($vm -ne $null) { Remove-VM $n -Force; }
    New-VM -Name $n -MemoryStartupBytes (Invoke-Expression "1000MB") -Path $directory;
    Set-VMMemory -VMName $n -DynamicMemoryEnabled $true -MinimumBytes 512MB -MaximumBytes 4096MB -StartupBytes 2048MB -Buffer 20;
    ADD-VMHardDiskDrive -VMName $n -Path $vhdPath;
    Start-VM $n;

    Hi Will ,
    According to the error message , please try to check the chain of differencing disk via "inspect disk.." .
    # Create our New Differencing Disk
    New-VHD –ParentPath T:\02R2June2012\08R2TemplateJune2012.vhdx –Path T:\lab50\lab50-PSDiffDiskVM\lab50-PSDiffDiskVM.vhdx -Differencing
    For creating a differencing disk please refer to following link:
    http://lyncdup.com/2012/06/creating-hyper-v-3-differencing-disks-in-server-2012-with-gui-and-powershell/
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • New Virtual hard disk wizard hangs after creating new vhd from huper-v manager on windows 7

    New Virtual hard disk wizard hangs after creating new vhd from huper-v manager on windows 7 workstation. 
    Windows 2008r2 hosts the hyper-v server. I can create VMs and VHD's when connecting to the server locally with the hyper-v manager. 
    The issue arises when I try to connect to the hyper-v server from my workstation which runs windows 7. 
    I have installed  The Windows6.1-KB958830-x64-RefreshPkg.msu that was suggested for windows 7 sp1. 
    I can connect to the hyper-v server, create vm's but  I cannot create vhd's  the gui just hangs with no errors in event log or on screen. 
    The files are there on the hyper-v hard drive but i suspect they are just created by windows as they are written and are not valid. 

    I've had just the same solution. Both did Hang Fixed size and flexible.
    Two parts were taken:
    1 - KB939820 for Windows 2003 server based domain controllers
    2 - disable using IPv6 on your NIC
    Result - both types of VHD's are created normaly.
    -----Infrastructure----
    Windows 2003 Domain upgtraded to 2008R2
    Windows Server 2008R2 Hyper-V - virtualisation clustered
    Windows 7 Pro - Hyper-V management
    Feel free to use --Mark as answer-- or --Propose as answer-- option and rate if a comment helps you or seemed usefull. -------------- Не забывайте использовать кнопки --От&amp;#1084;етить как ответ-- или --Предложить как ответ-- и проголосовать, если
    ко&amp;#1084;&amp;#1084;ентарий ва&amp;#1084; по&amp;#1084;ог или кажется полезны&amp;#1084;.

  • I cannot transfer my file from macbook to external hard disk, please help me

    i cannot transfer my file from macbook to external hard disk, please help me

    wrong forum, but also need more information. Probably need to reformat (erase) the drive, tell people what disk drive it is, type of interface you are using, the model MBP you own.

  • Creating a Master virtual hard disk and using the same for all other VM's

    Hi,
    We would like to create a master virtual hard disk and use the same for all other VM's. Can we do that ?
    my requirements :
    1) create 10 VM's
    2) first create a master virtual hard disk with win OS and use the same to create the 10 VM's.
    3) After creating the VM's change the HDD size.
                  -- if i have created master virtual disk with 500GB , and use the same for creating a virtual machine. can we change the HDD size to 1TB ?
    After creating the VM's ,i will change the system names and activate the windows accordingly.
    Will there be any implications ,if we can/will do like this.
    Thanks.

    Hi Suren424,
    I think Using Differencing Disks may cover your needs .
    Please refer to following setps:
       "Create the Parent Virtual Machine Configuration and Virtual Hard Disk
        Install the Operating System, updates, and common software
        Generalize the installation
        Prepare the parent virtual hard disk
        Create the differencing disks
        Create virtual machines that use the differencing disks
    For details please refer to follwing link:
    http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-child-configuration-using-differencing-disks.aspx
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • The server encounter an error while attaching Virtual Hard Disk in Windows Server 2008R2

    Unable to add an existing virtual hard disk in new VM(windows server 2008r2).

    Please repost here:
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverhyperv
    And include the actual and full error message.

  • Help - The chain of virtual hard disks is corrupted

    I took a snapshot of a VHD that I tried to expand to 40GB. After expanding I tried to restart the VM but got the error that "The Chain of virtual hard disks is corrupted".
    Apparently because I expanded the Parent VHD it threw up this error ( i assume because the snapshot differed in size?)
    This led me to Vhdtool which I ran:  vhdtool.exe /repair parentvhdfile.vhd snapshotvhdfile.vhd /quiet
    This appeared to have run okay. However when I went to restart the VM again I got the error:
    Servername Failed to start
    Microsoft emulated IDE controller failed to power on with error - the chain of virtual hard disks is corrupted. There is a mismatch in the virtual sizes of the parent virtual hard disk and differencing disk.
    Failed to open virtual disks. The size of the vurtua;l disk is not valid.
    etc...
    I notice that my parent VHD = 40GB in size, whilst the Snapshot (avhd) file = 109K
    I think I need your help, I don't know what to do!!

    If you made changes to the parent drive, your chain will be corrupted.  Changes to the parent disk invalidate all the child disk.
    Do you have a backup of the original parent disk?

  • The storage where the virtual hard disk is located does not support virtual hard disk sharing. (Hyper-v / Windows 10 Enterprise Tech. Preview)

    I am attempting to create new virtual machines in Hyper-V on Windows 10 Enterprise Tech. Preview and I am continually getting the error "The storage where the virtual hard disk is located does not support virtual hard disk sharing.". I am not trying
    to setup a shared VM or VHD, just a basic VHD.
    Does anyone have any suggestions on how to resolve this issue?

    This issue is listed in the release notes and currently there is no fix on our side. Have to wait for the next build.
    "Known issues in Build 10049
    If you have Virtual Machines hosted on your PC running Windows 10, you will want to move to the Slow ring and wait for the next build as this build breaks the ability to run VMs. "
    The statement is miss-quoted. It was about Hyper -V. An update KB3053898
    was released to fix that
    See the blog
    Here :
    excerpt........notice the statement has been crossed off in the blog.
    UPDATE: You cannot enable Hyper-V on this build. If you have Hyper-V already enabled and you upgrade to this build, Hyper-V will continue to work. <del>If you have Virtual Machines hosted in Hyper-V on your PC running Windows 10, you will want to move
    to the Slow ring and wait for the next build as this build breaks the ability to run VMs.</del>

Maybe you are looking for

  • How to delete the items in the recycle bin permanently from the windows using Diruse command

    How to delete the items in the recycle bin permanently from the windows  using Diruse command. Because most of the time we get out of disk space issues. Can somebody help me in giving with an example

  • A question about USB 2.0 on the Macbook

    Hi there, I've been having problems on my Macbook and Powerbook with my Audio Kontrol 1 USB 2.0 audio interface cutting out randomly. I've tried new USB leads etc to no avail. Is the USB on the Macbook full powered 500ma port? I would have thought th

  • Mavericks cant be installed???

    Hey, I currently am running OS X 10.7.5. I just now went to the app store to upgrade to Mavericks and it tells me it "cannot be installed on this computer". I do indeed meet the system requirements. HELP!!! Thanks

  • Infotype Pa0014 Updation

    Hi, I have designed a table control with 4 columns (wage type,wage text, wage amount and currency). The values from the table should be updated/inserted in infotype pa0014. If the table control record matches with any of the records in infotype 14 th

  • Mouse Click VS ListSelectionListener

    Dear All, As a new to JAVA GUI, I am asking the following questions. It could be a stupid questions. I am implementing a table which allows multiple selection. 1.What's the different between the mouse click and ListSelectionListener for a table, whic