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

Cannot create a zpool. Somethig wrong with a full path to disks #423

Open
Maxlosspb opened this issue Dec 19, 2024 · 21 comments
Open

Cannot create a zpool. Somethig wrong with a full path to disks #423

Maxlosspb opened this issue Dec 19, 2024 · 21 comments

Comments

@Maxlosspb
Copy link

Maxlosspb commented Dec 19, 2024

System information

Windows 11 Pro | 24H2 build 26100.2605
motherboard | gigabyte b550m ds3h v2
processor | Core i5 11600
HDD | SATA III WD Red Plus WD40EFPX, 4T
HDD | SATA III Seagate Ironwolf ST4000VN006, 4T
HDD | SATA III Seagate Ironwolf ST4000VN006, 4T

Distribution Name |
Distribution Version |
Kernel Version |
Architecture | AMD64
OpenZFS Version | zfswin-2.2.6rc11
zfs | zfs-kmod-zfswin-2.2.6rc11

Describe the problem you're observing

can't create a zpool

zpool create data_pool \.\PHYSICALDRIVE0
working on dev '#1048576#4000776716288#\.\PHYSICALDRIVE0'
setting path here '/dev/physicaldrive0'
setting physpath here '#1048576#4000776716288#\.\PHYSICALDRIVE0'
cannot create 'data_pool': invalid argument for this pool operation

can't create a zpool raidz

create data_pool raidz \.\PHYSICALDRIVE0 \.\PHYSICALDRIVE1 \.\PHYSICALDRIVE2
working on dev '#1048576#4000776716288#\.\PHYSICALDRIVE0'
setting path here '/dev/physicaldrive0'
setting physpath here '#1048576#4000776716288#\.\PHYSICALDRIVE0'
working on dev '#1048576#4000776716288#\.\PHYSICALDRIVE1'
setting path here '/dev/physicaldrive1'
setting physpath here '#1048576#4000776716288#\.\PHYSICALDRIVE1'
working on dev '#1048576#4000776716288#\.\PHYSICALDRIVE2'
setting path here '/dev/physicaldrive2'
setting physpath here '#1048576#4000776716288#\.\PHYSICALDRIVE2'
cannot create 'data_pool': invalid argument for this pool operation

Describe how to reproduce the problem

happens every time during zpool creation

Include any warning/errors/backtraces from the system logs

@lundman
Copy link

lundman commented Dec 19, 2024

I've tried to hide all the special paths to make things easier, so does it say the same thing if you say zpool create data_pool PHYSICALDRIVE0

@Maxlosspb
Copy link
Author

Maxlosspb commented Dec 19, 2024

Wow! It worked out! A lot of thanks! I would appreciate if you prompt what should be appropriate extended settings to create the pool.
I have found some but not sure all I undderstood and needed of them:
-O casesensitivity=insensitive -o ashift=12 -O acltype=posixacl -O xattr=sa -O atime=off -O relatime=off -O recordsize=256k -O dnodesize=auto -O normalization=formD -o feature@zilsaxattr=disabled -o feature@head_errlog=disabled -o feature@blake3=disabled -o feature@block_cloning=disabled -O compression=zstd-3

@Maxlosspb
Copy link
Author

Maxlosspb commented Dec 19, 2024

zpool destroy data_pool goes to the blue screen.

All actions were taken under the Windows Test Mode. Does it matter?

@lundman
Copy link

lundman commented Dec 19, 2024

destroy BSOD? Ok, I will look into it.

As for create, you probably was casesensitivity=insensitive for Windows.

@guenther-alka
Copy link

guenther-alka commented Dec 19, 2024

I would prefer to keep ZFS defaults in most cases, beside some important settings or those that can only be set at creation time like casesensitivity (set to Windows alike insensitive), normalisation (FormD) or ashift (set all vdevs in a pool to same ex 12) or utf8only (yes)

Set other values per filesystem as needed. If you preset on pool-level, it is the default when creating ZFS filesystems but most properties can be modified later.

Important for Windows
acltype=posix This is only for Linux as Linux lacks modern ntfs/nfsv4 ACL. On Windows acltype=nfsv4 (=ntfs) is used
aclmode, aclinherit=passthrough (Windows alike behaviour).

