50개의 USB 플래시 드라이브가 있다고 가정해 보겠습니다.
나는 그들이 /dev/sda
그럴 것이라고 생각한다 /dev/sdz
. 다음에 무슨 일이 일어나나요 /dev/sdz
?
답변1
, 등 으로 이동합니다 /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.
*/
https://github.com/torvalds/linux/blob/master/drivers/scsi/sd.c#L3303-L3324