- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- RAW devices
Operating System - Linux
1752592
Members
3684
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО01-19-2010 11:01 PM
тАО01-19-2010 11:01 PM
RAW devices
Hello,
We are suppose to write a C program wherein,
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.
Any response would be appreciated.
Thanx,
Admin
We are suppose to write a C program wherein,
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.
Any response would be appreciated.
Thanx,
Admin
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2010 12:15 AM
тАО01-20-2010 12:15 AM
Re: RAW devices
Looks like you're on a cluster programming course, and have received the first introductory exercise.
It seems to me you're expected to already have a basic/intermediate level understanding of programming in general, and the C programming language should be familiar to you.
There does not seem to be anything indicating that you might have solved at least a part of the exercise on your own. You also make the excuse of being a newbie. The overall feel is that you've just chosen a programming course at random, and are just now discovering that you're bitten off way more than you can chew.
If that's the case, you should go to talk with your teacher/lecturer and apologize for choosing a course that is beyond your current level of programming skills. You might ask him/her to recommend a suitable programming course for you: he/she can probably verify your skill level by a few quick questions.
If you've never done any programming in any language, learning the fundamentals is a major effort in itself. As long as your understanding of the basics is incomplete, you will miss important details in the lectures of your current course.
If you have other people do the exercises for you, you will also lose the effect of solving them yourself.
By then, you've lost just about all that makes being on a programming course more effective than just studying alone from a book - so why are you on that course at all?
A good programming course will also include a test or two, where other people cannot help you. If you have other people solving your exercises for you and then go to a test, you're setting yourself up for a failure.
MK
It seems to me you're expected to already have a basic/intermediate level understanding of programming in general, and the C programming language should be familiar to you.
There does not seem to be anything indicating that you might have solved at least a part of the exercise on your own. You also make the excuse of being a newbie. The overall feel is that you've just chosen a programming course at random, and are just now discovering that you're bitten off way more than you can chew.
If that's the case, you should go to talk with your teacher/lecturer and apologize for choosing a course that is beyond your current level of programming skills. You might ask him/her to recommend a suitable programming course for you: he/she can probably verify your skill level by a few quick questions.
If you've never done any programming in any language, learning the fundamentals is a major effort in itself. As long as your understanding of the basics is incomplete, you will miss important details in the lectures of your current course.
If you have other people do the exercises for you, you will also lose the effect of solving them yourself.
By then, you've lost just about all that makes being on a programming course more effective than just studying alone from a book - so why are you on that course at all?
A good programming course will also include a test or two, where other people cannot help you. If you have other people solving your exercises for you and then go to a test, you're setting yourself up for a failure.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2010 06:01 AM
тАО06-18-2010 06:01 AM
Re: RAW devices
I know the world is full of arrogant people. Now I believe it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-18-2010 06:42 AM
тАО06-18-2010 06:42 AM
Re: RAW devices
admin1979,
Your post does not really portray much what is it you want us to do or enlighten you with.
I have some inkling however so here it goes:
You can simulate the above (I think) using one machine. You can create a "raw file" to simulate you have a raw disk:
dd if=/dev/zero of /somepath/rawdisk bs=1024k count=1024
Then you can simulate writing code to do a dual or multinode r/w access on the same file. Am not 100% sure thiugh if it is good enough simulation of a shared storage.
BUT, if you have a decent enough PC with say 4 GB of Memory, you can have your hown simulated SAN/shared storage environmet cum Laboratory.
- Install LINUX
- Install your favourite virtualization -- vMware, KVM or VBOX/XEN
- Carve up 3 Virtual Sdervers: an OpenFiler NAS, 2 Linux Virtual Servers
- Your OpenFIlerNAS will provide iSCSI storage to your 2 Linux Virtual Servers
Then you can have a truly shaerd storage environment for your cluster adventures...
Cheers!
Your post does not really portray much what is it you want us to do or enlighten you with.
I have some inkling however so here it goes:
You can simulate the above (I think) using one machine. You can create a "raw file" to simulate you have a raw disk:
dd if=/dev/zero of /somepath/rawdisk bs=1024k count=1024
Then you can simulate writing code to do a dual or multinode r/w access on the same file. Am not 100% sure thiugh if it is good enough simulation of a shared storage.
BUT, if you have a decent enough PC with say 4 GB of Memory, you can have your hown simulated SAN/shared storage environmet cum Laboratory.
- Install LINUX
- Install your favourite virtualization -- vMware, KVM or VBOX/XEN
- Carve up 3 Virtual Sdervers: an OpenFiler NAS, 2 Linux Virtual Servers
- Your OpenFIlerNAS will provide iSCSI storage to your 2 Linux Virtual Servers
Then you can have a truly shaerd storage environment for your cluster adventures...
Cheers!
Hakuna Matata.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP