Hi,
We are supposed to write a C program for SUSE linux where,
In the setup of 2 hosts with shared disks array, we have following requirement.
The program should take host number ( 1 or 2 ) , device name as input parameters.
In the first step :
The program should write the current timestamp to the first or second block (2k) of the raw device.
Please note that writes to a raw device need to be aligned to sector borders an need to be in 512 byte chunks in aligned memory.
(The dd command can not be used for testing unfortunately since it "does not currently align its buffers correctly and so cannot be used on raw devices.") (man 8 raw).
In the second step :
create a loop to execute the following every second:
- write a current timestamp
- read and output the current timestamp written by the other node.
Please excuse as I am a newbie.
Thanx,
admin
RAW device
Started by admin1980, Jan 19 2010 11:17 PM
1 reply to this topic


Sign In
Create Account

Back to top









