Re: [bug] ZFS zvol dev entry disappearing upon reboot

From: Thomas Backman <serenity_at_exscape.org>
Date: Sun, 19 Jul 2009 13:05:25 +0200
On Jul 18, 2009, at 19:27, McLone wrote:

> Hell Low.
>
> As downloading torrent files from many peers to ZFS
> imposes fragmentation (and there's no way to defragment
> ZFS volume - what a pity! How come now-a-days FS can
> go like this?), i created zvol with UFS2 on it last time
> i wanted to watch some old sci-fi. I had plans to
> move sci-fi from UFS2/zvol to ZFS when it'll be complete,
> but forgot it, and rebooted machine. After reboot
> rtorrent said sci-fi is marked as complete, but it
> can not find files. I wasn't surprised, as i haven't modified
> my /etc/fstab, so i entered "mount /dev/zvol" and pressed
> Tab in hope of tcsh (eek) autocomplete.
> It just beeped on me.
> I've done "ls /dev" and there was no directory there named zvol.
> Then i've done "zfs list" and my zvol was there.
> Puzzled, i've done "zfs snapshot" and then a little dance of
> "zfs send | zfs recv" to a new volume. Now dev entries appeared
> (both for newly created snapshot of an old zvol and for new zvol).
> I rebooted, and there was no /dev/zvol again.
>
> I looked at my uname -v output (it was HEAD/amd64 from Jul 1)
> and decided to update. Updating didn't solved this problem.
>
> Strangely, simple "zfs rename zpool/zvol zpool/newzvol"
> cures this woe, but i think this is a bug.
>
> Steps to reproduce:
> zfs create -V 1g zpool/zvol
> [newfs /dev/zvol/zpool/zvol]
> reboot
> ls /dev
>
> Workaround:
> zfs rename zpool/zvol zpool/newzvol
> mount /dev/zvol/zpool/zvol /mnt
Hmm, I did a quick test and was unable to reproduce. There are ALL the  
steps I took, i.e. I never mounted the fs's or anything.

[root_at_chaos ~]# zfs create -V 1g tank/zvol
[root_at_chaos ~]# zfs create -V 1g tank/zvol2 ## to test if the name  
"zvol" causes problems
[root_at_chaos ~]# newfs /dev/zvol/tank/zvol
/dev/zvol/tank/zvol: 1024.0MB (2097152 sectors) block size 16384,  
fragment size 2048
         using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
  160, 376416, 752672, 1128928, 1505184, 1881440
[root_at_chaos ~]# newfs /dev/zvol/tank/zvol2
/dev/zvol/tank/zvol2: 1024.0MB (2097152 sectors) block size 16384,  
fragment size 2048
         using 6 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
  160, 376416, 752672, 1128928, 1505184, 1881440
[root_at_chaos ~]# ls -R /dev/z*
/dev/zero       /dev/zfs

/dev/zvol:
tank

/dev/zvol/tank:
zvol    zvol2
[root_at_chaos ~]# reboot
Connection to 192.168.1.10 closed by remote host.

----------------

[root_at_chaos ~]# uptime
  1:04PM  up 29 secs, 2 users, load averages: 0.87, 0.27, 0.10
[root_at_chaos ~]# ls -R /dev/z*
/dev/zero       /dev/zfs

/dev/zvol:
tank

/dev/zvol/tank:
zvol    zvol2


Regards,
Thomas
Received on Sun Jul 19 2009 - 09:05:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:52 UTC