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?
Just now, on ubuntu 16.04 I did
sudo find /dev
and then created a zvol, and thensudo find /dev
again, and then created partitions, and then did a finalsudo 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 tofind
the devices. Tab completion on the command prompt wasn't working for eharvey.You might just need to use
sudo
for yourls
andfind
and whatever.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.