btw
I had no problems to create or destroy a pool, but with import

zpool import -D

  pool: usb
    id: 8353579647598997825
 state: ONLINE (DESTROYED)
action: The pool can be imported using its name or numeric identifier.
config:

        usb               ONLINE
          physicaldrive1  ONLINE


zpool import -f 8353579647598997825 usb
..
cannot import '8353579647598997825': no such pool available


see https://openzfs.github.io/openzfs-docs/man/master/8/zpool-create.8.html

@lundman
Copy link

lundman commented Dec 19, 2024

Import you use either the GUID "8353579647598997825" or the name "usb", unless you are renaming? Can't say I have ever tried the import deleted pool, but should you use -D then as well?

@guenther-alka
Copy link

guenther-alka commented Dec 19, 2024

ok, works!

zpool import -fD destroyed_GUID poolname

btw
I always prefer an import via GUID to avoid conflicts when a destroyed pool has the same name like an active one or with multiple destroyed pools of same name

@lundman
Copy link

lundman commented Dec 19, 2024

needed when you destroy the pool, otherwise not.

@Maxlosspb
Copy link
Author

Maxlosspb commented Dec 19, 2024

I'am gonna use an unallocated partition of SDD for L2ARC cashing.
Hot to get the full path to that partition? Will the command zpool add data_pool cache /dev/sdX/sdX1 pick it up?

One more question: how to import zpool after windows rebooting automatically?

@guenther-alka
Copy link

guenther-alka commented Dec 19, 2024

ZFS needs independent blockdevices.
A blockdevice can be a physical disk, a virtual harddisk (.vhdx on Windows), a file or a iSCSI target that presents itself like a independent device. You cannot use a partition directly. (/dev/sdX is Linux, not Windows)

What you can do for example:
Use the whole SSD as ntfs volume and place virtual harddisks .vhdx on it and mount. These virtual harddisks are independent disks ex physicaldrive7, physicaldrive8 that you can use as cache, slog or pool member.

btw
Zed on rc11 should automount last mounted pool or
use a planned task to import on bootup or
use my napp-it cs web-gui that automounts importable pools and virtual harddisks (when auto in name)

@lundman
Copy link

lundman commented Dec 20, 2024

Are we saying zpool create BOOM HarddiskXpartitionY does not work?

@guenther-alka
Copy link

guenther-alka commented Dec 20, 2024

The question is how you can do that in Windows ex

DISKPART> list volume

  Volume ###  Bst  Bezeichnung  DS     Typ         Größe    Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C                NTFS   Partition    474 GB  Fehlerfre  Startpar
  Volume 1                      FAT32  Partition    100 MB  Fehlerfre  Versteck
  Volume 2                      FAT32  Partition     99 MB  Fehlerfre  System
  Volume 3                      NTFS   Partition   1037 MB  Fehlerfre  Versteck
  Volume 4     E   Volume       NTFS   Partition      8 GB  Fehlerfre
  Volume 5                      RAW    Partition     11 GB  Fehlerfre

DISKPART>

or

PS C:\Users\me> Get-Partition | Where-Object {$_.DiskNumber -eq 4}


   DiskPath: \\?\scsi#disk&ven_msft&prod_virtual_disk#2&1f4adffe&0&000003#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}

PartitionNumber  DriveLetter Offset                                        Size Type
---------------  ----------- ------                                        ---- ----
1                           17408                                     15.98 MB Reserved
2                E           16777216                                   8.26 GB Basic
3                           8889827328                                11.72 GB Basic

Volume 4 and 5 are on same physicaldrive4
How to assign raw volume 5 (Partition 4.3) to ZFS ex as slog?

image

@Maxlosspb Maxlosspb reopened this Dec 20, 2024
@Maxlosspb
Copy link
Author

Maxlosspb commented Dec 20, 2024

