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

zfs-windows-2.2.6-rc6 "zpool create" saved zfs partitions on other disks #403

Open
leonik3 opened this issue Oct 4, 2024 · 7 comments
Open

Comments

@leonik3
Copy link

leonik3 commented Oct 4, 2024

I installed "zfs-windows-2.2.6-rc6" version. Unfortunately it destroyed my partitions on two other drives.

I launched:
zpool create -o autoexpand=on -o autotrim=on -O dedup=on -O casesensitivity=insensitive -O compression=on -O atime=off -o ashift=12 zzz raidz PHYSICALDRIVE4 PHYSICALDRIVE9 PHYSICALDRIVE10

Windows got a blue screen.

Windows didn't start anymore.

On another computer I saw that zfs partitions were saved on two completely different disks. The first was the Windows system disk on which I was running the command. The second was a disk with some Ubuntu. I have other disks, but they are as connected dynamic disks in Windows - they were not destroyed.

I recovered the Windows partition and Windows system using the following methods:
a) Testdisk-7.3-WIP and "testdisk_win.exe" - all partitions was recovered
b) Windows installation disk and repair mode in cmd and chkdsk /f
c) Windows installation disk and repair mode in cmd and:
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd
d) old version of https://sourceforge.net/projects/boot-repair-cd/
e) Once more Windows installation disk and repair mode in cmd and:
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd

@lundman
Copy link

lundman commented Oct 4, 2024

Woah that is serious. The output of the command is probably lost, but it is hard to picture what goes wrong since it opens PHYSICALDRIVE10 directly (as opposed to mapping it or something like that).

I'll attach 10 disks to my VM and see if I can replicate

@lundman
Copy link

lundman commented Oct 5, 2024

OK yeah, so whatever you put in, like PHYSICALDRIVE10 - it opens that literally, and passes it around.

$ wmic diskdrive list brief
Caption                                    DeviceID             Model                                      Partitions  Size
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE1   VMware, VMware Virtual S SCSI Disk Device  0           10733990400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE0   VMware, VMware Virtual S SCSI Disk Device  3           134211893760
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE2   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE3   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE4   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE5   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE6   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE7   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE8   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE9   VMware, VMware Virtual S SCSI Disk Device  0           1069286400
VMware, VMware Virtual S SCSI Disk Device  \\.\PHYSICALDRIVE10  VMware, VMware Virtual S SCSI Disk Device  0           1069286400

$ zpool create -o autoexpand=on -o autotrim=on -O dedup=on -O casesensitivity=insensitive -O compression=on -O atime=off -o ashift=12 zzz raidz PHYSICALDRIVE4 PHYSICALDRIVE9 PHYSICALDRIVE10
working on dev '#1048576#1063256064#\\?\PHYSICALDRIVE4'
setting path here '/dev/physicaldrive4'
setting physpath here '#1048576#1063256064#\\?\PHYSICALDRIVE4'
working on dev '#1048576#1063256064#\\?\PHYSICALDRIVE9'
setting path here '/dev/physicaldrive9'
setting physpath here '#1048576#1063256064#\\?\PHYSICALDRIVE9'
working on dev '#1048576#1063256064#\\?\PHYSICALDRIVE10'
setting path here '/dev/physicaldrive10'
setting physpath here '#1048576#1063256064#\\?\PHYSICALDRIVE10'

Expanded path to '\\?\PHYSICALDRIVE4'
Expanded path to '\\?\PHYSICALDRIVE9'
Expanded path to '\\?\PHYSICALDRIVE10'


# ls -l '/e/Virtual Machines/disk*.vmdk'
-rw-r--r-- 1 lundm 197609      196608 Oct  5 12:43 '/e/Virtual Machines/disk2-000001.vmdk'
-rw-r--r-- 1 lundm 197609      196608 Oct  5 12:43 '/e/Virtual Machines/disk3-000001.vmdk'
-rw-r--r-- 1 lundm 197609     2228224 Oct  5 13:03 '/e/Virtual Machines/disk4-000001.vmdk'
-rw-r--r-- 1 lundm 197609      196608 Oct  5 12:43 '/e/Virtual Machines/disk5-000001.vmdk'
-rw-r--r-- 1 lundm 197609      196608 Oct  5 12:43 '/e/Virtual Machines/disk6-000001.vmdk'
-rw-r--r-- 1 lundm 197609      196608 Oct  5 12:43 '/e/Virtual Machines/disk7-000001.vmdk'
-rw-r--r-- 1 lundm 197609      196608 Oct  5 12:43 '/e/Virtual Machines/disk8-000001.vmdk'
-rw-r--r-- 1 lundm 197609     2228224 Oct  5 13:03 '/e/Virtual Machines/disk9-000001.vmdk'
-rw-r--r-- 1 lundm 197609     2097152 Oct  5 13:03 '/e/Virtual Machines/disk10-000001.vmdk'

(I assume writes to disk10 is smaller due to being parity)

Can you confirm that wmic diskdrive list brief matches the disks you are expecting? Windows likes to re-order disks after all.

@leonik3
Copy link
Author

leonik3 commented Oct 5, 2024

Before issuing the command, I restarted Windows so that the disk numbers would be permanently set and would not change, and I checked the numbering of each disk in two programs.

I remembered that I had two blue screens. The first time, Windows did not crash (no zfs partition was written to it). I repeated the procedure then and it crashed.

image
image

@leonik3
Copy link
Author

leonik3 commented Oct 5, 2024

image

@leonik3
Copy link
Author

leonik3 commented Oct 10, 2024

Just to clarify. I connected 3 additional disks to this system and they were numbered: 4, 9 and 10

@lundman
Copy link

lundman commented Oct 11, 2024

They aren't in your wmic diskdrive list brief output at all though?

@leonik3
Copy link
Author

leonik3 commented Oct 11, 2024

No, they are not on this list.
After adding these three additional disks to this system, they (these added disks) then got numbers 4, 9, 10. The above images do not show this state with these three added disks.

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