创建ASE选择裸设备还是文件系统

How to Choose Between Raw Partitions and UNIX Files

A raw partition on a UNIX system is a part of the disk where there is no file system. Although Adaptive Server can use UNIX files for database devices, Sybase strongly recommends that UNIX files only be used if the buffer cache is disabled for writes to the files. For any database device that is running on a UNIX file, you should disallow the use of buffer cache for writes by running the sp_deviceattr stored procedure and setting the dsync option to true.

For example, to ensure that you disallow the use of buffer cache for writes to the database device datadev1, run the following command:

1> sp_deviceattr datadev1, dsync, true
2> go

NoteThe ability to disallow the use of buffered writes to UNIX files by setting dsync option to true was first introduced in Adaptive Server version 12.0. In pre-12.0 servers, there is no way to avoid the use of buffer cache for writes on database devices placed on UNIX files. For this reason, Sybase strongly recommends that only raw partitions be used as database devices on any installation running a pre-12.0 version of Adaptive Server.

Most UNIX systems use a buffer cache for disk I/O. Writes to disk are stored in the buffer and may not be written to disk immediately. If Adaptive Server completes a transaction and sends the result to a UNIX file, the transaction is considered complete even though the UNIX buffer cache may not have been written to disk. If the system crashes before this buffer cache is written, you lose data. In this situation, Adaptive Server has no way of knowing that the write to disk eventually failed, and the transaction is not rolled back. In addition, some UNIX operating systems do partial writes. In that case, if the system crashes, the Sybase device will be corrupted.

Using raw partitions for Sybase devices allows Adaptive Server to process its own I/O requests, without having to go through the UNIX buffering scheme. In this way, Adaptive Server knows exactly what portions of a transaction completed or failed in the event of a system crash. If Sybase devices use UNIX files, corruption could occur.

Refer to the Adaptive Server installation and configuration guides or your operating system documentation for more information.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值