Difference between revisions of "Windows create pool in vhdx with ps"
From OpenZFS on OS X
(Created page with "=== Create === $imgpath = "c:\tmp\test.vhdx" $imgsize = 527433728 New-VHD -Path $imgpath -SizeBytes $imgsize $disk = Mount-VHD -Path $imgpath -PassThru ''get "Physical" ...") |
|||
Line 13: | Line 13: | ||
$physdisk = Get-CimInstance -ClassName Win32_DiskDrive -Property * | Where-Object {$_.Index -eq $disk.DiskNumber} | $physdisk = Get-CimInstance -ClassName Win32_DiskDrive -Property * | Where-Object {$_.Index -eq $disk.DiskNumber} | ||
+ | |||
zpool.exe create -O casesensitivity=insensitive -O atime=off -o ashift=12 wintank $physdisk.Name | zpool.exe create -O casesensitivity=insensitive -O atime=off -o ashift=12 wintank $physdisk.Name |
Revision as of 07:39, 25 May 2022
Create
$imgpath = "c:\tmp\test.vhdx"
$imgsize = 527433728
New-VHD -Path $imgpath -SizeBytes $imgsize
$disk = Mount-VHD -Path $imgpath -PassThru
get "Physical" disk for mounted vhd
$physdisk = Get-CimInstance -ClassName Win32_DiskDrive -Property * | Where-Object {$_.Index -eq $disk.DiskNumber}
zpool.exe create -O casesensitivity=insensitive -O atime=off -o ashift=12 wintank $physdisk.Name
Destroy
zpool.exe export wintank
Dismount-VHD -Path $imgpath