start

ZFS on LinuxにRAID-Z Expansionのパッチが登場してた

表題の通り、ZoLにRAID-Z Expansionのパッチがコミットされていた→[WIP] raidz expansion, alpha preview 1 by ahrens · Pull Request #8853 · zfsonlinux/zfs · GitHub

まだα版ながらRAID-Z Expansionしたプールのimport/export、expansionのバックグランド実行等、基本的には動いているものの、不具合が発生した時はデータ消失の危険や、ディスクフォーマットは最終リリースとは異なるためテスト用とのこと。試される方は自己責任でオナシャス。

システムフォントをNotoにしてるとVisual Studio 2013がインストールできない件

Windows 10のシステムフォントを書き換えてNoto Sans CJKにしてるとVisual Studio 2013がインストール出来ないっぽい。

インストーラであるvs_community.exeを実行すると、画面中央に「Visual Studio」ロゴが表示された後、お馴染みの縦長インストーラUIが出るんだけれども、ただの真っ黒ウィンドウで1分程すると勝手に終了してしまう。

プロパティから「互換モードでこのプログラムを実行する」にチェックを入れて起動すると、画面は正しく出るものの今度は互換性エンジンが云々でインストールが出来ない。これは既知の問題というか、そういう仕様っぽいのである意味正常。

%TEMP%に作られるインストーラのログ(dd_vs_community_日付.logってファイル)を見たら
「[4F88:2824][2019-08-17T11:40:29]e000: MUX: ERROR: 'file:///C:/WINDOWS/FONTS/NotoSansCJKjp-Regular.otf' ファイルは、予測されるファイル形式の仕様に準拠していません。」
という怪しげな一文が…!当該箇所のログ全文は↓の通り。どう見てもフォントのインスタンスを作ってるっぽい所で落ちてる。

[4F88:2824][2019-08-17T11:40:29]e000: MUX:  ERROR: 'file:///C:/WINDOWS/FONTS/NotoSansCJKjp-Regular.otf' ファイルは、予測されるファイル形式の仕様に準拠していません。
[4F88:2824][2019-08-17T11:40:29]e000: MUX:  Stack:    場所 Adobe.CffRasterizer.OTFRasterizer.MapErrorCode(AdobeErrorCode error)
   場所 Adobe.CffRasterizer.OTFRasterizer.NewFont(UnmanagedMemoryStream fontFileStream, Uri sourceUri, Int32 faceIndex)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadCFFMetrics(FontFaceLayoutInfo cache, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadGlyfMetrics(FontFaceLayoutInfo cache, UInt16 indexToLocFormat, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadAdvances(FontFaceLayoutInfo cache, CheckedPointer hmtxTable, UInt16 numberOfMetrics, UInt16 indexToLocFormat, UInt16 typoAscent, UInt16 typoDescent)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.GetLayoutFontFaceInfo(FontFaceLayoutInfo cache)
   場所 MS.Internal.FontCache.FontFaceLayoutInfo.MS.Internal.FontCache.IFontCacheElement.AddToCache(CheckedPointer newPointer, ElementCacher cacher)
   場所 MS.Internal.FontCache.HashTable.Lookup(IFontCacheElement e, Boolean add)
   場所 MS.Internal.FontCache.CacheManager.Lookup(IFontCacheElement e)
   場所 System.Windows.Media.GlyphTypeface.Initialize(Uri typefaceSource, StyleSimulations styleSimulations, Boolean fromPublic)
   場所 MS.Internal.FontCache.CachedFontFace.CreateGlyphTypeface()
   場所 MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch)
   場所 MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch)
   場所 System.Windows.Media.Typeface.ConstructCachedTypeface()
   場所 System.Windows.Media.Typeface.get_CachedTypeface()
   場所 System.Windows.Media.Typeface.CheckFastPathNominalGlyphs(CharacterBufferRange charBufferRange, Double emSize, Double widthMax, Boolean keepAWord, Boolean numberSubstitution, CultureInfo cultureInfo, Int32& stringLengthFit)
   場所 MS.Internal.TextFormatting.SimpleRun.CreateSimpleTextRun(CharacterBufferRange charBufferRange, TextRun textRun, TextFormatterImp formatter, Int32 widthLeft, Boolean emergencyWrap)
   場所 MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, CharacterBufferRange charString, TextRun textRun, Int32 runLength, Int32 widthLeft)
   場所 MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, Int32 cp, Int32 cpFirst, Int32 widthLeft, Int32 widthMax)
   場所 MS.Internal.TextFormatting.SimpleTextLine.Create(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth)
   場所 MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   場所 MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   場所 System.Windows.Controls.TextBlock.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   場所 System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   場所 System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Border.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Control.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   場所 System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.ContextLayoutManager.UpdateLayout()
   場所 System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   場所 System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   場所 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   場所 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   場所 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.DispatcherOperation.InvokeImpl()
   場所 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   場所 System.Threading.ExecutionContext.runTryCode(Object userData)
   場所 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   場所 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Windows.Threading.DispatcherOperation.Invoke()
   場所 System.Windows.Threading.Dispatcher.ProcessQueue()
   場所 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   場所 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   場所 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   場所 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   場所 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   場所 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   場所 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   場所 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   場所 System.Windows.Threading.Dispatcher.Run()
   場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.RunUI(ViewModelCommonUi viewModel)
   場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.InternalRun()
   場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.Run()
   場所 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Threading.ThreadHelper.ThreadStart()

まさかと思ってシステムフォントを標準のYu Gothic UIに戻してみたら無事インストーラが立ち上がった。マジかよーって感じ。

