-----Original Message----- From: Smith, Albert [mailto:Albert.Smith@xxxxxxxxxxxxxxxxx] Sent: Wednesday, September 21, 2005 2:54 PM To: General Red Hat Linux discussion list Subject: RE: LVM Question > -----Original Message----- > From: redhat-list-bounces@xxxxxxxxxx > [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Allen, Jack > Sent: Wednesday, September 21, 2005 2:36 PM > To: 'General Red Hat Linux discussion list' > Subject: RE: LVM Question > > > > -----Original Message----- > From: Smith, Albert [mailto:Albert.Smith@xxxxxxxxxxxxxxxxx] > Sent: Wednesday, September 21, 2005 11:04 AM > To: General Red Hat Linux discussion list > Subject: RE: LVM Question > > > > -----Original Message----- > > From: redhat-list-bounces@xxxxxxxxxx > > [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Allen, Jack > > Sent: Tuesday, September 20, 2005 6:18 PM > > To: 'Redhat-list@xxxxxxxxxx' > > Subject: LVM Question > > > > I have a system connected to a SAN via Fibre Channel > > interface. > > The system sees 3 disk sdb, sdc and sdd. I put them in a > > volume group and then allocated some logical volumes. If I > > use the logical volume to read and write to directly for my > > application, if there is an error on a write, I assume the > > write system call will return an error. Or does the write > > give a good return value after putting the data in some > > system buffer to be written later? Then is the write of the > > system buffer fails later, my program would not know. > > > > Thanks: > > Jack Allen > > > > -- > > redhat-list mailing list > > unsubscribe > mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe > > https://www.redhat.com/mailman/listinfo/redhat-list > > > > > > It sounds like you want to write directly to the raw lvol and not to a > cooked filesystem. Is this correct?. If that's the case I would make > sure you have async. I/O (AIO) enabled and installed this is usually > managed by the kernel. If there is a write failure to the raw lvol a > message should be dumped to the console and to your messages > file also. > > > Albert Smith > Sr. Unix Systems Administrator > HPCSA, RHCT > Genex Services > 440 E. Swedesford Rd. > Wayne, PA 19087 > albert.smith@xxxxxxxxxxxxxxxxx > (610) 964-5154 > > ================ > Correct I want to read and write directly to the logical > volume, there will > be NO file system. I need the application to block on the > write until the > data is truly on the disk. Therefore I don't see how async > I/O will help. I > had opened the logical volume, which is a block device as > /dev/vg00/data.vol > using the O_SYNC option. The application was running and not > reporting any > errors, but the messages file had lots of SCSI errors. When > the data was > checked some things had not got written to the disk, the SCSI > errors. But > again the return value form the write system call indicated > there were no > problems. > > Thanks: > Jack Allen > > -- > redhat-list mailing list > unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/redhat-list > > Most applications that write directly to a raw filesystem (Oracle, Sybase, MySQL) require AIO in order to operate efficently. What AIO does is it reduces the need for IO Concurrency (reads/writes and seeks) which most database applications require when writing to a raw filesystem and it allows the lvol to run and accept at higher throughputs. [Jack Allen] AIO allows you to do writes and not wait on them and later get an indication of the success or failure. My application is written where it wants to know that one write has completed before it allows other writes to take place. One reason you might be having SCSI related error's is that the Database or application you are using as AIO enabled but the system may not be running it. [Jack Allen] I know the application is not using AIO. However if AIO is configuraed and running via the kernel and you continue to get SCSI errors it is most likely indicating a hardware failure either fibre/scsi card or a problem with your lun configuration on your SAN. [Jack Allen] I know the SCSI errors war due to hardware. But the application did not get any error indication because the writes it does are copied to system cache buffers and then written at a later time. Therefore the application thinks every thing is OK, but yet the data did not really get written to the disk. The logical volume was opened with the O_SYNC option, but from what I am find out does not work the same on a block device as it does on a regular file. Looks like I will have to add a call for fsync(fd) after each write to make sure it gets to the disk. Albert Smith Sr. Unix Systems Administrator HPCSA, RHCT Genex Services 440 E. Swedesford Rd. Wayne, PA 19087 albert.smith@xxxxxxxxxxxxxxxxx (610) 964-5154 -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list