[linux-lvm] Directly using a logical volume

Allen, Jack Jack.Allen at McKesson.com
Wed Sep 21 17:23:40 UTC 2005

-----Original Message-----
From: Lars Ellenberg [mailto:Lars.Ellenberg at linbit.com] 
Sent: Wednesday, September 21, 2005 8:58 AM
To: linux-lvm at redhat.com
Subject: Re: [linux-lvm] Directly using a logical volume

/ 2005-09-20 16:14:25 -0400
\ Allen, Jack:
>         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.

not exactly a linux-lvm question, is it?

man 2 write
man 2 fsync
man 3 open       (O_SYNC)

: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :


I have read the man pages and that would be "man 2 open". The O_SYNC seems
to only work for a regular file not a block device as the logical volume is.
This was part of the reason for my questions. On UNIX systems we use the
character device name and the O_SYNC does what you think it would there. I
know this is Linux and some things are different. Again the reason for my
questions. And yes it could be a linux-lvm question if the block device
presented by LVM works differently than a true SCSI block device. Again the
reason for the questions.

	Jack Allen

More information about the linux-lvm mailing list