- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cannot write chunk less than 1024 bytes into r...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:23 AM
тАО07-07-2004 05:23 AM
cannot write chunk less than 1024 bytes into raw veritas volume
If I try to write 256 or 512 bytes at a time wtite call returns EINVAL.
write(4, 0x7b040770, 512) ....... ERR#22 EINVAL
Before startting to write program skips 1024 bytes from the start of raw device.
I've read that it is possible to write into raw device with up to 256 bytes granularity.
But this definitely does not work on HP.
Does nayone know reason why I cannot write 512 bytes chunk into raw device?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 05:38 AM
тАО07-07-2004 05:38 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
I would expect that it's because the LVM block size is 1K. Even though it's a raw volume, it's *still* an LVM controlled device & is an LV in a VG. It just has no filesystem on it.
I suspect you'll have to pad the writes up to the 1K boundary.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 06:00 AM
тАО07-07-2004 06:00 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
I have been trying to remember but could not recall seeing it anyware...
Probably my memory is not good :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2004 06:15 AM
тАО07-07-2004 06:15 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 03:03 AM
тАО07-08-2004 03:03 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
You definitely got the answer. I lass than 10 points only because further tests showed that part of your reply does not seem correct.
After I have read disk and scsi_disc I have tested a small program which appears in disk 7 just added printout of logical block size as well.
The output as follows:
/usr/local/bin strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t6d0
./disk_describe /dev/rdsk/c1t6d0
Successful ioctl DIOC_DESCRIBE
model number: ST39103LC
interface: 20 <20=scsi>
logical block size : 512
./disk_describe /dev/vg00/rrawtest
Successful ioctl DIOC_DESCRIBE
model number:
interface: -1 <20=scsi>
logical block size : 1024
From above it seems like scsi allows writing in 512 bytes (which contradicts to part of your reply), it is really Veritas that does require 1024.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 03:15 AM
тАО07-08-2004 03:15 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
The 1024 from /usr/include/sys/param.h is in the context of FILE SYSTEMS. Each device has it's own native blocksize. For SCSI this typically is 512, as you saw. Drivers that build on top of the device (LVM, filesystems) will add their own restrictions, 1024 in this case. Some file systems refuse to do IO in other then 8192 chunks. If you write 512 bytes to those, then they will pre-read 8192 into a filesystem buffer, merge in the 512, and write 8192.
This is kinda funny to see on Oracle REDO logs, where you _know_ the action is 100% write (no archiving) and yet there are a bunch of reads? Going RAW solves that.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 05:02 AM
тАО07-08-2004 05:02 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
I have always put them on raw for reasons of block size writes, indirect access pointers for big files, memory copy overhead etc.
But some customers prefer filesystems and I had to check actual improvement.
To start with I have created veritas filesystem with block size 1024 and raw device and then performed 10K sequential writes of small 2K size into them. To my surprise the timing is almost identical (at least on a disk).
May be a good storage with write cache will make a difference...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 05:44 AM
тАО07-08-2004 05:44 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
> Actually it is oracle redo logs that has prompted me to get into this test.
I'm not entirely surprised. That's why I put my remark in! Hit!
> I have always put them on raw ... But some customers prefer filesystems
You could propose a compromise. During the main production window, run on large raw devices (1GB? 10GB?). Just for the slow / backup window just create a new group of small (50MB, 500MB?) redo logfiles on a filesystems. switch log and drop raw. When backups are done, recreate the additional large raw redo's, switch and drop the filesystem ones.
> device and then performed 10K sequential writes of small 2K size into them. To my surprise the timing is almost identical (at least on a disk).
Did you do like Oracle does and SYNC after every write? That can make all the difference.
> May be a good storage with write cache will make a difference...
Sure will
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2004 05:59 AM
тАО07-08-2004 05:59 AM
Re: cannot write chunk less than 1024 bytes into raw veritas volume
It is not backup issue, curstomer reports some oracle bugs which are raw-specific (have not send us actual bug# yet).
I'm opening it with O_DSYNC. This is what Oracle does since >= 7.3.