| Bug #68860 | innodb raw device | ||
|---|---|---|---|
| Submitted: | 3 Apr 2013 20:20 | Modified: | 5 Apr 2013 18:18 |
| Reporter: | woonhak kang | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
| Version: | 5.6.10 | OS: | Linux (Ubuntu 12.04) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | innodb, raw, raw device | ||
[5 Apr 2013 18:18]
MySQL Verification Team
Please, follow the instructions precisely as in our manual: When you create a new data file, put the keyword newraw immediately after the data file size in innodb_data_file_path. The partition must be at least as large as the size that you specify. Note that 1MB in InnoDB is 1024 × 1024 bytes, whereas 1MB in disk specifications usually means 1,000,000 bytes.

Description: When I use raw device storage in innodb, we simply add 'raw' like following lines in config file. innodb_data_home_dir= innodb_data_file_path=/dev/sdb2:10Graw However, innodb includes in MySQL 5.6.10, open_or_create_data_files() function check data file path is regular file or not. Especially srv_file_check_mode(), it deosn't check current file is raw and return fail because the path is not a regular file. (because it is device file, S_ISREG() reutn false) Therefore, I think that we should check current file is device file and raw device is set in config file. Then return true. How to repeat: set 'raw' symbol end of innodb_data_file_path. It return OS_FILE_TYPE_UNKNOWN, because the file is special file. Suggested fix: change os_file_get_status() to chceck current setting is raw and the path is device file. currently, I change it like following lines. (only check current file is blk device handle this is regular file) ---------------------------- } else if (S_ISREG(statinfo.st_mode)) { -> } else if (S_ISREG(statinfo.st_mode) || S_ISBLK(statinfo.st_mode) ) {