[Gllug] Raw Partitions

Ben Fitzgerald ben_m_f at yahoo.co.uk
Wed Nov 16 12:22:01 UTC 2005


On Wed, Nov 16, 2005 at 12:02:55PM +0000, Steve Nelson wrote:
> Hi All,
> 
> I need to simulate reading and writing to a raw partition on a test
> machine before I perform the same procedure on a live system, which
> appears to be crashing when the same happens.
> 
> I've got hold of sg_dd for the read/writes, but need to create a raw
> partition for experimenation.
> 
> I'm not especially keen on repartitioning my test machine so I can
> create a raw device.  Is it possible to create a rawdevice 'within' a
> current partition.
> 
> I am thinking along the lines of the mkswap or mkinitrd commands - can
> I use dd or some other tool to create a 100M file which I then bind
> using raw?
> 
> Or am I barking up completely the wrong tree (and thus revealing a
> lack of insight into how raw devices work)?
> 

I would say that if you are going to create a file on top of your
filesystem then any testing you do will, if for benchmarking purposes,
be invalid. You will be writing to the FS which has block I/O rather
than a genuine raw device with character I/O.

If benchmarking doesn't concern you there may be a kernel module to
emulate this, but I don't know what it is.

HTH,

Ben.

-- 
Registered Linux user number 339435
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list