SD

Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Þ´º¾ó (4)
Updated: 1992³â 12¿ù 17ÀÏ ¸ñ¿äÀÏ 10:15:53
Index
Return to Main Contents
 

À̸§

sd - ½ºÄ«½Ãµð½ºÅ© µå¶óÀ̹öÀÌ´Ù.  

»ç¿ë¹ý

#include <linux/hdreg.h> /* for HDIO_GETGEO */ #include <linux/fs.h> /* for BLKGETSIZE and BLKRRPART */  

CONFIG

ºí·ÏÀåÄ¡¸íÀº ´ÙÀ½°ú °°Àº ÇüÅÂÀÌ´Ù: sdlp, where l ÀÌ ¹°¸®Àûµå¶óÀ̺긦 Ç¥½ÃÇÏ´Â ¹®ÀÚÀÌ°í, p °¡ ¹°¸®Àûµå¶óÀ̺êÀÇ ÆÄƼ¼ÇÀ» Ç¥½ÃÇÏ´Â ¼ýÀÚÀÌ´Ù. ½ºÄ«½Ãµð½ºÅ©´Â ¸ÞÀÌÀúÀåÄ¡¹øÈ£ 8¹øÀÌ°í, ¸¶À̳ÊÀåÄ¡¹øÈ£SCSI disks have a major device number of 8, and a minor device number of the form (16 * drive_number) + partition_number, where drive_number is the number of the physical drive in order of detection, and partition_number is as follows:

ÆÄƼ¼Ç 0Àº ¸ðµç µå¶óÀ̺êÀÌ´Ù.
ÆÄƼ¼Ç 1¿¡¼­ 4´Â µµ½º"ÇÁ¶óÀ̸Ӹ®"ÆÄƼ¼ÇÀÌ´Ù.
ÆÄƼ¼Ç 5¿¡¼­ 8Àº µµ½º "È®Àå(ȤÀº "³í¸®")" ÆÄƼ¼ÇÀÌ´Ù. ¿¹¸¦ µé¸é, /dev/sda ´Â ¸ÞÀÌÀú 8°ú, ¸¶ÀÌ³Ê 0À» °®°ÔµÇ°í, ½Ã½ºÅÛÀÇ ¸ðµç ½ºÄ«½Ãµå¶óÀ̺ê¿Í °ü·ÃµÉ °ÍÀÌ´Ù; ±×¸®°í /dev/sdb3 ´Â ¸ÞÀÌÀú 8°ú ¸¶ÀÌ³Ê 19¸¦ °®°ÔµÇ°í, ½Ã½ºÅÛÀÇ µÎ¹ø° ½ºÄ«½Ã µå¶óÀ̺ê»óÀÇ ¼¼¹ø° µµ½º"ÇÁ¶óÀ̸Ӹ®"ÆÄƼ¼Ç°ú °ü·ÃµÉ °ÍÀÌ´Ù. À̶§, ºí·Ï ÀåÄ¡°¡ Á¦°øµÈ´Ù. RawÀåÄ¡´Â ¾ÆÁ÷ ±¸ÇöµÇÁö ¾Ê¾Ò´Ù.  

¼³¸í

iotcl's´Â ¾Æ·¡¿Í °°ÀÌ Á¦°øµÈ´Ù:
HDIO_GETGEO
´Â ¾Æ·¡ ±¸Á¶ÀÎ ¹ÙÀÌ¿À½º µð½ºÅ© ¸Å°³º¯¼ö¸¦ ¹ÝȯÇÑ´Ù:
struct hd_geometry {
      unsigned char heads;
      unsigned char sectors;
      unsigned short cylinders;
      unsigned long start;
};
ÀÌ ±¸Á¶¿¡¼­ Æ÷ÀÎÅÍ´Â ioctl(2) ¸Å°³º¯¼ö¿¡ ÀÇÇØ Àü´ÞµÈ´Ù. ¸Å°³º¯¼öÀÇ Á¤º¸´Â µð½ºÅ© µµ½º¿¡ ÀÇÇØ ÀÌÇصǴ µå¶óÀ̺êÀÇ µð½ºÅ©±¸¼ºµµÀÌ´Ù. ÀÌ ±¸¼ºµµ´Â µå¶óÀ̺êÀÇ ¹°¸®ÀûÀÎ ±¸¼ºµµ´Â ¾Æ´Ï´Ù. ±×°ÍÀº µå¶óÀ̹öÀÇ ÆÄƼ¼Ç Å×À̺íÀ» ±¸¼ºÇÒ¶§ »ç¿ëµÇÁö¸¸, fdisk(1),efdisk(1), and lilo(1) ÀÇ ¿ëÀÌÇÑ ½ÇÇàÀ» À§ÇØ ÇÊ¿äÇÏ´Ù. ±¸¼ºµµ Á¤º¸°¡ À¯È¿ÇÏÁö ¾Ê´Ù¸é, ¸ðµç ¸Å°³º¯¼ö¸¦ À§ÇØ 0ÀÌ ¹ÝȯµÉ °ÍÀÌ´Ù.
BLKGETSIZE
¼½ÅÍÀÇ ÀåÄ¡Å©±â¸¦ ¹ÝȯÇÑ´Ù. ioctl(2) ¸Å°³º¯¼ö´Â longÀ» Æ÷ÀÎÅÍÇÑ´Ù.
BLKRRPART
½ºÄ«½Ãµð½ºÅ© ÆÄƼ¼Ç Å×À̺íÀÇ ´Ù½ÃÀб⸦ °­Á¦ÇÑ´Ù. ¾î¶² ¸Å°³º¯¼öµµ ÇÊ¿äÇÏÁö ¾Ê´Ù. scsi(4) ioctls´Â ¶ÇÇÑ Áö¿øµÈ´Ù. ioctl(2) ¸Å°³º¯¼ö°¡ ¿ä±¸µÇ°í, ³ÎÀ̸é ioctl(2) ´Â -EINVAL¸¦ ¹ÝȯÇÑ´Ù.
 

ÆÄÀÏ

/dev/sd[a-h]: ¸ðµç ÀåÄ¡
/dev/sd[a-h][0-8]: °³º° ºí·Ï ÆÄƼ¼Ç  

°ü·Ã Ç׸ñ

scsi(4)


 

Index

À̸§
»ç¿ë¹ý
CONFIG
¼³¸í
ÆÄÀÏ
°ü·Ã Ç׸ñ

This document was created by man2html, using the manual pages.
Time: 08:07:01 GMT, March 25, 2004