Bug 244166 - zfs zvol device name length limit too low
Summary: zfs zvol device name length limit too low
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-16 14:31 UTC by Martin Birgmeier
Modified: 2020-02-17 08:11 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2020-02-16 14:31:42 UTC
Scenario:
- zfs with zvols and snapshots similar to this (903 is only one of many vdisks):

[0]# zfs list -r -t all hal.1/1/vdisks/903
NAME                                            USED  AVAIL  REFER  MOUNTPOINT
hal.1/1/vdisks/903                             13.1G   654G  3.82G  -
hal.1/1/vdisks/903@backup.2019-09-01.12:09:19  1.42G      -  3.80G  -
hal.1/1/vdisks/903@backup.2019-10-06.20:49:19   860M      -  4.24G  -
hal.1/1/vdisks/903@backup.2019-11-03.17:14:12   177M      -  3.76G  -
hal.1/1/vdisks/903@backup.2019-12-01.20:34:53   700M      -  3.98G  -
hal.1/1/vdisks/903@backup.2020-01-05.17:56:48   796M      -  3.86G  -
hal.1/1/vdisks/903@backup.2020-01-12.18:30:46   595M      -  3.81G  -
hal.1/1/vdisks/903@backup.2020-01-19.19:04:27  65.0M      -  3.82G  -
hal.1/1/vdisks/903@backup.2020-01-26.22:40:22  34.7M      -  3.82G  -
hal.1/1/vdisks/903@backup.2020-02-02.18:17:01  33.2M      -  3.82G  -
hal.1/1/vdisks/903@backup.2020-02-09.12:12:10  33.0M      -  3.82G  -
[0]# 

- 903 partitioned as 903a, 903b, 903d
- backup up to another zfs under the subvolume ext.1/backup/zfssr, resulting in

[0]# zfs list -r -t all ext.1/backup/zfssr/hal.1/1/vdisks/903
NAME                                                               USED  AVAIL  REFER  MOUNTPOINT
ext.1/backup/zfssr/hal.1/1/vdisks/903                             14.8G   103G  4.93G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-10-06.20:49:19  1.33G      -  5.36G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-11-03.17:14:12   227M      -  4.75G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-12-01.20:34:53   880M      -  5.02G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-05.17:56:48   978M      -  4.78G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-12.18:30:46   819M      -  4.81G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-19.19:04:27  91.0M      -  4.93G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-26.22:40:22  50.8M      -  4.93G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-02.18:17:01  47.9M      -  4.93G  -
ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-09.12:12:10      0      -  4.93G  -
[0]# 

Result:
- When importing ext.1, there are many errors such as

[0]# grep 'Feb 16.*g_dev_taste.*903' /var/log/messages
Feb 16 15:21:13 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-12-01.20:34:53, error=63)
Feb 16 15:21:13 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-26.22:40:22, error=63)
Feb 16 15:21:13 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-02.18:17:01, error=63)
Feb 16 15:21:14 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-10-06.20:49:19, error=63)
Feb 16 15:21:14 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-19.19:04:27, error=63)
Feb 16 15:21:14 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-11-03.17:14:12, error=63)
Feb 16 15:21:14 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-09.12:12:10, error=63)
Feb 16 15:21:14 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-12.18:30:46, error=63)
Feb 16 15:21:14 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-05.17:56:48, error=63)
Feb 16 15:21:25 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-12-01.20:34:53a, error=63)
Feb 16 15:21:25 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-12-01.20:34:53b, error=63)
Feb 16 15:21:25 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-12-01.20:34:53d, error=63)
Feb 16 15:21:25 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-26.22:40:22a, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-26.22:40:22b, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-26.22:40:22d, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-02.18:17:01a, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-02.18:17:01b, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-02.18:17:01d, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-10-06.20:49:19a, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-10-06.20:49:19b, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-10-06.20:49:19d, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-19.19:04:27a, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-19.19:04:27b, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-19.19:04:27d, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-11-03.17:14:12a, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-11-03.17:14:12b, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2019-11-03.17:14:12d, error=63)
Feb 16 15:21:26 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-09.12:12:10a, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-09.12:12:10b, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-02-09.12:12:10d, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-12.18:30:46a, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-12.18:30:46b, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-12.18:30:46d, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-05.17:56:48a, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-05.17:56:48b, error=63)
Feb 16 15:21:27 hal kernel: g_dev_taste: make_dev_p() failed (gp->name=zvol/ext.1/backup/zfssr/hal.1/1/vdisks/903@backup.2020-01-05.17:56:48d, error=63)
[0]# 

This seems to be caused by the path length of device files being limited to 63 characters.

Would it be possible to increase this limit, or get rid of it altogether?

-- Martin
Comment 1 Aleksandr Fedorov 2020-02-17 08:11:58 UTC
You are right, the path length of device files being limited to 63 characters: https://svnweb.freebsd.org/base/release/12.1.0/sys/sys/param.h?view=markup#l116

It's bumped in CURRENT, but isn't MFC-able: https://github.com/freebsd/freebsd/commit/19ca89f12f563d987b0a21497247ec7d735b429a