After many tries I have create a zpool DATA and a dataset BEFREE. This config has been used:
zpool create -O casesensitivity=insensitive -o ashift=12 -O acltype=nfsv4 -O normalization=formD -O xattr=sa -O atime=off -O relatime=off -O recordsize=256k -O dnodesize=auto -O aclmode=passthrough -O compression=lz4 -o feature@zilsaxattr=disabled -o feature@head_errlog=disabled -o feature@blake3=disabled -o feature@block_cloning=disabled  -O mountpoint=/ DATA raidz PHYSICALDRIVE0 PHYSICALDRIVE1 PHYSICALDRIVE2

L2ARC (SSD 250 GB):
zpool add DATA cache PHYSICALDRIVE5

Created a dataset:
zfs create DATA/BEFREE

The task planner imports the zpool at the start of system.

It worked out for the beginning.
Then a couple of problems arose:

  1. Command zfs destroy DATA/BEFREE crashed the Windows with the blue screen.
  2. During synchronization the dataset with the original 2Tb SATA storage, the DATA pool has just disappeared. Total Commander hung up. Only hard reset allowed to restart the system. No any zpools was discovered after restarting.

zpool list, zpool import -a do reveal nothing.

The second try to reestablish a zpool. The same result.

May be something wrong with my zpool config?

@guenther-alka
Copy link

I would start with defaults to compare

zpool create data raidz PHYSICALDRIVE0 PHYSICALDRIVE1 PHYSICALDRIVE2

list all importable nondestroyed pools

zpool import

list all importable destroyed pools

zpool import -D

@Maxlosspb
Copy link
Author

Maxlosspb commented Dec 21, 2024

I still keep the initial config. The pool stays imported. It seems working, but copying of 1,4Tb stored on HDD files causes file managers to freeze. the system failed to transfer data from storage to pool. File managers (Total Commander, WinMerge) do not respond, are not killed by the task manager, only a hard reset copes. got out of the situation by synchronizing the storage and pool using ubuntu-live. I wander how reasonable is it to use zfs on Window at this stage? I adore zfs, use it on my private servers and even laptops with linux. It looked as a good idea to try it on my Windows workstation

upd: copying to pool hangs ubuntu dead as well

@lundman
Copy link

lundman commented Dec 21, 2024

Your last comment makes me think I do not need to stress about it right away. But yes, obviously Windows version might not be production ready today, but we are working hard toward that goal, and each bug you guys report gets us closer.

@Maxlosspb
Copy link
Author

There is possible nothing wrong with zfs. I have discovered that the glitch happened to the saved Users folder from the original Windows system. Something goes wrong with user privileges or something else. Users, $recycle bin are under suspicion. Now the system is stable, so I will take my risks using zfs on Windows. Thank you guys again for making this world better!

@guenther-alka
Copy link

guenther-alka commented Dec 21, 2024

If a copy hangs on Windows, this can be a configuration problem but if the pool hangs on Ubuntu as well after a move, this looks more like a hardware problem, related to RAM, cabling, temp or disks especially when it happens after some time.

Also compatibility problems can be the reason like we had with Crystal Diskmark or the Aomei backup driver. To find and fix it is important that many are testing ZFS on different hard or software environments and report remaining problems.

@Maxlosspb
Copy link
Author

Is there a way to use GUID of drive instead of physicaldriveX creating a zpool in Windows?

@guenther-alka
Copy link

guenther-alka commented Dec 21, 2024

I suppose this is not possible as GUID is a ZFS enumeration and unknown to Windows.
The only Windows alternative if there is one would propably be "uniqueid" as friendlyname (Vendor + Model) and serial are not unique or mandatory

All Windows disk informations from

Get-PhysicalDisk | ConvertTo-csv

image

@Maxlosspb
Copy link
Author

Maxlosspb commented Dec 25, 2024

I have discovered, that those hangs occur during coping 'system's files' from any of Users, System files or Recycle Bin. Coudld be something wrong with file's attributes. After excluding these folders from "list to copy", all 1,5 Tb was placed on zfs pool at last.

Unfortunately after several computer's reboots the pool disappeared at all for no obvious reason. Nor windows, neither Ubuntu zfs didn't discovered that pool at all.

Now I have change my platform to AMD Ryzen 7 8700F + ASUS TUF GAMING B650M-E + 3 HDDs + system SSD. Will see how zfs works on it.

I am going to keep my old Core i5 11600 as a platform for testing.

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

3 participants