VM's using Physical HDD's and software RAID - error with Windows HOSTS


  1. Posts : 11,247
    Windows / Linux : Arch Linux
       #1

    VM's using Physical HDD's and software RAID - error with Windows HOSTS


    Hi there
    Watch carefully when using physical HDD's with VM (i.e use the Native FS on the whole Disk - without GPT info with file systems such as EXT4 / XFS ) on a WINDOWS HOST.

    The problem arises in this type of case :
    4HDD's D1 GPT Partitioned C for Windows etc, D as XFS.
    D2,3,4 formatted totally XFS. D2,3,4 defined as single RAID 0 array.

    Start up the VM.

    The raw partition on D1 will stop any changes to partition tables so next time you boot the VM the HDD's will be shown as 4 single HDD's every time you power on the VM.

    The RAID 0 array can be re-started without loss of data (you need to re-create it again and not reformat the fs). Just use the mdadm command to redefine the array again and it will start OK.

    If you remove the partition D from the VM then everything is fine again so if you want physical HDD's use the entire HDD not a RAW partition. If you need more space then define the partition D as a Virtual HDD -- even though using VHD's lowers performance of the I/O subsystem -- you are probably better off sharing the Windows Native partition with the VM in this case.

    Just a little trap for the unwary.

    Cheers
    jimbo
      My Computer


  2. Posts : 4,666
    Windows 10 Pro x64 21H1 Build 19043.1151 (Branch: Release Preview)
       #2

    Yep this makes sense. You define RAID arrays in real life too using whole physical disks, not partitions. :)
      My Computers


  3. Posts : 11,247
    Windows / Linux : Arch Linux
    Thread Starter
       #3

    slicendice said:
    Yep this makes sense. You define RAID arrays in real life too using whole physical disks, not partitions. :)
    Hi there @slicendice
    That partition wasn't part of the array though.

    However deleting it from the VM config you can get back your data

    ......................

    [root@hestur jim]# mdadm --create --verbose /dev/md1 --level=0 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
    mdadm: chunk size defaults to 512K
    mdadm: partition table exists on /dev/sdb
    mdadm: partition table exists on /dev/sdb but will be lost or
    meaningless after creating array
    mdadm: partition table exists on /dev/sdc
    mdadm: partition table exists on /dev/sdc but will be lost or
    meaningless after creating array
    mdadm: partition table exists on /dev/sdd
    mdadm: partition table exists on /dev/sdd but will be lost or
    meaningless after creating array
    Continue creating array? y
    mdadm: Defaulting to version 1.2 metadata
    mdadm: array /dev/md1 started.
    [root@hestur jim]# lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 200G 0 disk
    ├─sda1 8:1 0 1G 0 part /boot
    └─sda2 8:2 0 199G 0 part
    ├─cl-root 253:0 0 50G 0 lvm /
    ├─cl-swap 253:1 0 2G 0 lvm [SWAP]
    └─cl-home 253:2 0 147G 0 lvm /home
    sdb 8:16 0 3.7T 0 disk
    └─md1 9:1 0 9.1T 0 raid0
    sdc 8:32 0 2.7T 0 disk
    └─md1 9:1 0 9.1T 0 raid0
    sdd 8:48 0 2.7T 0 disk
    └─md1 9:1 0 9.1T 0 raid0
    sr0 11:0 1 1024M 0 rom
    [root@hestur jim]# mount /dev/md1 -t auto -o rw /mnt/DV2

    Now all my data is back and on re-boot the RAID array is there again

    VM's using Physical HDD's and software RAID - error with Windows HOSTS-raid0.png

    Don't do any re-formatting or you will lose data.

    Cheers
    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:42.
Find Us




Windows 10 Forums