ablog

不器用で落着きのない技術者のメモ

raw デバイス数の上限

raw デバイス数の上限は 256 という話を聞いたので調べてみました。
デフォルトは 256 で変更するにはカーネルコンパイルし直す必要がありそうですね。

The maximum number of RAW devices that are supported. Default is 256. Increase this number in case you need lots of raw devices.

Linux Kernel Driver DataBase: CONFIG_MAX_RAW_DEVS: Maximum number of RAW devices to support (1-8192)

linux/arch/um/Kconfig.char

158 config MAX_RAW_DEVS
159        int "Maximum number of RAW devices to support (1-8192)"
160        depends on RAW_DRIVER
161        default "256"
162        help
163          The maximum number of RAW devices that are supported.
164          Default is 256. Increase this number in case you need lots of
165          raw devices.
LXR linux/arch/um/Kconfig.char


追記(2010/11/26):
いまどきは上限は 256 ではなくなっているみたいですね。

SLES9/SLES10における最大RAWデバイス数は以下の通りです。

バージョン SLES9SP2以前 SLES9 SP3 SLES10 RHEL4.5
最大RAWデバイス数(*) 255個 4096個 4096個 8192個
Linux on Power Systems JPN

*)実際にRAWデバイスとしてバインドできるのは表内の数マイナス1個まで。rawctlがデバイス番号を1つ使用しているからだと思われる。