Re: Linux kernel 2.6.x Raw device support
On Saturday 21 May 2005 05:52, email@example.com wrote:
> > Perhaps someone here could offer some suggestions.
> I take that for "any suggestions" and (again) advise DVD writer
> programs like growisofs or cdrecord-ProDVD.
> With growisofs i roughly use
> formatter_program | \
> growisofs -use-the-force-luke -dvd-compat -Z /dev/sr0=/proc/self/fd/0
> Data do not need to be aligned in a special way.
> With my kernel 2.4 /dev/sr0 is /dev/hdc under ide-scsi emulation while
> with kernel 2.6 /dev/hdc is said to work directly.
And I use these tools extensively as well. And they do not mandate the use
of the raw devices and so they will work on any attached device for these
intended operations. The program growisofs I believe has an internal
implementation for the use of the raw device if the device specified is
bound to a raw device then it will locate it and use it automatically as
> > It was also stated that in the next kernel development of 2.7 that
> > raw device support could be removed.
> Just for curiosity: when did this raw device thingee start to work ?
> Is it a spinoff from udf-tools ? How official did it become inbetween ?
> I'm still using kernel 2.4 and obviously missed some interesting
> dead end developments. There is mentioned an open(2) option O_DIRECT
> and a command raw(8) in my system's man pages. Thoughtful YaST did
> not install any (according to raw -qa).
The man page for the raw command gives the author, Stephen Tweedie at
Redhat, the credit for the raw command program and at the bottom of the
man page it is dated August 1999 on my system.
The 2.6.10 kernel sources for the raw device driver sources do not offer
any history within the contents. So I do not know when the implementation
of the device structure itself was first started or where. I did see a
statement that included the phrase "genuine UNIX" and that would imply to
me that this is not a Linux specific feature however. In the 2.6 series
kernel it is an optional item. I could not locate an option in the 2.4
series kernel to disable the feature so I assume it is mandatory, but the
raw.c source code is there for char device support.
For my own history I have been using tar output piped to sdd to be directly
written using the raw device drivers for about 3 years now I think on many
servers. This use requires a kernel patch available from Andy for 2.4
series kernels and 2.6 series kernels have not required a patch.
With CDRW media I would pipe the tar command output to cdrecord to burn it
to the media directly. And as you suggested above using the growisofs
program in the same way I think would work for me as an alternative. If I
recall from when Andy added this feature I think the operation is
independent of the structure of the incoming data so I think it should
work for my purposes.
The backup operations are just raw data type dumps, as they are not ISO
images in any way. For data backup purposes, it makes no sense to use the
additional overhead and file handling to format an ISO image unless it is
intended to be read from another OS platform that does not have a direct
capability like in Windows.
Thanks for the suggestion to use growisofs instead. I am currently turning
up a new server so I think I will give it a try on this implementation.