From owner-rawio@oss.sgi.com Fri Jun 2 00:31:23 2000 Received: by oss.sgi.com id ; Fri, 2 Jun 2000 00:31:14 -0700 Received: from hermes.mixx.net ([212.84.196.2]:38666 "HELO hermes.mixx.net") by oss.sgi.com with SMTP id ; Fri, 2 Jun 2000 00:31:03 -0700 Received: from mate.bln.innominate.de (cerberus.innominate.de [212.84.234.251]) by hermes.mixx.net (Postfix) with ESMTP id 447ADF821 for ; Fri, 2 Jun 2000 09:31:44 +0200 (CEST) Received: by mate.bln.innominate.de (Postfix, from userid 9) id C02BE2CA6E; Fri, 2 Jun 2000 09:31:43 +0200 (CEST) From: Thilo Mezger Reply-To: Thilo Mezger X-Newsgroups: innominate.bln.list.sgi.rawio Subject: Re: raw io and lvm Date: 2 Jun 2000 07:31:43 GMT Organization: innominate AG, Berlin, Germany Lines: 15 Distribution: local Message-ID: References: <200005311912.MAA92867@getafix.engr.sgi.com> Reply-To: thilo.mezger@innominate.de X-Trace: mate.bln.innominate.de 959931103 25656 10.0.0.25 (2 Jun 2000 07:31:43 GMT) X-Complaints-To: news@innominate.de User-Agent: tin/1.4.3-20000502 ("Marian") (UNIX) (SunOS/5.8 (i86pc)) To: rawio@oss.sgi.com Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing Chaitanya Tumuluri wrote: > I used the "raw" program from Stephen Tweedie's website which ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could you post an URL, please? thanks thilo -- Thilo.Mezger@innominate.de E-Business Manager innominate AG networking people fon: +49-30-308806-0 fax: -77 web: http://innominate.de pgp: /pgp/tm From owner-rawio@oss.sgi.com Fri Jun 2 10:37:26 2000 Received: by oss.sgi.com id ; Fri, 2 Jun 2000 10:37:07 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:21873 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Fri, 2 Jun 2000 10:36:58 -0700 Received: from getafix.engr.sgi.com (getafix.engr.sgi.com [163.154.5.110]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id KAA09153 for ; Fri, 2 Jun 2000 10:42:30 -0700 (PDT) mail_from (chait@getafix.engr.sgi.com) Received: from localhost (chait@localhost) by getafix.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via SMTP id KAA90880; Fri, 2 Jun 2000 10:35:05 -0700 (PDT) Message-Id: <200006021735.KAA90880@getafix.engr.sgi.com> To: Thilo Mezger cc: rawio@oss.sgi.com Subject: Re: raw io and lvm In-reply-to: Your message of "02 Jun 2000 07:31:43 GMT." Date: Fri, 02 Jun 2000 10:35:05 -0700 From: Chaitanya Tumuluri Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing On 02 Jun 2000 07:31:43 GMT, Thilo Mezger , thilo.mezger@innominate.de wrote: >Chaitanya Tumuluri wrote: > >> I used the "raw" program from Stephen Tweedie's website which > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >could you post an URL, please? > >thanks >thilo > Try the following: ftp://ftp.uk.linux.org/pub/linux/sct/fs/raw-io/old/ Its part of the raw-19990204.tar.gz tarball. I've modified my copy slightly to *not* assume that raw devices are always "/dev/rawX". :^) Cheers, -Chait. From owner-rawio@oss.sgi.com Thu Jun 8 10:27:26 2000 Received: by oss.sgi.com id ; Thu, 8 Jun 2000 10:27:06 -0700 Received: from mail.turbolinux.com ([38.170.88.25]:14604 "EHLO mail.turbolinux.com") by oss.sgi.com with ESMTP id ; Thu, 8 Jun 2000 10:26:46 -0700 Received: from localhost (yakker@localhost) by mail.turbolinux.com (8.9.3/8.9.3) with ESMTP id KAA08635; Thu, 8 Jun 2000 10:25:36 -0700 Date: Thu, 8 Jun 2000 10:25:36 -0700 (PDT) From: "Matt D. Robinson" To: Chaitanya Tumuluri cc: rawio@oss.sgi.com Subject: Re: Raw I/O enhancements for 2.3.99.pre9-2 kernels. In-Reply-To: <200005270134.SAA87128@getafix.engr.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing On Fri, 26 May 2000, Chaitanya Tumuluri wrote: |>Hey Matt! What kind of problems and which kernel are you talking |>about? D'ju have any particular testcase I could use? I got it to work ... the deal is not to use map_kernel_kiobuf() for the stuff I'm doing. It's better just to do something like: #define buffer_size (16 * PAGE_SIZE) void *ptr; u_int page, i; unsigned long addr; struct kiobuf *data_kiobuf; /* allocate page and align it */ if (ptr = kmalloc(buffer_size + (PAGE_SIZE * 3))) { page = (u_int)ptr; page = (page + (PAGE_SIZE - (page % PAGE_SIZE))); ptr = (void *)page; } else { /* report error and bail */ } /* fill the kiobuf with pages from our own buffer */ addr = (unsigned long)ptr; for (i = 0; i < (buffer_size >> PAGE_SHIFT); i++, page += PAGE_SIZE) { data_kiobuf->maplist[i] = (struct page *)(mem_map * MAP_NR(a)); } data_kiobuf->nr_pages = (buffer_size >> PAGE_SHIFT); data_kiobuf->locked = 0; data_kiobuf->offset = 0; data_kiobuf->length = buffer_size; data_kiobuf->private = MAP_PRIVATE; /* do brw_kiovec on the kiobuf here */ Using map_kernel_kiobuf() turned out to be entirely unnecessary, since I keep re-using the same maplist[] array. Of course, now I'm dealing with some corruption in the buffer, and I'm not sure where the offset problem is coming from. Back to the grindstone ... :) --Matt |>-Chait. |> |>On Fri, 26 May 2000 17:42:37 PDT, "Matt D. Robinson" wrote: |>>Hey, Chait! Have you fully tested map_kernel_kiobuf() yet? I've |>>had a few problems with it ... |>> |>>--Matt |>> |>>On Fri, 26 May 2000, Chaitanya Tumuluri wrote: |>>|>Hi, |>>|> |>>|>This email is to announce the availability of kiobuf-based I/O |>>|>functionality for 2.3.99.pre9-2 kernels. |>>|> |>>|>First, the I/O queuing and scsi midlayer code in the Linux |>>|>2.3.99.pre9-2 kernel has been enhanced to handle kiobuf-based |>>|>I/O requests. Second, Stephen Tweedie's rawio codepath has been |>>|>extended to use this enhancement to directly issue kiobuf-based |>>|>requests without having to restuff them into buffer-heads. |>>|> |>>|>This change does not change the device access semantics of Stephen |>>|>Tweedie's code for raw devices. This enhancement only works for scsi |>>|>disks currently. |>>|> |>>|>The complete patch (combining Stephen Tweedie's current patchset |>>|>for Raw I/O and the new queueing/scsi-midlayer enhancements) is |>>|>available from: |>>|> |>>|> http://oss.sgi.com/projects/rawio |>>|> |>>|>Thanks, |>>|>-Chait. |> From owner-rawio@oss.sgi.com Thu Jun 8 10:48:25 2000 Received: by oss.sgi.com id ; Thu, 8 Jun 2000 10:48:06 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:14684 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 8 Jun 2000 10:47:54 -0700 Received: from getafix.engr.sgi.com (getafix.engr.sgi.com [163.154.5.110]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id KAA02506 for ; Thu, 8 Jun 2000 10:52:49 -0700 (PDT) mail_from (chait@getafix.engr.sgi.com) Received: from localhost (chait@localhost) by getafix.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF) via SMTP id KAA09450; Thu, 8 Jun 2000 10:45:23 -0700 (PDT) Message-Id: <200006081745.KAA09450@getafix.engr.sgi.com> To: "Matt D. Robinson" cc: rawio@oss.sgi.com Subject: Re: Raw I/O enhancements for 2.3.99.pre9-2 kernels. In-reply-to: Your message of "Thu, 08 Jun 2000 10:25:36 PDT." Date: Thu, 08 Jun 2000 10:45:23 -0700 From: Chaitanya Tumuluri Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing On Thu, 08 Jun 2000 10:25:36 PDT, "Matt D. Robinson" wrote: >On Fri, 26 May 2000, Chaitanya Tumuluri wrote: >|>Hey Matt! What kind of problems and which kernel are you talking >|>about? D'ju have any particular testcase I could use? > >I got it to work ... the deal is not to use map_kernel_kiobuf() for >the stuff I'm doing. It's better just to do something like: Cool. Thats good to know. What was the problem you had with map_kernel_kiobuf() anyways? Question: Do you take care not to alloc from highmem, to avoid bouncing? > > /* do brw_kiovec on the kiobuf here */ > Why brw_kiovec? That would send you into the buffer-head path and slow you down by as much as 40%. Why not the rawio path (i.e. try_kiobuf_io() in drivers/char/raw.c)? Cheers, -Chait. From owner-rawio@oss.sgi.com Thu Jun 8 14:28:56 2000 Received: by oss.sgi.com id ; Thu, 8 Jun 2000 14:28:37 -0700 Received: from mail.turbolinux.com ([38.170.88.25]:4101 "EHLO mail.turbolinux.com") by oss.sgi.com with ESMTP id ; Thu, 8 Jun 2000 14:28:16 -0700 Received: from localhost (yakker@localhost) by mail.turbolinux.com (8.9.3/8.9.3) with ESMTP id OAA18395; Thu, 8 Jun 2000 14:28:11 -0700 Date: Thu, 8 Jun 2000 14:28:11 -0700 (PDT) From: "Matt D. Robinson" To: Chaitanya Tumuluri cc: rawio@oss.sgi.com Subject: Re: Raw I/O enhancements for 2.3.99.pre9-2 kernels. In-Reply-To: <200006081745.KAA09450@getafix.engr.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing On Thu, 8 Jun 2000, Chaitanya Tumuluri wrote: |>On Thu, 08 Jun 2000 10:25:36 PDT, "Matt D. Robinson" wrote: |>>On Fri, 26 May 2000, Chaitanya Tumuluri wrote: |>>|>Hey Matt! What kind of problems and which kernel are you talking |>>|>about? D'ju have any particular testcase I could use? |>> |>>I got it to work ... the deal is not to use map_kernel_kiobuf() for |>>the stuff I'm doing. It's better just to do something like: |> |>Cool. Thats good to know. What was the problem you had with |>map_kernel_kiobuf() anyways? Still looking at that ... you'd think that it would have been fine, but I think it was how the maplist[] was getting setup. I haven't looked enough to know for sure, but I know there were a lot of things I didn't have to do which map_kernel_kiobuf() did. |>Question: Do you take care not to alloc from highmem, to avoid |> bouncing? Given that we allocate currently from setup_arch(), I don't think there's a problem (since we only allocate once), but if I modularize things, you're right, that'll have to change. I know that's something that map_kernel_kiobuf() takes care of. Again, right now, I'm just getting things to work. :) |>> /* do brw_kiovec on the kiobuf here */ |> |>Why brw_kiovec? That would send you into the buffer-head path and slow |>you down by as much as 40%. Why not the rawio path (i.e. try_kiobuf_io() |>in drivers/char/raw.c)? Because of ... /* * Only support SCSI disk for now. * * ENOSYS to indicate caller * should try ll_rw_block() * for non-SCSI (e.g. IDE) disks * and for MD requests. */ if (!SCSI_DISK_MAJOR(MAJOR(dev)) || (MAJOR(dev) == MD_MAJOR)) { *error = -ENOSYS; goto end_io; } I'd love to use it if it supported IDE. |>Cheers, |>-Chait. Later, good to hear from you! :) --Matt From owner-rawio@oss.sgi.com Tue Jun 20 15:01:49 2000 Received: by oss.sgi.com id ; Tue, 20 Jun 2000 15:01:39 -0700 Received: from nlink3-4.static.iaxs.net ([209.134.149.68]:11538 "EHLO nlink_nt.nlink.com") by oss.sgi.com with ESMTP id ; Tue, 20 Jun 2000 15:01:20 -0700 Received: by NLINK_NT with Internet Mail Service (5.5.2650.21) id ; Tue, 20 Jun 2000 17:01:17 -0500 Message-ID: From: Corey Thompson To: "'rawio@oss.sgi.com'" Subject: Using the RAW I/O enhancements Date: Tue, 20 Jun 2000 17:01:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing (Forgive my newbiness to Raw I/O...) >From the FAQ: "How do I use the RAW I/O Enhancements? First, you must enable the raw disk I/O enhancements with the CONFIG_RAW parameter, second, you must create the special device nodes for the character special disk devices, preserving the major/minor number relationship between the block and character special devices. " I have compiled a 2.2.13 kernel patched with the sgi+straw patch applied. I am able to do a ls on /dev/raw. My question is "now what?" How do I map the devices so I can get the raw i/o speeds? Thanks! -- Corey Thompson From owner-rawio@oss.sgi.com Wed Jun 21 10:36:26 2000 Received: by oss.sgi.com id ; Wed, 21 Jun 2000 10:36:17 -0700 Received: from nlink-iaxs.iaxs.net ([209.134.130.194]:57873 "EHLO nlink_nt.nlink.com") by oss.sgi.com with ESMTP id ; Wed, 21 Jun 2000 10:35:54 -0700 Received: by NLINK_NT with Internet Mail Service (5.5.2650.21) id ; Wed, 21 Jun 2000 12:35:56 -0500 Message-ID: From: Corey Thompson To: "'rawio@oss.sgi.com'" Cc: "'nelsond@cthulhu.engr.sgi.com'" Subject: RE: Using the RAW I/O enhancements Date: Wed, 21 Jun 2000 12:35:55 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing Thanks for your help! I now have a /dev/rsd/c0d0p7 device: [root@linuxdev1 rsd]# cat /proc/partitions major minor #blocks name 72 0 71126640 ida/c0d0 72 1 36704 ida/c0d0p1 72 2 1052640 ida/c0d0p2 72 3 1 ida/c0d0p3 72 5 10240784 ida/c0d0p5 72 6 2097104 ida/c0d0p6 72 7 2101184 ida/c0d0p7 3 0 1073741823 hda [root@linuxdev1 rsd]# ls -l total 0 crw-rw---- 1 root root 72, 7 Jun 21 11:01 c0d0p7 Shouldn't I be able to do something like: cat -----Original Message----- > From: nelsond@harrier.corp.sgi.com > [mailto:nelsond@harrier.corp.sgi.com] > Sent: Tuesday, June 20, 2000 5:40 PM > To: Corey Thompson > Subject: Re: Using the RAW I/O enhancements > > > Corey, > > > I have compiled a 2.2.13 kernel patched with the sgi+straw > patch applied. I > > am able to do a ls on /dev/raw. My question is "now what?" > How do I map > > the devices so I can get the raw i/o speeds? > > > You need to create the character devices using mknod. Here > is a small example > of what you will need to do. Make sure that the major and > minor numbers of the > character devices correspond to the major and minor numbers found in > /proc/partitions. > > [very helpful info munched] > > When you want to do raw io, do it to the character devices > that you just > created. > > I hope this helps. > > doug > From owner-rawio@oss.sgi.com Mon Jun 26 07:44:17 2000 Received: by oss.sgi.com id ; Mon, 26 Jun 2000 07:44:07 -0700 Received: from xfw.transarc.ibm.com ([192.54.226.51]:20754 "EHLO fw0.transarc.com") by oss.sgi.com with ESMTP id ; Mon, 26 Jun 2000 07:43:33 -0700 Received: from transarc.com (transarc.com [9.38.192.8]) by fw0.transarc.com (AIX4.2/UCB 8.7/8.7) with ESMTP id KAA11218 for ; Mon, 26 Jun 2000 10:21:30 -0400 (EDT) Received: by transarc.com (8.9.0.Beta3/3.15) id for rawio@oss.sgi.com; Mon, 26 Jun 2000 10:43:02 -0400 (EDT) Received: via switchmail; Mon, 26 Jun 2000 10:43:02 -0400 (EDT) Received: from smithfield via qmail ID ; Mon, 26 Jun 2000 10:41:04 -0400 (EDT) Received: from smithfield via qmail ID ; Mon, 26 Jun 2000 10:41:04 -0400 (EDT) Received: from BatMail.robin.v2.12.CUILIB.3.45.SNAP.NOT.LINKED.smithfield.sun4c.53 via MS.5.6.smithfield.sun4_51; Mon, 26 Jun 2000 10:41:03 -0400 (EDT) Message-ID: Date: Mon, 26 Jun 2000 10:41:03 -0400 (EDT) From: Mary_Ann_DelBusso@transarc.com To: rawio@oss.sgi.com Subject: dd.raw: /dev/raw/raw1: Invalid argument Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing Hi, I'm having trouble getting rawio to work on Red Hat Linux release 6.2 (Zoot) Kernel 2.2.13-okeefe on a 2-processor i686 Does anyone have any idea what I'm doing wrong based on the following: Filesystem 1k-blocks Used Available Use% Mounted on /dev/sdb1 8741468 28 8297388 0% /wtecache1 /dev/sdc1 8741468 20 8297396 0% /wtecache2 [mad@shaggy ~mad/tmp]$ ls -l /dev/sdb1 /dev/sdc1 brw-rw---- 1 root mail 8, 17 May 5 1998 /dev/sdb1 brw-rw---- 1 root mail 8, 33 May 5 1998 /dev/sdc1 [mad@shaggy mad]$ raw /dev/raw/raw1 /dev/sdb1 /dev/raw/raw1: bound to major 8, minor 17 [mad@shaggy mad]$ raw /dev/raw/raw2 /dev/sdc1 /dev/raw/raw2: bound to major 8, minor 33 [mad@shaggy ~mad/tmp]$ raw -qa /dev/raw/raw1: bound to major 8, minor 17 /dev/raw/raw2: bound to major 8, minor 33 [mad@shaggy ~mad/tmp]$ ./dd.raw if=/dev/raw/raw1 of=/dev/raw/raw2 bs=512 ./dd.raw: /dev/raw/raw1: Invalid argument 0+0 records in 0+0 records out Thanks, Mary Ann From owner-rawio@oss.sgi.com Mon Jun 26 10:45:08 2000 Received: by oss.sgi.com id ; Mon, 26 Jun 2000 10:44:59 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:33804 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Mon, 26 Jun 2000 10:44:32 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon.eng.nanobiz.com [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id KAA05899; Mon, 26 Jun 2000 10:43:57 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Mon, 26 Jun 2000 10:40:37 -0700 Message-Id: <200006261740.KAA15026@pendragon.eng.nanobiz.com> Subject: Re: dd.raw: /dev/raw/raw1: Invalid argument To: Mary_Ann_DelBusso@transarc.com Date: Mon, 26 Jun 2000 10:40:37 -0700 (PDT) Cc: rawio@oss.sgi.com In-Reply-To: from "Mary_Ann_DelBusso@transarc.com" at Jun 26, 2000 10:41:03 AM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing > > Hi, > > I'm having trouble getting rawio to work on > > Red Hat Linux release 6.2 (Zoot) Kernel 2.2.13-okeefe on a 2-processor i686 > > Does anyone have any idea what I'm doing wrong based on the following: > > Filesystem 1k-blocks Used Available Use% Mounted on > /dev/sdb1 8741468 28 8297388 0% /wtecache1 > /dev/sdc1 8741468 20 8297396 0% /wtecache2 > > [mad@shaggy ~mad/tmp]$ ls -l /dev/sdb1 /dev/sdc1 > brw-rw---- 1 root mail 8, 17 May 5 1998 /dev/sdb1 > brw-rw---- 1 root mail 8, 33 May 5 1998 /dev/sdc1 > > [mad@shaggy mad]$ raw /dev/raw/raw1 /dev/sdb1 > /dev/raw/raw1: bound to major 8, minor 17 > > [mad@shaggy mad]$ raw /dev/raw/raw2 /dev/sdc1 > /dev/raw/raw2: bound to major 8, minor 33 > > [mad@shaggy ~mad/tmp]$ raw -qa > /dev/raw/raw1: bound to major 8, minor 17 > /dev/raw/raw2: bound to major 8, minor 33 > > [mad@shaggy ~mad/tmp]$ ./dd.raw if=/dev/raw/raw1 of=/dev/raw/raw2 bs=512 > ../dd.raw: /dev/raw/raw1: Invalid argument > 0+0 records in > 0+0 records out > > Thanks, > Mary Ann > try: $ strace -o /tmp/strace.out ./dd.raw if ... and see what system call is failing with einval. scott From owner-rawio@oss.sgi.com Mon Jun 26 10:57:49 2000 Received: by oss.sgi.com id ; Mon, 26 Jun 2000 10:57:38 -0700 Received: from dns3.informix.com ([192.147.112.7]:16061 "EHLO kingcrab.informix.com") by oss.sgi.com with ESMTP id ; Mon, 26 Jun 2000 10:57:14 -0700 Received: from clifford.pdx.informix.com (clifford.pdx.informix.com [158.58.220.12]) by kingcrab.informix.com (8.8.5/8.7.3) with ESMTP id KAA01166; Mon, 26 Jun 2000 10:55:20 -0700 (PDT) Received: from oblique.pdx.informix.com (oblique.pdx.informix.com [158.58.222.54]) by clifford.pdx.informix.com (8.8.8/8.7) with ESMTP id KAA13811; Mon, 26 Jun 2000 10:55:19 -0700 (PDT) Received: from localhost (braddr@localhost) by oblique.pdx.informix.com (8.8.8/8.7) with ESMTP id KAA05522; Mon, 26 Jun 2000 10:55:14 -0700 (PDT) Date: Mon, 26 Jun 2000 10:55:14 -0700 (PDT) From: Brad Roberts To: Scott Lurndal cc: Mary_Ann_DelBusso@transarc.com, rawio@oss.sgi.com Subject: Re: dd.raw: /dev/raw/raw1: Invalid argument In-Reply-To: <200006261740.KAA15026@pendragon.eng.nanobiz.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing There's a conflict going on here. The patches at oss.sgi.com for rawio aren't the same as the code in 2.3.x and 2.4.0-testx. The demonstration below looks very much like what you'd do for 2.3/2.4, and not at all like how the patches for 2.2 behave. The dd.raw code, though, should work for both, I believe. Has someone back ported 2.4's style of raw devices to 2.2? If so, where can I find those patches. There's nothing about them on the sgi site that I can see. Later, Brad On Mon, 26 Jun 2000, Scott Lurndal wrote: > > > > Hi, > > > > I'm having trouble getting rawio to work on > > > > Red Hat Linux release 6.2 (Zoot) Kernel 2.2.13-okeefe on a 2-processor i686 > > > > Does anyone have any idea what I'm doing wrong based on the following: > > > > Filesystem 1k-blocks Used Available Use% Mounted on > > /dev/sdb1 8741468 28 8297388 0% /wtecache1 > > /dev/sdc1 8741468 20 8297396 0% /wtecache2 > > > > [mad@shaggy ~mad/tmp]$ ls -l /dev/sdb1 /dev/sdc1 > > brw-rw---- 1 root mail 8, 17 May 5 1998 /dev/sdb1 > > brw-rw---- 1 root mail 8, 33 May 5 1998 /dev/sdc1 > > > > [mad@shaggy mad]$ raw /dev/raw/raw1 /dev/sdb1 > > /dev/raw/raw1: bound to major 8, minor 17 > > > > [mad@shaggy mad]$ raw /dev/raw/raw2 /dev/sdc1 > > /dev/raw/raw2: bound to major 8, minor 33 > > > > [mad@shaggy ~mad/tmp]$ raw -qa > > /dev/raw/raw1: bound to major 8, minor 17 > > /dev/raw/raw2: bound to major 8, minor 33 > > > > [mad@shaggy ~mad/tmp]$ ./dd.raw if=/dev/raw/raw1 of=/dev/raw/raw2 bs=512 > > ../dd.raw: /dev/raw/raw1: Invalid argument > > 0+0 records in > > 0+0 records out > > > > Thanks, > > Mary Ann > > > > try: > > $ strace -o /tmp/strace.out ./dd.raw if ... > > and see what system call is failing with einval. > > scott > From owner-rawio@oss.sgi.com Mon Jun 26 11:39:39 2000 Received: by oss.sgi.com id ; Mon, 26 Jun 2000 11:39:29 -0700 Received: from xfw.transarc.ibm.com ([192.54.226.51]:24079 "EHLO fw0.transarc.com") by oss.sgi.com with ESMTP id ; Mon, 26 Jun 2000 11:39:05 -0700 Received: from transarc.com (transarc.com [9.38.192.8]) by fw0.transarc.com (AIX4.2/UCB 8.7/8.7) with ESMTP id OAA12002; Mon, 26 Jun 2000 14:16:07 -0400 (EDT) Received: by transarc.com (8.9.0.Beta3/3.15) id ; Mon, 26 Jun 2000 14:37:39 -0400 (EDT) Received: via switchmail; Mon, 26 Jun 2000 14:37:39 -0400 (EDT) Received: from smithfield via qmail ID ; Mon, 26 Jun 2000 14:35:44 -0400 (EDT) Received: from smithfield via qmail ID ; Mon, 26 Jun 2000 14:35:44 -0400 (EDT) Received: from BatMail.robin.v2.12.CUILIB.3.45.SNAP.NOT.LINKED.smithfield.sun4c.53 via MS.5.6.smithfield.sun4_51; Mon, 26 Jun 2000 14:35:43 -0400 (EDT) Message-ID: Date: Mon, 26 Jun 2000 14:35:43 -0400 (EDT) From: Mary_Ann_DelBusso@transarc.com To: Scott Lurndal , Brad Roberts Subject: Re: dd.raw: /dev/raw/raw1: Invalid argument CC: rawio@oss.sgi.com In-Reply-To: References: Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing straces shows: read(4, 0x804f000, 512) = -1 EINVAL (Invalid argument The patches I picked up from http://oss.sgi.com/projects/rawio are specifically made for the 2.2.13 linux kernel. Thanks, Mary Ann From owner-rawio@oss.sgi.com Mon Jun 26 12:01:48 2000 Received: by oss.sgi.com id ; Mon, 26 Jun 2000 12:01:38 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:42508 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Mon, 26 Jun 2000 12:01:18 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon.eng.nanobiz.com [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id MAA06326; Mon, 26 Jun 2000 12:00:42 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Mon, 26 Jun 2000 11:57:23 -0700 Message-Id: <200006261857.LAA15336@pendragon.eng.nanobiz.com> Subject: Re: dd.raw: /dev/raw/raw1: Invalid argument To: Mary_Ann_DelBusso@transarc.com Date: Mon, 26 Jun 2000 11:57:23 -0700 (PDT) Cc: slurn@nanobiz.com (Scott Lurndal), braddr@informix.com (Brad Roberts), rawio@oss.sgi.com In-Reply-To: from "Mary_Ann_DelBusso@transarc.com" at Jun 26, 2000 02:35:43 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing > > > straces shows: > read(4, 0x804f000, 512) = -1 EINVAL (Invalid argument The arguments here look fine: (buffer address is congruent to zero modulo the sector size and the transfer length is also congruent to zero modulo the sector size). I suspect problems using /dev/raw (which is an extremely ugly interface anyway). > > The patches I picked up from http://oss.sgi.com/projects/rawio > are specifically made for the 2.2.13 linux kernel. > > Thanks, > Mary Ann > While the /dev/raw stuff was included in the 2.2 sgi raw I/O work, it wasn't tested nor used, rather we used the standard unix raw device paradigm: so try this instead: # mknod /dev/rsdb1 c 8 17 # mknod /dev/rsdc1 c 8 33 -- # dd.raw if=/dev/rsdb1 of=/dev/rsdc1 bs=2048 -- scott From owner-rawio@oss.sgi.com Tue Jun 27 09:28:50 2000 Received: by oss.sgi.com id ; Tue, 27 Jun 2000 09:28:40 -0700 Received: from xfw.transarc.ibm.com ([192.54.226.51]:20488 "EHLO fw0.transarc.com") by oss.sgi.com with ESMTP id ; Tue, 27 Jun 2000 09:09:23 -0700 Received: from transarc.com (transarc.com [9.38.192.8]) by fw0.transarc.com (AIX4.2/UCB 8.7/8.7) with ESMTP id LAA18914; Tue, 27 Jun 2000 11:47:36 -0400 (EDT) Received: by transarc.com (8.9.0.Beta3/3.15) id ; Tue, 27 Jun 2000 12:09:09 -0400 (EDT) Received: via switchmail; Tue, 27 Jun 2000 12:09:09 -0400 (EDT) Received: from smithfield via qmail ID ; Tue, 27 Jun 2000 12:07:51 -0400 (EDT) Received: from smithfield via qmail ID ; Tue, 27 Jun 2000 12:07:51 -0400 (EDT) Received: from BatMail.robin.v2.12.CUILIB.3.45.SNAP.NOT.LINKED.smithfield.sun4c.53 via MS.5.6.smithfield.sun4_51; Tue, 27 Jun 2000 12:07:50 -0400 (EDT) Message-ID: Date: Tue, 27 Jun 2000 12:07:50 -0400 (EDT) From: Mary_Ann_DelBusso@transarc.com To: Scott Lurndal Subject: Re: dd.raw: /dev/raw/raw1: Invalid argument CC: rawio@oss.sgi.com In-Reply-To: <200006261857.LAA15336@pendragon.eng.nanobiz.com> References: <200006261857.LAA15336@pendragon.eng.nanobiz.com> Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing Scott Lurndal writes: > While the /dev/raw stuff was included in the 2.2 sgi raw I/O > work, it wasn't tested nor used, rather we used the standard > unix raw device paradigm: > > so try this instead: > > # mknod /dev/rsdb1 c 8 17 > # mknod /dev/rsdc1 c 8 33 Hi Scott, Thanks for your suggestion. It did actually seem to work (aside from the "Device not configured" error message"; see below) But it took a really really long time to run -- more than 3 hours when I left last night. I'm thinking that perhaps the POSIX Asynchronous I/O patch might speed things up (http://oss.sgi.com/projects/kaio)??? Thanks again for your help. mad [mad@shaggy ~mad/tmp]$ ./dd.raw if=/dev/rsdb1 of=/dev/rsdc1 bs=2048 ./dd.raw: /dev/rsdb1: Device not configured 4440539+0 records in 4440539+0 records out [mad@shaggy ~mad/tmp]$ df -k Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda1 2953188 56644 2746528 2% / /dev/sda6 2441316 128672 2188632 6% /opt /dev/sda5 2362524 790572 1451940 35% /usr AFS 9000000 0 9000000 0% /afs /dev/sdb1 8741468 2099224 6198192 25% /wtecache1 /dev/sdc1 8741468 20 8297396 0% /wtecache2 [mad@shaggy ~mad/tmp]$ ls -al /wtecache1 total 2099228 drwxr-xr-x 3 root wheel 4096 Jun 26 13:54 . drwxr-xr-x 27 root wheel 4096 Jun 21 17:39 .. -rw------- 1 root wheel 2147475456 Jun 26 13:58 file1 -rw-r--r-- 1 root wheel 6 Jun 22 09:43 hello -rw-r--r-- 1 root wheel 5 Jun 22 09:43 junk drwxr-xr-x 2 root wheel 16384 May 3 13:39 lost+found -rw-r--r-- 1 root wheel 0 Jun 22 09:43 mad [mad@shaggy ~mad/tmp]$ ls -al /wtecache2 total 2099228 drwxr-xr-x 3 root wheel 4096 Jun 22 10:38 . drwxr-xr-x 27 root wheel 4096 Jun 21 17:39 .. -rw------- 1 root wheel 2147475456 Jun 26 13:58 file1 -rw-r--r-- 1 root wheel 6 Jun 22 09:43 hello -rw-r--r-- 1 root wheel 5 Jun 22 09:43 junk drwxr-xr-x 2 root wheel 16384 May 3 13:39 lost+found -rw-r--r-- 1 root wheel 0 Jun 22 09:43 mad After I rebooted, df even shows the right stuff: Filesystem 1k-blocks Used Available Use% Mounted on /dev/sdb1 8741468 2099224 6198192 25% /wtecache1 /dev/sdc1 8741468 2099224 6198192 25% /wtecache2 From owner-rawio@oss.sgi.com Tue Jun 27 10:02:50 2000 Received: by oss.sgi.com id ; Tue, 27 Jun 2000 10:02:41 -0700 Received: from tourguide.nanobiz.com ([208.176.9.173]:32270 "EHLO nanobiz.com") by oss.sgi.com with ESMTP id ; Tue, 27 Jun 2000 10:02:30 -0700 Received: from pendragon.eng.nanobiz.com (IDENT:root@pendragon.eng.nanobiz.com [192.168.1.155]) by nanobiz.com (8.9.3/8.9.3) with ESMTP id KAA12724; Tue, 27 Jun 2000 10:02:34 -0700 From: Scott Lurndal Received: by pendragon.eng.nanobiz.com; Tue, 27 Jun 2000 09:59:25 -0700 Message-Id: <200006271659.JAA22882@pendragon.eng.nanobiz.com> Subject: Re: dd.raw: /dev/raw/raw1: Invalid argument To: Mary_Ann_DelBusso@transarc.com Date: Tue, 27 Jun 2000 09:59:25 -0700 (PDT) Cc: slurn@nanobiz.com (Scott Lurndal), rawio@oss.sgi.com In-Reply-To: from "Mary_Ann_DelBusso@transarc.com" at Jun 27, 2000 12:07:50 PM X-Mailer: ELM [version 2.5 PL1] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing > > Scott Lurndal writes: > > While the /dev/raw stuff was included in the 2.2 sgi raw I/O > > work, it wasn't tested nor used, rather we used the standard > > unix raw device paradigm: > > > > so try this instead: > > > > # mknod /dev/rsdb1 c 8 17 > > # mknod /dev/rsdc1 c 8 33 > > Hi Scott, > > Thanks for your suggestion. It did actually seem to work (aside > from the "Device not configured" error message"; see below) But > it took a really really long time to run -- more than 3 hours when > I left last night. I'm thinking that perhaps the POSIX Asynchronous > I/O patch might speed things up (http://oss.sgi.com/projects/kaio)??? No, dd.raw doesn't use async I/O. However, if you increase the I/O size (128k or perhaps 256k instead of 2048) you'll see much better performance. scott From owner-rawio@oss.sgi.com Thu Jun 29 07:27:21 2000 Received: by oss.sgi.com id ; Thu, 29 Jun 2000 07:27:01 -0700 Received: from xfw.transarc.ibm.com ([192.54.226.51]:54288 "EHLO fw0.transarc.com") by oss.sgi.com with ESMTP id ; Thu, 29 Jun 2000 07:26:42 -0700 Received: from po2.transarc.com.transarc.com (po2.transarc.ibm.com [9.38.192.6]) by fw0.transarc.com (AIX4.2/UCB 8.7/8.7) with ESMTP id KAA07972; Thu, 29 Jun 2000 10:04:46 -0400 (EDT) Received: by po2.transarc.com.transarc.com (8.9.0.Beta3/3.15) id ; Thu, 29 Jun 2000 10:26:24 -0400 (EDT) Received: via switchmail; Thu, 29 Jun 2000 10:26:24 -0400 (EDT) Received: from smithfield via qmail ID ; Thu, 29 Jun 2000 10:24:26 -0400 (EDT) Received: from smithfield via qmail ID ; Thu, 29 Jun 2000 10:24:26 -0400 (EDT) Received: from BatMail.robin.v2.12.CUILIB.3.45.SNAP.NOT.LINKED.smithfield.sun4c.53 via MS.5.6.smithfield.sun4_51; Thu, 29 Jun 2000 10:24:25 -0400 (EDT) Message-ID: Date: Thu, 29 Jun 2000 10:24:25 -0400 (EDT) From: Mary_Ann_DelBusso@transarc.com To: Scott Lurndal Subject: raw i/o using 2.2.14 kernel CC: rawio@oss.sgi.com In-Reply-To: <200006271659.JAA22882@pendragon.eng.nanobiz.com> References: <200006271659.JAA22882@pendragon.eng.nanobiz.com> Sender: owner-rawio@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;rawio-outgoing Hi Scott, Sorry to bug you again, but I have one more question... I had previously gotten raw i/o to work on redhat 6.2 and turbolinux 6.0.4 with the 2.2.13 kernel both with Stephan's rawio patch and SGI's enhancements. Now I'm trying to use the 2.2.14 kernel on turbolinux and am stuck at: Linux scooby 2.2.14-5smp #1 SMP Fri Mar 31 12:42:09 PST 2000 i686 unknown [root@scooby mad]# mknod /dev/rsdb1 c 8 17 [root@scooby log]# ls -l /dev/sdb1 /dev/rsdb1 crw-r--r-- 1 root root 8, 17 Jun 29 08:48 /dev/rsdb1 brw-rw---- 1 root disk 8, 17 May 5 1998 /dev/sdb1 [root@scooby mad]# ./dd.raw if=gsk4bas-4.0-3.43.i386.rpm of=/dev/rsdc1 bs=512 ./dd.raw: /dev/rsdc1: No such device Should the 2.2.14 kernel work without the patch/enhancements? end of strace: open("/dev/rsdb1", O_RDWR|O_CREAT|O_TRUNC, 0666) = -1 ENOSYS (Function not implemented) open("/dev/rsdb1", O_RDWR|O_CREAT|O_TRUNC, 0666) = -1 ENOSYS (Function not implemented) open("/dev/rsdb1", O_RDWR|O_CREAT|O_TRUNC, 0666) = -1 ENODEV (No such device) write(2, "./dd.raw: ", 10) = 10 write(2, "/dev/rsdb1", 10) = 10 open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, ": No such device", 16) = 16 write(2, "\n", 1) = 1 _exit(1) = ? Thanks for all your help, Mary Ann