-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
missing /dev/zvol and /dev/zd* at all(udev related) #766
Comments
Ok, more coming now. The top post is for a raidz2 case. So I want to know what happen to a single hard drive case. Command: "zpool create storage /dev/hdd" KERNEL[1222.952148] change /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd (block) UDEV [1223.536281] change /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd (block) KERNEL[1223.536449] change /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd (block) KERNEL[1223.721741] remove /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd1 (block) KERNEL[1223.721813] remove /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd9 (block) KERNEL[1223.779616] change /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd (block) KERNEL[1223.779666] add /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd1 (block) KERNEL[1223.779724] add /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd9 (block) UDEV [1223.822621] change /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd (block) UDEV [1223.823303] remove /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd9 (block) UDEV [1223.823469] remove /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd1 (block) UDEV [1223.900173] change /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd (block) UDEV [1223.907980] add /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd9 (block) UDEV [1223.981067] add /devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sdd/sdd1 (block) KERNEL[1224.136826] add /devices/virtual/bdi/zfs-4 (bdi) UDEV [1224.137084] add /devices/virtual/bdi/zfs-4 (bdi) From zpool rules, I think we need ID_ZPOOL (please correct me if I am wrong). But we can see there is nothing named ID_ZPOOL in the udev events instead, there are some related message(ironically, they are in the remove action!): I really think that the udev rules are broken for udev-182 and kernel 3.3. Please correct me if I make any mistake |
Ok, now I know what happens. I have to use "zfs create -V size volume" to make zvol avaliable. The zvol won't be created until "-V" switch is specific. This behavior should be documented. |
I think this is different than the issue #599 so I create a new issue. I believe this is udev related or kernel config related.
My system is running gentoo-3.3.5 and udev package version is udev182-r3, and using git build for zfs.I can normally create pool and volume. But there is not /dev/zvol/* or /dev/zd* at all. Nothing even shows in /dev/disk/by-id. So I run "udevadmin monitor" to see what happen. When I start zfs, the udev events show:
KERNEL[2418.363575] add /devices/virtual/bdi/zfs-11 (bdi)
ACTION=add
DEVPATH=/devices/virtual/bdi/zfs-11
SEQNUM=2697
SUBSYSTEM=bdi
UDEV [2418.363895] add /devices/virtual/bdi/zfs-11 (bdi)
ACTION=add
DEVPATH=/devices/virtual/bdi/zfs-11
SEQNUM=2697
SUBSYSTEM=bdi
USEC_INITIALIZED=2418363830
KERNEL[2418.380939] add /devices/virtual/bdi/zfs-12 (bdi)
ACTION=add
DEVPATH=/devices/virtual/bdi/zfs-12
SEQNUM=2698
SUBSYSTEM=bdi
UDEV [2418.381255] add /devices/virtual/bdi/zfs-12 (bdi)
ACTION=add
DEVPATH=/devices/virtual/bdi/zfs-12
SEQNUM=2698
SUBSYSTEM=bdi
USEC_INITIALIZED=2418381189
That is it... Nothing else.
If I check the udev rules for zpool in /lib/udev/rules.d/60-zpool.rules, I read:
ENV{DEVTYPE}=="disk", IMPORT{program}="/lib/udev/zpool_id -d %p"
KERNEL=="[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?", SYMLINK+="$env{ID_ZPOOL_PATH}"
KERNEL=="[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_ZPOOL}=="?", SYMLINK+="$env{ID_ZPOOL_PATH}-part%n"
KERNEL=="dm-[0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?", SYMLINK+="$env{ID_ZPOOL_PATH}"
So the subsystem should be "block", but my udev only shows subsystem as "bdi". So obviously nothing shows up in /dev.
Do I miss something or actually udev rules need some update?
The text was updated successfully, but these errors were encountered: