Using Raw Disk I/O
There are three ways in which a program might access disk in raw mode:
- Block raw-disk-device special files have names of the form /dev/hdiskn, and are used by some subsystems. These devices should not be used by application programs.
- Character raw-disk-device special files have names of the form /dev/rhdiskn. Use of these devices by application programs is not recommended. If you decide to use this technique, make sure that no AIX logical volumes occupy any part of the physical disk drive being accessed. The performance effect of interaction between raw access and file-system access to the same physical drive is unpredictable. Make sure you do not overwrite the first 512 bytes of the disk since that is where the physical volume ID is stored.
- A logical volume on which no file system has been created can be accessed in raw mode. All writes, reads, lseeks, etc. must be in multiples of 512 bytes. The least important consequence of violating this rule is serious performance degradation.
阅读(820) | 评论(0) | 转发(0) |