確認してないけど、Notoの問題ってよりシステムフォントにOTF指定したのが不味いのかも?とりあえず無事インスコ出来てよかった。



FreeBSD PortsにFlavorsなる仕組みが出来てた

graphics/pecl-imagickをインストールしようとFreshPortsでportの情報見てたら、“Package flavors”なる項目があるのに気付いた。

ハンドブックによれば、Flavorsとは1つのportに複数のバリエーションを持たせる方法とのこと。多くの機能といくらかのパッケージ依存関係を持つノーマルバージョンと、最低限の機能と依存関係しかない軽量バージョンの2つのFlavorをportに持たせるとか、GUIツールキット毎にFlavorを分けるとか、そういう使い方を想定しているようだ。

2017-11-30にリリースされた仕組みで、どうやらPythonモジュール関連portsの整理かなんかで導入された雰囲気(一次情報を追ったわけではないので当てずっぽう。同日にpy36-*のportsは全てFlavor化されpy-*に統合されている)。

件のpecl-imagickについて言えば、php71/php72/php73とPHPのバージョンごとにFlavorが用意されている(2019-08-15現在)。Flavorの有無はそれぞれのportのディレクトリでmake pretty-flavors-package-namesとすると確認できる。

$ cd /usr/ports/graphics/pecl-imagick
$ make pretty-flavors-package-names
php73: php73-pecl-imagick-3.4.4
php71: php71-pecl-imagick-3.4.4
php72: php72-pecl-imagick-3.4.4

Flavorの指定はmakeでFLAVOR変数に渡せばおk。

# make FLAVOR=php73

これはなかなか便利ですな。

以前は、lang/php71を使いたいのにPECL拡張モジュールのportはPHP 5.6向けになってて、PHP 7.1用には自前でpeclコマンド叩いて入れなきゃならないって事があったけど、Flavor使えばports/packagesにおんぶにだっこできて楽チン。

あ、書いてて思い出したけど、Flavor付きのportはFlavorごとにpackageが分かれる点は留意の必要あり。上のコマンド例で分かる通り、php73フレーバーでpecl-imagickをインストールした場合、パッケージ名はphp73-pecl-imagickとなる。

FreeBSDのMariaDBでリモートクライアントからの接続を許可する

A5:SQL Mk-2を使って、実家からVPN経由で自宅鯖のMariaDBにアクセスしようとしたら「Access denied for user'xxxx'」と言われて繋がらなかった。デフォルトでは自ホストのクライアントからの接続しか許可してないらしいので、リモートクライアントからの接続を許可してみたメモ。丁寧なhttps://mariadb.com/kb/en/library/training-tutorials/basic-mariadb-articles/configuring-mariadb-for-remote-client-access/公式ドキュメントが用意されてるので、その通りに進めていくだけですけどね。

'my.cnf[mysqld]''セクションに以下の2行を追加する。

[mysqld]
skip-networking=0
skip-bind-address

ユーザーにリモート接続の権限を付加する。許可するホストとパスワードを追加してるっぽいので、接続元ごとにパスワードを変えられるっぽい?

GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.16.%' IDENTIFIED BY 'new-password' WITH GRANT OPTION;

こんな感じで追加されてればおk。

> SELECT user,host FROM mysql.user;
+--------------+-----------+
| user         | host      |
+--------------+-----------+
| root         | 127.0.0.1 |
| root         | 172.16.%  | ←これ



FreeBSDのZFS実装がZFS on Linuxベースに変更されるらしい

2021-01-28現在、ZFS on LinuxはOpenZFSと名前を変え2.0.1がリリース済みである。

FreeBSDの移行作業も着々と進んでおり、13-RELEASEでは新生OpenZFSベースとなるのがほぼ確実といったところ。

昨年末の話題ではあるけど、将来的にFreeBSDのZFSシステムがZFS on Linuxベースに変更されるらしい。メーリングリストを読む限り、Delphix社がZFS開発の軸をZFS on Linux(以下ZoLと表記)に移したことが発端となっているようだ。

これまで、OpenZFSの盟主たるDelphix社1)は、illumosからフォークした自社のDelphix OS用にZFSを改良し、それがOpenZFSに取り込まれてきた。現在のFreeBSDのZFS実装はillumosのコードがベースとなっており、FreeBSD用に多数のifdefを加えたものだそうだ。illumosという共通の祖先を持っていたからこそ、Delphixの改良がFreeBSDに取り込めてきたというわけだ。

ところが、前述の通りDelphixがZoLに移行したことで、illumosベースのZFS実装の改修が止まってしまった。現状、ZoLで行われた修正のillumosへのバックポートは全く行われていないそうである。ZoLの主要開発者であるBrian Behlendorfが、ZoLへのFreeBSD直接サポートの追加を薦めてくれたこともあり、ひとまずZoLをベースとしたZFS on FreeBSDプロジェクト、通称ZoFが立ち上がったという経緯のようだ。将来的にはZoLとZoFで1つのコードベースを共有するかもしれないとのこと。

ZoFの実装とテストはiX Systemsが主体となって行われており、既に殆ど問題なく動いているようだ。illumosの実装─界隈ではLegacy ZFSと呼ばれている─と比較してパフォーマンスも向上している模様。2019年3月1日にsysutils/zolとしてportsツリーに取り込まれ、2019年6月10日にはsysutils/openzfsへと名称変更されている。12.0-RELEASEのportsツリーにも取り込まれていることから、完成度の高さが伺える。FreeBSD 13の前にはillumosベースのZFSソースコードは削除されるだろうとのこと。


1)
自分が勝手にそう思ってるだけ
  • start.txt
  • 最終更新: 2022-07-27 15:26
  • by Decomo