録画サーバーがおかしくなった

先頃構築しなおした録画サーバーがおかしくなった。
どのようにおかしくなったかというと、地上波、BS共に4chあるのに、同時録画の本数が2本とか3本しか成功しない状況に。

とりあえず原因を突き詰めていくと、どうも再起動時にDVBドライバのデバイスがどうも番号ずれを起こすようになった模様。
dmesgコマンドで見てみると次のような感じ。ドライバ、PCIデバイスのアドレス、ドライバの番号の順で表示させている。

# dmesg | grep DVB | grep frontend | awk '{print $3, $4, $8, $13}'| sort
earth-pt1 0000:03:02.0: 0 ISDB-S
earth-pt1 0000:03:02.0: 1 ISDB-T
earth-pt1 0000:03:02.0: 3 ISDB-T
earth-pt1 0000:03:02.0: 4 ISDB-S
earth_pt3 0000:05:00.0: 2 ISDB-S
earth_pt3 0000:05:00.0: 5 ISDB-T
earth_pt3 0000:05:00.0: 6 ISDB-S
earth_pt3 0000:05:00.0: 7 ISDB-T

以前似たようなことがあった時にmodprobeの設定でどうにかした覚えがあったので、ググって以下を設定。

# cat /etc/modprobe.d/dvb_options.conf
options earth_pt1 adapter_nr=0,1,2,3
options earth_pt3 adapter_nr=4,5,6,7

これでPT2とPT3とで番号が入れ子にならないはず…
再起動して確認。

# dmesg | grep DVB | grep frontend | awk '{print $3, $4, $8, $13}'| sort
earth-pt1 0000:03:02.0: 0 ISDB-S
earth-pt1 0000:03:02.0: 1 ISDB-T
earth-pt1 0000:03:02.0: 2 ISDB-S
earth-pt1 0000:03:02.0: 3 ISDB-T
earth_pt3 0000:05:00.0: 4 ISDB-S
earth_pt3 0000:05:00.0: 5 ISDB-T
earth_pt3 0000:05:00.0: 6 ISDB-S
earth_pt3 0000:05:00.0: 7 ISDB-T

無事番号の入れ子が解消。
何度か再起動しても大丈夫だったので、これで設定確定させて、Mirakurunの設定で、違っているところも直して取り急ぎおしまい。

さてまたしばらく様子見だ。

参考

dvbデバイスを使用するLinux用チューナーアプリケーション
https://github.com/AngieKawai-4649/recdvb