ZVOL Device Nodes Disappear

Fajar A. Nugraha list at fajar.net
Wed May 25 01:26:40 EDT 2011


On Tue, May 24, 2011 at 11:44 PM, Richard Laager <rlaager at wiktel.com> wrote:
> On Sat, 2011-05-21 at 10:03 +0700, Fajar A. Nugraha wrote:
>> What version of zfs do you use? Also what distro/version?
>
> 0.6.0.15-0ubuntu1~natty1 on Ubuntu Natty.
>
>> There was a problem like that around rc2, but it's fixed before rc3
>> was out. Latest version is 0.6.0-rc4.
>
> I'm not sure if this Ubuntu version is rc4 or older.
>
> Below is a script that you can use to reproduce the issue. It must be
> run as root, of course.

It works fine in my setup (I'm using my own test). Then again I needed
to add vmalloc to kernel command line to have zfs work properly. If
you use 32bit, try adding it (see below for my kernel cmdline). Also,
verify that you have the same udev files that I do (and no extra
*zvol* rule on /etc/udev/rules.d)

# dd if=/dev/zero of=/tmp/vbd.img bs=1M count=0 seek=1024
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.9543e-05 s, 0.0 kB/s

# zpool create testpool /tmp/vbd.img

# zfs create -V 50M testpool/testvol

# mkfs.ext2 /dev/testpool/testvol
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
12824 inodes, 51200 blocks
2560 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=52428800
7 block groups
8192 blocks per group, 8192 fragments per group
1832 inodes per group
Superblock backups stored on blocks:
	8193, 24577, 40961

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

# ls -la /dev/testpool/testvol
lrwxrwxrwx 1 root root 6 2011-05-25 12:20 /dev/testpool/testvol -> ../zd0

# uname -a
Linux HP 2.6.38-9-generic #43-Ubuntu SMP Thu Apr 28 15:25:15 UTC 2011
i686 i686 i386 GNU/Linux

# zpool destroy testpool

# cat /lib/udev/rules.d/60-zvol.rules
# Persistent links for zvol
#
# persistent disk links: /dev/zvol/dataset_name
# also creates compatibilty symlink of /dev/dataset_name

KERNEL=="zd*" SUBSYSTEM=="block" ACTION=="add|change"
PROGRAM="/usr/bin/zvol_id $tempnode" SYMLINK+="zvol/%c %c"

# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.38-9-generic root=LABEL=SSD-ROOT ro
rootflags=subvolid=256 vmalloc=512M

-- 
Fajar



More information about the zfs-discuss mailing list