Hi!

Ok, I will add a special 'raw' keyword to 3.23.40, like:

innodb_data_file_path = hdd1:2000Mraw

Then it is enough that the raw disk partition is bigger than
2000 x 1024 x 1024 bytes. InnoDB will only use the specified
amount of the partition from the low end, and will also skip the
size check at startup.

Peter, if you compile yourself, you can just try commenting out
the size check on about line 367 of mysql/innobase/srv/srv0start.c

Your disk partition should just be bigger than the size
(1M = 1024 x 1024 bytes) you specify in innodb_file_path.

What happens now?

Regards,

Heikki
http://www.innodb.com

-----Original Message-----
From: Peter Duffy <[EMAIL PROTECTED]>
To: Heikki Tuuri <[EMAIL PROTECTED]>
Date: Tuesday, July 17, 2001 8:27 PM
Subject: Re: innodb and raw disks


>Hi Heikki,
>
>You mean lseek? As far as I'm aware, fseek doesn't report the file size?
>(the code that I've been looking at in os0file.c definitely uses lseek.)
>
>Using the current disk, I can't make a partition which is *precisely* a
>multiple of 1M - the cylinder geometry doesn't allow it (correct me if
>I'm wrong, someone! I'm using fdisk, and if I specify 100M, I get 104391
>blocks.) Does it have to be a multiple of 1M to satisfy the
>size-checking?
>
>I wrote a little program to experiment with lseek in isolation: it
>reports 0 bytes for both /dev/hdd and /dev/hdd1 (whatever size I make
>the latter.) I also tried mapping /dev/raw/raw1 over /dev/hdd1: the
>program still gives 0 bytes. (As a control, I tested the program against
>some regular files: for these, it reports the correct sizes.)
>
>Is it likely to make any difference if I put a BSD disklabel on
>/dev/hdd1? (I'm not even sure I can do that in an x86 environment: fdisk
>understands disklabels, but doesn't appear to be able to create them.)
>
>Rather than disable the file size check, would it be possible to check
>the file type, and for block devices substitute some other check?
>(Currently not sure what:  maybe look up the device in
>/proc/partitions?)
>
>Regards,
>Peter
>
>
>Heikki Tuuri wrote:
>>
>> Hi!
>>
>> You should make an unformatted partition whose size is
>> divisible by 1 MB. If fseek does not understand the partition size,
>> we can disable the size check from InnoDB code.
>>
>> Please report if you succeed. If not, I change InnoDB-3.23.40
>> so that you can disable the file size check.
>>
>> I haver not tested raw disks on Unix. Other problems may also
>> arise. For example, what does Linux do if fsync is called on
>> a raw disk partition? I hope Linux ignores such OS calls.
>>
>> Regards,
>>
>> Heikki
>> http://www.innodb.com
>>
>> Copied message:
>> .........................
>> fdisk /dev/hdd and set up partition 1.Then try using hdd1.
>>
>> Peter Duffy wrote:
>> > Hi,
>> >
>> > In the InnoDB section of the MySQL manual, it mentions that InnoDB can
>> > be used with raw disks, rather than data files. I've been trying to get
>> > this to work under Linux (RedHat 6.2), but so far without success.
>> >
>> > I installed a new slave disk on the second IDE bus, brought up the
>> > system and verified that the disk was available and partitionable at
>> > /dev/hdd. Then, in /etc/my.cnf, I pointed innodb_data_home_dir and
>> > innodb_data_file_path at /dev/hdd, with a size calculated from the
>> > autodetected values as reported in /var/log/messages. I then started
>> > mysql: it reported that the given size was not the same as the actual
>> > file size for /dev/hdd, and ended. I delved into the code and ran a few
>> > experiments: the problem appears to be that the code uses the lseek
>> > system call to determine the file size, and this reports 0 for the
>> > /dev/hdd device special file.
>> >
>> > I tried using a raw device grafted onto the /dev/hdd device, but same
>> > result.
>> >
>> > Has anyone else tried this under Linux and, if so, have they got it to
>> > work? (If not, do we have a route towards getting it to work?)
>> >
>> > ---------------------------------------------------------------------
>> > Before posting, please check:
>> >    http://www.mysql.com/manual.php   (the manual)
>> >    http://lists.mysql.com/           (the list archive)>
>> > To request this thread, e-mail <[EMAIL PROTECTED]>
>> > To unsubscribe, e-mail
>> <[EMAIL PROTECTED]>
>> > Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php--
>> Gerald L. [EMAIL PROTECTED]
>>
>> ---------------------------------------------------------------------
>> Before posting, please check:
>>    http://www.mysql.com/manual.php   (the manual)
>>    http://lists.mysql.com/           (the list archive)
>>
>> To request this thread, e-mail <[EMAIL PROTECTED]>
>> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
>> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to