当 Linux 驱动器字母用完时会发生什么?

DEK*_*KER 36 linux filesystems udev mount devices

让\xe2\x80\x99s 说我有 50 个 USB 闪存驱动器。

\n

我想他们一定会/dev/sda/dev/sdz。之后会发生什么/dev/sdz

\n

jes*_*e_b 61

它将转到/dev/sdaa/dev/sdab/dev/sdac等。

这是源代码中的注释:

/**
 *  sd_format_disk_name - format disk name
 *  @prefix: name prefix - ie. "sd" for SCSI disks
 *  @index: index of the disk to format name for
 *  @buf: output buffer
 *  @buflen: length of the output buffer
 *
 *  SCSI disk names starts at sda.  The 26th device is sdz and the
 *  27th is sdaa.  The last one for two lettered suffix is sdzz
 *  which is followed by sdaaa.
 *
 *  This is basically 26 base counting with one extra 'nil' entry
 *  at the beginning from the second digit on and can be
 *  determined using similar method as 26 base conversion with the
 *  index shifted -1 after each digit is computed.
 *
 *  CONTEXT:
 *  Don't care.
 *
 *  RETURNS:
 *  0 on success, -errno on failure.
 */
Run Code Online (Sandbox Code Playgroud)

https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c#L3303-L3324

  • 我想知道需要连接多少个 SCSI 设备才能到达 [`/dev/sdeignously`](https://www.collinsdictionary.com/us/dictionary/english/sdeignously)? (7认同)
  • @Tom你必须连接2061986601个设备(https://tenderleo.gitbooks.io/leetcode-solutions-/content/GoogleEasy/171.html) (7认同)
  • @user253751 我的 en-US 单词列表(~275k 条目)中以“sd”开头的最长单词。 (7认同)
  • @user253751,有人推测是因为这是第一个以“sd”开头且其中包含“full”的英语单词。 (4认同)
  • @Tom 为什么要故意? (3认同)
  • https://www.collinsdictionary.com/dictionary/english/sdeignously 说“‘distainously’已过时” (2认同)