Dennis Clarke
2009-Mar-04 20:24 UTC
[zfs-discuss] Question about zpool create parameter "version"
Not too sure what this option needs as a value but the man page suggests that the keywork "current" should work. When I try a dry run with -n I see this : # zpool create -n -o autoreplace=on -o version=current -m legacy \> fibre00 \ > mirror c8t20000004CFAC0E97d0 c8t2000002037F859F1d0 \ > mirror c8t20000004CFB53F97d0 c8t2000002037F84044d0 \ > mirror c8t20000004CFA3C3F2d0 c8t20000004CF2FCE99d0 \ > mirror c8t20000004CF9645A8d0 c8t20000004CFA3F328d0 \ > mirror c8t2000002037F812EAd0 c8t20000004CF96FF00d0 \ > mirror c8t20000004CFAC489Fd0 c8t20000004CF961853d0would create ''fibre00'' with the following layout: fibre00 mirror c8t20000004CFAC0E97d0 c8t2000002037F859F1d0 mirror c8t20000004CFB53F97d0 c8t2000002037F84044d0 mirror c8t20000004CFA3C3F2d0 c8t20000004CF2FCE99d0 mirror c8t20000004CF9645A8d0 c8t20000004CFA3F328d0 mirror c8t2000002037F812EAd0 c8t20000004CF96FF00d0 mirror c8t20000004CFAC489Fd0 c8t20000004CF961853d0 No warnings and looks good. When I remove the -n I see this : # zpool create -o autoreplace=on -o version=current -m legacy \> fibre00 \ > mirror c8t20000004CFAC0E97d0 c8t2000002037F859F1d0 \ > mirror c8t20000004CFB53F97d0 c8t2000002037F84044d0 \ > mirror c8t20000004CFA3C3F2d0 c8t20000004CF2FCE99d0 \ > mirror c8t20000004CF9645A8d0 c8t20000004CFA3F328d0 \ > mirror c8t2000002037F812EAd0 c8t20000004CF96FF00d0 \ > mirror c8t20000004CFAC489Fd0 c8t20000004CF961853d0cannot create ''fibre00'': bad numeric value ''current'' # zpool create -o autoreplace=on -o version="current" -m legacy \> fibre00 \ > mirror c8t20000004CFAC0E97d0 c8t2000002037F859F1d0 \ > mirror c8t20000004CFB53F97d0 c8t2000002037F84044d0 \ > mirror c8t20000004CFA3C3F2d0 c8t20000004CF2FCE99d0 \ > mirror c8t20000004CF9645A8d0 c8t20000004CFA3F328d0 \ > mirror c8t2000002037F812EAd0 c8t20000004CF96FF00d0 \ > mirror c8t20000004CFAC489Fd0 c8t20000004CF961853d0cannot create ''fibre00'': bad numeric value ''current'' The keyword current is not numeric and causes an issue. The zpool(1M) manpage is not clear on this and, I really don''t know if quotes would help here. In zpool(1M) section Properties we see : version=version The current on-disk version of the pool. This can be increased, but never decreased. The preferred method of updating pools is with the "zpool upgrade" command, though this property can be used when a specific version is needed for backwards compatibility. This property can be any number between 1 and the current version reported by "zpool upgrade -v". The special value "current" is an alias for the latest supported version. This works : # zpool create -o autoreplace=on -o version=3 -m legacy \> fibre00 \ > mirror c8t20000004CFAC0E97d0 c8t2000002037F859F1d0 \ > mirror c8t20000004CFB53F97d0 c8t2000002037F84044d0 \ > mirror c8t20000004CFA3C3F2d0 c8t20000004CF2FCE99d0 \ > mirror c8t20000004CF9645A8d0 c8t20000004CFA3F328d0 \ > mirror c8t2000002037F812EAd0 c8t20000004CF96FF00d0 \ > mirror c8t20000004CFAC489Fd0 c8t20000004CF961853d0# zpool status fibre00 pool: fibre00 state: ONLINE status: The pool is formatted using an older on-disk format. The pool can still be used, but some features are unavailable. action: Upgrade the pool using ''zpool upgrade''. Once this is done, the pool will no longer be accessible on older software versions. scrub: none requested config: NAME STATE READ WRITE CKSUM fibre00 ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t20000004CFAC0E97d0 ONLINE 0 0 0 c8t2000002037F859F1d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t20000004CFB53F97d0 ONLINE 0 0 0 c8t2000002037F84044d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t20000004CFA3C3F2d0 ONLINE 0 0 0 c8t20000004CF2FCE99d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t20000004CF9645A8d0 ONLINE 0 0 0 c8t20000004CFA3F328d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t2000002037F812EAd0 ONLINE 0 0 0 c8t20000004CF96FF00d0 ONLINE 0 0 0 mirror ONLINE 0 0 0 c8t20000004CFAC489Fd0 ONLINE 0 0 0 c8t20000004CF961853d0 ONLINE 0 0 0 errors: No known data errors I *should* be able to select any ZFS Version I wish from the fol list: # zpool upgrade -v This system is currently running ZFS pool version 10. The following versions are supported: VER DESCRIPTION --- -------------------------------------------------------- 1 Initial ZFS version 2 Ditto blocks (replicated metadata) 3 Hot spares and double parity RAID-Z 4 zpool history 5 Compression using the gzip algorithm 6 bootfs pool property 7 Separate intent log devices 8 Delegated administration 9 refquota and refreservation properties 10 Cache devices For more information on a particular version, including supported releases, see: http://www.opensolaris.org/os/community/zfs/version/N Where ''N'' is the version number. For example, version 4 : # zpool destroy fibre00 # zpool create -o autoreplace=on -o version=4 -m legacy \> fibre00 \ > mirror c8t20000004CFAC0E97d0 c8t2000002037F859F1d0 \ > mirror c8t20000004CFB53F97d0 c8t2000002037F84044d0 \ > mirror c8t20000004CFA3C3F2d0 c8t20000004CF2FCE99d0 \ > mirror c8t20000004CF9645A8d0 c8t20000004CFA3F328d0 \ > mirror c8t2000002037F812EAd0 c8t20000004CF96FF00d0 \ > mirror c8t20000004CFAC489Fd0 c8t20000004CF961853d0Does the keyword "current" work in some other fashion ? -- Dennis Clarke
Richard Morris - Sun Microsystems - Burlington United States
2009-Mar-05 16:33 UTC
[zfs-discuss] Question about zpool create parameter "version"
On 03/04/09 15:24, Dennis Clarke wrote:> Not too sure what this option needs as a value but the man page suggests > that the keywork "current" should work. > > ... > cannot create ''fibre00'': bad numeric value ''current'' > > The keyword current is not numeric and causes an issue. The zpool(1M) > manpage is not clear on this and, I really don''t know if quotes would help > here. > > In zpool(1M) section Properties we see : > > version=version > > The current on-disk version of the pool. This can be > increased, but never decreased. The preferred method of > updating pools is with the "zpool upgrade" command, > though this property can be used when a specific version > is needed for backwards compatibility. This property > can be any number between 1 and the current version > reported by "zpool upgrade -v". The special value > "current" is an alias for the latest supported version.That last sentence is incorrect. The zpool command does not support "current" as an alias for the last supported version. However the zfs command does: # zpool create -o version=current pool /tmppool cannot create ''pool'': bad numeric value ''current'' # zfs create -o version=current pool2/fs # zfs get version pool2/fs NAME PROPERTY VALUE SOURCE pool2/fs version 3 - Filed CR 6813635 to correct this info in the zpool(1M) man page. Filed RFE 6813645 to add support for version=current to the zpool command. Once that RFE is implemented, the last sentence above can be added back to the zpool(1M) man page. But until that RFE is implemented, perhaps zpool create -n version=current should report an error. -- Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090305/bb3a782b/attachment.html>
Richard Morris - Sun Microsystems - Burlington United States
2009-Mar-05 18:57 UTC
[zfs-discuss] Question about zpool create parameter "version"
On 03/05/09 11:33, Richard Morris - Sun Microsystems - Burlington United States wrote:> On 03/04/09 15:24, Dennis Clarke wrote: >> Not too sure what this option needs as a value but the man page suggests >> that the keywork "current" should work. >> >> ... >> cannot create ''fibre00'': bad numeric value ''current'' >> >> The keyword current is not numeric and causes an issue. The zpool(1M) >> manpage is not clear on this and, I really don''t know if quotes would help >> here. >> >> In zpool(1M) section Properties we see : >> >> version=version >> >> The current on-disk version of the pool. This can be >> increased, but never decreased. The preferred method of >> updating pools is with the "zpool upgrade" command, >> though this property can be used when a specific version >> is needed for backwards compatibility. This property >> can be any number between 1 and the current version >> reported by "zpool upgrade -v". The special value >> "current" is an alias for the latest supported version. > That last sentence is incorrect. The zpool command does not support > "current" as an alias for the last supported version.This evaluation is not completely correct. The zpool command does allow the on-disk version of the root dataset to be set to current using the -O option: # zpool create -O version=current pool /tmp/pool # zfs get version pool NAME PROPERTY VALUE SOURCE pool version 3 - But the zpool command does not also allow the on-disk version of the pool to be set to current: # zpool create -o version=current pool /tmp/pool cannot create ''pool'': bad numeric value ''current'' -- Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090305/fdd7b9d0/attachment.html>