2

I seem to be missing some zvol functionality, but I'm not sure how to phrase it. I had this functionality with these same zpools on an ArchLinux installation. (Migrated the server.)

Ubuntu puts the zvols in /dev/zvol and arch mounted them in /dev. That's okay, but I don't know what happened to the partitions that are created on the zvol itself:

root@nosgoth:/dev/zvol/tank2/vm# fdisk -l tisc
Disk tisc: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 8192 bytes
I/O size (minimum/optimal): 8192 bytes / 8192 bytes
Disklabel type: dos
Disk identifier: 0x0006b0ad

Device Boot    Start      End  Sectors  Size Id Type
tisc1           2048 37109759 37107712 17.7G 83 Linux
tisc2       37109760 41940991  4831232  2.3G 82 Linux swap / Solaris

On archlinux this would result in devices called tiscPart0 and tiscPart1, and ultimately some /dev/zd64p1 and /dev/zd64p2 Since the pretty names are just a symlink to real devices lrwxrwxrwx 1 root root 13 May 31 21:36 tisc -> ../../../zd64

These things are also mentioned in ZFS administration guides: See the EXT4 on ZVOL section.

I'm assuming there's perhaps a udev configuration? I'm not sure what I'm missing, and searches aren't coming up very helpful. How do I get those partitions to show up?

  • 1
    This is probably best for the ZFS on Linux mailing lists. – ewwhite Jun 5 '16 at 4:28
  • I'll give it a go, and see if I can get traction there as well. I'll also post the solution should I find one. Thanks! – BeepDog Jun 5 '16 at 4:32
2

Just now, on ubuntu 16.04 I did sudo find /dev and then created a zvol, and then sudo find /dev again, and then created partitions, and then did a final sudo find /dev to see what was created at each step along the way. What I found was:

sudo zfs create -V 8g storage/junkzvol created /dev/zvol/storage/junkzvol

sudo fdisk /dev/zvol/storage/junkzvol created /dev/zvol/storage/junkzvol-part1 and /dev/zvol/storage/junkzvol-part2

While I was doing this, I noticed, that the new devices were visible to root, but not visible to me. I required the sudo in order to find the devices. Tab completion on the command prompt wasn't working for eharvey.

You might just need to use sudo for your ls and find and whatever.

  • There must be a difference between creating the partitions from the dom0, and from within the Guest VM installer. No configuration required. – BeepDog Jun 7 '16 at 3:47
  • No difference between creating the paritions on dom0 or from the guest VM. I just needed to partprobe on the dom0 so it would be updated with the new partition table information. Then everything works great! – BeepDog Jun 10 '16 at 2:11
0

You may want to have a look at the kpartx command. It is able to look into partitioning, create /dev/mapper entries and mount or unmount those.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.