Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2015 16:12:36 GMT
From:      Martin Simmons <martin@lispworks.com>
To:        "Ivailo A. Tanusheff" <ITanusheff@postbank.bg>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZVOL and snapshots length problem
Message-ID:  <201502201612.t1KGCacu014655@higson.cam.lispworks.com>
In-Reply-To: <1422065A4E115F409E22C1EC9EDAFBA42214513E@sofdc01exc02.postbank.bg> (ITanusheff@postbank.bg)
References:  <1422065A4E115F409E22C1EC9EDAFBA42214513E@sofdc01exc02.postbank.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Fri, 20 Feb 2015 13:19:28 +0000, Ivailo A Tanusheff said:
> 
> Dear all,
> 
> I have some trouble creating and manipulating ZVOL on my server. I am using FreeBSD 10 and I am creating a little bit sophisticated structure, where I create several file systems and volumes inside them for easy manipulation and snapshot management.
> An example structure is:
> <POOL> / <General type of system> / <Application System name, if any> / <Server name> / <Volume name>
> 
> Whenever my ZVOL path exceeds 63 characters, both when creating volume or snapshot,  I receive this error in my messages log:
> Feb 20 13:05:04 FreeBSD kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/TANK/Bank system/Core/DB@Daily_operations_2015-02-20-13:05, error=22)
> Feb 20 13:05:04 FreeBSD kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/TANK/Bank system/Core/FS@Daily_operations_2015-02-20-13:05, error=22)
> Feb 20 13:05:05 FreeBSD kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/TANK/Bank system/Core/Report@Daily_operations_2015-02-20-13:05, error=63)
> 
> Feb 20 13:10:05 FreeBSD kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/TANK/Bank system/Core/DB@Daily_operations_2015-02-20-13:10, error=22)
> Feb 20 13:10:05 FreeBSD kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/TANK/Bank system/Core/FS@Daily_operations_2015-02-20-13:10, error=22)
> Feb 20 13:10:05 FreeBSD kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/TANK/Bank system/Core/Report@Daily_operations_2015-02-20-13:10, error=63)
> 
> As far as I digged into it this is due to impossibility of creation  of /dev/zvol/... pointing to that volume or snapshot, while the volume/snapshot is still visible in the zfs list tree, although I am not quite sure I can use it.
> 
> Is there any way to fix this behavior or this is an implementation bug, not described in the manual?
> If I create shorter names the problem disappears, but this is contra version of what I needed, so it is a not acceptable solution.

I think this is a limitation in FreeBSD device naming.

error=22 is EINVAL, because you have a space in the name.

error=63 is ENAMETOOLONG, because the name is longer than SPECNAMELEN (also 63
by coincidence).

__Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502201612.t1KGCacu014655>