Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating zpool on separate partition on same vdev works but flags an error #349

Open
Chewbakka-Wakka opened this issue Nov 28, 2022 · 5 comments

Comments

@Chewbakka-Wakka
Copy link

zpool create -f -O casesensitivity=insensitive -O compression=zstd -O atime=off -O dedup=on -O recordsize=512k data \?\G:
working on dev '\?\G:'
setting path here '/dev/Harddisk0Partition4'
setting physpath here '\?\G:'
cannot open '/dev/Harddisk0Partition4': No such file or directory

zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
data 366G 159K 366G - - 0% 0% 1.00x ONLINE -

wmic diskdrive list brief
Caption DeviceID Model Partitions Size
Samsung SSD 850 EVO 500GB \.\PHYSICALDRIVE0 Samsung SSD 850 EVO 500GB 4 500105249280

wmic logicaldisk list brief
DeviceID DriveType FreeSpace ProviderName Size VolumeName
B: 4 16690061312 469259460608
C: 3 40385957888 106204553216
D: 2 380775579136 380775603712 data
G: 3
M: 4 16690053120 1287157645312

Get-Partition -DiskNumber 0 | ForEach-Object {"\Device\Harddisk$($.DiskNumber)\Partition$($.PartitionNumber)"}
\Device\Harddisk0\Partition1
\Device\Harddisk0\Partition2
\Device\Harddisk0\Partition3
\Device\Harddisk0\Partition4
\Device\Harddisk0\Partition5

It would be good to add onto the existing readme file how to do this correctly by identification of full partition path, but as it stands the drive on the separate partition must be mounted in order to create the pool. Otherwise it will not work but this seems a bit clumsy having 2 drive letters for 1 partition as shown here.

@andrewc12
Copy link

andrewc12 commented Nov 28, 2022

Yeah having some way of doing this a bit easier would be nice.

Does \Device\Harddisk0\Partition4 actually work?

I don't know where I found it but this is what I use when I have a raw partition without a drive letter
zpool.exe create -f tank Harddisk0Partition4

@andrewc12
Copy link

That PowerShell snippet looks useful so I'll be taking that :)

@andrewc12
Copy link

Also I should point out that the repo for the build you are running is
https://github.com/openzfsonwindows/openzfs/

@Chewbakka-Wakka
Copy link
Author

Chewbakka-Wakka commented Nov 29, 2022

Passing the full device path does not work it would appear. You can pass \?\G: as seen above and the pool is fully functional.

zpool create -f -O casesensitivity=insensitive -O compression=zstd -O atime=off -O dedup=on -O recordsize=512k data \Device\Harddisk0\Partition4
cannot open 'C:\Device\Harddisk0\Partition4': No such file or directory

Yes that way by using only Harddisk0Partition4 also works, yet flags the same error:

zpool create -f -O casesensitivity=insensitive -O compression=zstd -O atime=off -O dedup=on -O recordsize=512k -O sync=disabled data Harddisk0Partition4

Expanded path to '\?\Harddisk0Partition4'
working on dev '\?\Harddisk0Partition4'
setting path here '/dev/Harddisk0Partition4'
setting physpath here '\?\Harddisk0Partition4'
cannot open '/dev/Harddisk0Partition4': No such file or directory

@Chewbakka-Wakka
Copy link
Author

I will raise another issue after more experiments on https://github.com/openzfsonwindows/openzfs/ for the duplicate drive letters if it is. I have found it is possible to have 2 D:\ drives...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants