9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] New disk, i/o error
@ 2011-10-16 14:11 slash
  0 siblings, 0 replies; 19+ messages in thread
From: slash @ 2011-10-16 14:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I began consolidating files with great joy from external ext2 disks to
the new 2 TB fossil drive using trfs.latin1. After only 300 or so
gigabytes I saw this on the console:

fossil: diskWriteRaw failed: /dev/sdE0/fossil: score 0x016d1415: data
Sun Oct 16 09:37:58 EDT 2011
part=data block 23925781: i/o error

I searched through the 9fans archives and tried the following:

- pulled the latest 9pccpuf from ftp.quanstro.net and booted with it.
Made no difference.
- ran 'echo debug sdE >/dev/sdctl' and 'dd -if /dev/sdE0/data -of
/dev/null -bs 8192'. No errors.

Whenever I see this diskWriteRaw message on the console, file
operations get stuck. fshalt jams too. This is fossil only. No venti.

Now I am at a point where I get this error almost immediately after bootup.

BIOS is (and has always been) set to AHCI mode with S.M.A.R.T. enabled.

Brand new disk. Luckily I have all the data on the other drives. What
to do next?



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-16 19:19       ` slash
                           ` (2 preceding siblings ...)
  2011-10-16 20:43         ` Steve Simon
@ 2011-10-19 11:48         ` Peter A. Cejchan
  3 siblings, 0 replies; 19+ messages in thread
From: Peter A. Cejchan @ 2011-10-19 11:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

I have 2 yrs old 1TB SATA Caviar that most of its lifetime spent in a bin in
my table... waiting just for data backup (ext2)... after 2yrs2months (and
only few hours really spinning) it has 16 bad sectors, sigh ... it is
WD1002FBYS ... just warning, regards,
++pac

[-- Attachment #2: Type: text/html, Size: 275 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17 16:15                   ` erik quanstrom
@ 2011-10-17 16:46                     ` Lyndon Nerenberg
  0 siblings, 0 replies; 19+ messages in thread
From: Lyndon Nerenberg @ 2011-10-17 16:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> do you find you need swap to run plan 9 on these
> systems?

Nope -- a testament to the system.  But that doesn't negate the fact that
'throw more hardware at it' isn't always an option.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17 15:43                 ` Lyndon Nerenberg
@ 2011-10-17 16:15                   ` erik quanstrom
  2011-10-17 16:46                     ` Lyndon Nerenberg
  0 siblings, 1 reply; 19+ messages in thread
From: erik quanstrom @ 2011-10-17 16:15 UTC (permalink / raw)
  To: 9fans

On Mon Oct 17 11:45:26 EDT 2011, lyndon@orthanc.ca wrote:
> > this is not such a pain as it might appear, swapping makes performance
> > so miserable its not really worth having, especially given how cheap a
> > few GB of RAM is these days.
>
> Not always an option on, say, PC-104 systems.

do you find you need swap to run plan 9 on these
systems?

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17 10:23               ` Steve Simon
  2011-10-17 11:17                 ` slash
  2011-10-17 11:56                 ` David du Colombier
@ 2011-10-17 15:43                 ` Lyndon Nerenberg
  2011-10-17 16:15                   ` erik quanstrom
  2 siblings, 1 reply; 19+ messages in thread
From: Lyndon Nerenberg @ 2011-10-17 15:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> this is not such a pain as it might appear, swapping makes performance
> so miserable its not really worth having, especially given how cheap a
> few GB of RAM is these days.

Not always an option on, say, PC-104 systems.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17 11:17                 ` slash
@ 2011-10-17 12:15                   ` David du Colombier
  0 siblings, 0 replies; 19+ messages in thread
From: David du Colombier @ 2011-10-17 12:15 UTC (permalink / raw)
  To: 9fans

> Will this work:
>
> 1. boot off the old disk (/dev/sdE0/plan9)
> 2. disk/prep /dev/sdE1/plan9
>     - delete swap and fossil
>     - create a new fossil at the same offset as the old one but bigger
>     - write changes
> 3. mount /dev/sdE1/fossil
>
> I am trying to find a way to resize /dev/sdE1/fossil without losing
> the existing data on it.

It will not work because you will need to run fossil/flfmt
to enlarge the Fossil file system but you will lose your data.

Venti can easily be resized, but I don't know any way to resize
Fossil, thought it may be possible.

--
David du Colombier



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17 10:23               ` Steve Simon
  2011-10-17 11:17                 ` slash
@ 2011-10-17 11:56                 ` David du Colombier
  2011-10-17 15:43                 ` Lyndon Nerenberg
  2 siblings, 0 replies; 19+ messages in thread
From: David du Colombier @ 2011-10-17 11:56 UTC (permalink / raw)
  To: 9fans

> > Why did prep create a 512MB swap
> > partition when I have 2GB RAM?
>
> good question, though on a positive note swap doesn't work anyway
> (except on the 9front form) so I would delete it as if the machine
> starts to swak it could wedge.
>
> this is not such a pain as it might appear, swapping makes performance
> so miserable its not really worth having, especially given how cheap a
> few GB of RAM is these days.

The swap is only enabled in /bin/termrc and it's not usual to have
a swap partition on a terminal.

The swap partition is 512 MB simply because it's the maximum size
specified in /sys/src/cmd/disk/prep/prep.c

--
David du Colombier



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17 10:23               ` Steve Simon
@ 2011-10-17 11:17                 ` slash
  2011-10-17 12:15                   ` David du Colombier
  2011-10-17 11:56                 ` David du Colombier
  2011-10-17 15:43                 ` Lyndon Nerenberg
  2 siblings, 1 reply; 19+ messages in thread
From: slash @ 2011-10-17 11:17 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> How did you used disk/prep?
I ran 'disk/prep -bw -a^(9fat nvram fossil swap) /dev/sdE1/plan9'.
When I ran it, my old disk was sdE0 and the new was sdE1. Now I notice
the layout prep created is identical on both disks!

su# disk/prep /dev/sdE0/plan9 # old
  9fat                    0 204800       (204800 sectors, 100.00 MB)
  nvram              204800 204801       (1 sectors, 512 B )
  fossil             204801 389668226    (389463425 sectors, 185.71 GB)
  swap            389668226 390716802    (1048576 sectors, 512.00 MB)
>>> q
su# disk/prep /dev/sdE1/plan9 # new
  9fat                     0 204800        (204800 sectors, 100.00 MB)
  nvram               204800 204801        (1 sectors, 512 B )
  fossil              204801 389668226     (389463425 sectors, 185.71 GB)
  swap             389668226 390716802     (1048576 sectors, 512.00 MB)
  empty            390716802 3907024002    (3516307200 sectors, 1.63 TB)
>>> q

> I don't believe you can, fossil is usually used with venti and venti can definitely
> be grown on the fly, fossil alone is normally confined to just laptops where this is
> not an issue.

Will this work:

1. boot off the old disk (/dev/sdE0/plan9)
2. disk/prep /dev/sdE1/plan9
    - delete swap and fossil
    - create a new fossil at the same offset as the old one but bigger
    - write changes
3. mount /dev/sdE1/fossil

I am trying to find a way to resize /dev/sdE1/fossil without losing
the existing data on it.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17  1:54             ` slash
  2011-10-17  7:44               ` David du Colombier
@ 2011-10-17 10:23               ` Steve Simon
  2011-10-17 11:17                 ` slash
                                   ` (2 more replies)
  1 sibling, 3 replies; 19+ messages in thread
From: Steve Simon @ 2011-10-17 10:23 UTC (permalink / raw)
  To: 9fans

> Can I grow fossil on the fly?

I don't believe you can, fossil is usually used with venti and venti can definitely
be grown on the fly, fossil alone is normally confined to just laptops where this is
not an issue.

> Why did prep create a 512MB swap
> partition when I have 2GB RAM?

good question, though on a positive note swap doesn't work anyway
(except on the 9front form) so I would delete it as if the machine
starts to swak it could wedge.

this is not such a pain as it might appear, swapping makes performance
so miserable its not really worth having, especially given how cheap a
few GB of RAM is these days.

-Steve



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-17  1:54             ` slash
@ 2011-10-17  7:44               ` David du Colombier
  2011-10-17 10:23               ` Steve Simon
  1 sibling, 0 replies; 19+ messages in thread
From: David du Colombier @ 2011-10-17  7:44 UTC (permalink / raw)
  To: 9fans

> Indeed!
>
> su# disk/prep /dev/sdE0/plan9
>   9fat                     0 204800        (204800 sectors, 100.00 MB)
>   nvram               204800 204801        (1 sectors, 512 B )
>   fossil              204801 389668226     (389463425 sectors, 185.71
> GB) swap             389668226 390716802     (1048576 sectors, 512.00
> MB) empty            390716802 3907024002    (3516307200 sectors,
> 1.63 TB)
>
> Can I grow fossil on the fly? Why did prep create a 512MB swap
> partition when I have 2GB RAM?

disk/prep -a only considers a minimum size, a maximum size and a weight.

Since 9fat, nvram and swap all take the maximum size specified, Fossil
should take all the empty space.

How did you used disk/prep?

You should have done something like:

disk/prep -bw -a^(9fat nvram fossil swap) /dev/sdE0/plan9

--
David du Colombier



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
       [not found]             ` <CAEaiYYys==oFZ7Umr4SD+rT6wtRo=j4K6wd0950gU94cGiR6kw@mail.gmail.c>
@ 2011-10-17  3:28               ` erik quanstrom
  0 siblings, 0 replies; 19+ messages in thread
From: erik quanstrom @ 2011-10-17  3:28 UTC (permalink / raw)
  To: 9fans

> Can I grow fossil on the fly? Why did prep create a 512MB swap
> partition when I have 2GB RAM?

prep isn't that smart.

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-16 20:40           ` erik quanstrom
@ 2011-10-17  1:54             ` slash
  2011-10-17  7:44               ` David du Colombier
  2011-10-17 10:23               ` Steve Simon
       [not found]             ` <CAEaiYYys==oFZ7Umr4SD+rT6wtRo=j4K6wd0950gU94cGiR6kw@mail.gmail.c>
  1 sibling, 2 replies; 19+ messages in thread
From: slash @ 2011-10-17  1:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> to me that looks like a mismatch between fossil's expectations for the
> partition and that actual partition size.  i think you're just reading past
> the end of the partition.

Indeed!

su# disk/prep /dev/sdE0/plan9
  9fat                     0 204800        (204800 sectors, 100.00 MB)
  nvram               204800 204801        (1 sectors, 512 B )
  fossil              204801 389668226     (389463425 sectors, 185.71 GB)
  swap             389668226 390716802     (1048576 sectors, 512.00 MB)
  empty            390716802 3907024002    (3516307200 sectors, 1.63 TB)

Can I grow fossil on the fly? Why did prep create a 512MB swap
partition when I have 2GB RAM?



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-16 19:19       ` slash
  2011-10-16 20:13         ` slash
       [not found]         ` <CAEaiYYwfHD0d+SyTLqVVi-si=knjSqH6FKP61pkR-XRo5ixegA@mail.gmail.c>
@ 2011-10-16 20:43         ` Steve Simon
  2011-10-19 11:48         ` Peter A. Cejchan
  3 siblings, 0 replies; 19+ messages in thread
From: Steve Simon @ 2011-10-16 20:43 UTC (permalink / raw)
  To: 9fans

Your email does not include the output of disk/prep /dev/sdE0/data.

You have a 1.8TB disk, which has a single DOS partition,
and your fossil sees a 1.8Tb disk, but what size is the
fossil partition? if it was in fact 200Gbytes then this
would explain the problem.

-Steve



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
       [not found]         ` <CAEaiYYwfHD0d+SyTLqVVi-si=knjSqH6FKP61pkR-XRo5ixegA@mail.gmail.c>
@ 2011-10-16 20:40           ` erik quanstrom
  2011-10-17  1:54             ` slash
       [not found]             ` <CAEaiYYys==oFZ7Umr4SD+rT6wtRo=j4K6wd0950gU94cGiR6kw@mail.gmail.c>
  0 siblings, 2 replies; 19+ messages in thread
From: erik quanstrom @ 2011-10-16 20:40 UTC (permalink / raw)
  To: 9fans

On Sun Oct 16 16:13:58 EDT 2011, slash.9fans@gmail.com wrote:
> > No errors, but I noticed it stopped just before 200 gigabytes.
> I kept reading the disk and got several read errors. Here is the first one:
>
> fossil: diskReadRaw failed: /dev/sdE0/fossil: score 0x016d1389:
> part=data block 23925641: eof reading disk
>
> Bad sector or something else?

to me that looks like a mismatch between fossil's expectations for the
partition and that actual partition size.  i think you're just reading past
the end of the partition.

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-16 19:19       ` slash
@ 2011-10-16 20:13         ` slash
       [not found]         ` <CAEaiYYwfHD0d+SyTLqVVi-si=knjSqH6FKP61pkR-XRo5ixegA@mail.gmail.c>
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: slash @ 2011-10-16 20:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> No errors, but I noticed it stopped just before 200 gigabytes.
I kept reading the disk and got several read errors. Here is the first one:

fossil: diskReadRaw failed: /dev/sdE0/fossil: score 0x016d1389:
part=data block 23925641: eof reading disk

Bad sector or something else?



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-16 17:29     ` erik quanstrom
@ 2011-10-16 19:19       ` slash
  2011-10-16 20:13         ` slash
                           ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: slash @ 2011-10-16 19:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> dd -if /dev/sdE0/fossil -of /dev/null -bs 512k  # or whatever partition.

No errors, but I noticed it stopped just before 200 gigabytes. The
total size of the plan9 partition is 1.81 terabytes.

A related question: how should I interpret /dev/sdE0/fossil file size?

# ls -l /dev/sdE0/fossil
--rw-r----- S 0 bootes bootes  199405273600 Sep  5 18:35 /dev/sdE0/fossil

Yet:

# con -l /srv/fscons
prompt: df
	main: 196,000,014,336 used + 1,800,341,831,680 free =
1,996,341,846,016 (9% used)

su# disk/fdisk /dev/sdE0/data
cylinder = 8225280 bytes
 * p1                       0 243201        (243201 cylinders, 1.81 TB) PLAN9

Why such mismatch? And could this be related to the write errors?



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
       [not found]   ` <CAEaiYYxsDmZ_O8N0BwK5Ch071NGbgrb_MyAnupxCyWgRioSTrw@mail.gmail.c>
@ 2011-10-16 17:29     ` erik quanstrom
  2011-10-16 19:19       ` slash
  0 siblings, 1 reply; 19+ messages in thread
From: erik quanstrom @ 2011-10-16 17:29 UTC (permalink / raw)
  To: 9fans

On Sun Oct 16 11:51:48 EDT 2011, slash.9fans@gmail.com wrote:
> > i've also had trouble with usb disks.
>
> The errors come from sdE0 which is connected to sata port on the
> motherboard. Even when there are no usb disks attached at all.
>

eeeh.  sorry.

> I am beginning to think my new disk has bad sectors. Looking at the
> reviews on the internet I wouldn't be the first one. Is there a way to
> tell for sure? Or could it be the usb transfers corrupted my fossil
> and I need to check it? Can I do this while booting off it?

dd -if /dev/sdE0/fossil -of /dev/null -bs 512k	# or whatever partition.

if you can narrow it down to a particular sector, you can use atazz to get
the exact contents of the error register, etc.

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
  2011-10-16 15:20 ` erik quanstrom
@ 2011-10-16 15:51   ` slash
       [not found]   ` <CAEaiYYxsDmZ_O8N0BwK5Ch071NGbgrb_MyAnupxCyWgRioSTrw@mail.gmail.c>
  1 sibling, 0 replies; 19+ messages in thread
From: slash @ 2011-10-16 15:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> i've also had trouble with usb disks.

The errors come from sdE0 which is connected to sata port on the
motherboard. Even when there are no usb disks attached at all.

su# cat /dev/sdE0/ctl
inquiry Hitachi HDS5C3020ALA632
model   Hitachi HDS5C3020ALA632
serial  ML0220FL0220F313JE2D
firm    ML6OA580
wwn     5000cca369cfb243
flag    lba llba smart power nop ata8 sct
udma    6
reg     task 50 cmd 4c017 serr 0  ci 0 is 0 sig 101 sstatus 123
cmd     hpcp cr fr pod sud st
mode    auto sataii
geometry 3907029168 512
part data 0 3907029168
part plan9 63 3907024065
part 9fat 63 204863
part nvram 204863 204864
part fossil 204864 3905975489
part swap 3905975489 3907024065

I am beginning to think my new disk has bad sectors. Looking at the
reviews on the internet I wouldn't be the first one. Is there a way to
tell for sure? Or could it be the usb transfers corrupted my fossil
and I need to check it? Can I do this while booting off it?



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [9fans] New disk, i/o error
       [not found] <CAEaiYYwtJPmt-utC12NwucXQhJ6kKs0CzBXZRT6PU=fCZnjpbA@mail.gmail.c>
@ 2011-10-16 15:20 ` erik quanstrom
  2011-10-16 15:51   ` slash
       [not found]   ` <CAEaiYYxsDmZ_O8N0BwK5Ch071NGbgrb_MyAnupxCyWgRioSTrw@mail.gmail.c>
  0 siblings, 2 replies; 19+ messages in thread
From: erik quanstrom @ 2011-10-16 15:20 UTC (permalink / raw)
  To: 9fans

On Sun Oct 16 10:12:13 EDT 2011, slash.9fans@gmail.com wrote:
> I began consolidating files with great joy from external ext2 disks to
> the new 2 TB fossil drive using trfs.latin1. After only 300 or so
> gigabytes I saw this on the console:
>
> fossil: diskWriteRaw failed: /dev/sdE0/fossil: score 0x016d1415: data
> Sun Oct 16 09:37:58 EDT 2011
> part=data block 23925781: i/o error

i've also had trouble with usb disks.  with my older terminal, i never
could get to a stable situation due to usb errors that usb/disk and
the kernel couldn't get sorted.  i made some modifications to usb/disk.
you can find executables in ftp://ftp.quanstro.net/other/8.usb.*.

i hope this helps you, but i'm not sure i spent enough time with it to
really solve the problem.  sorry.

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-10-19 11:48 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-16 14:11 [9fans] New disk, i/o error slash
     [not found] <CAEaiYYwtJPmt-utC12NwucXQhJ6kKs0CzBXZRT6PU=fCZnjpbA@mail.gmail.c>
2011-10-16 15:20 ` erik quanstrom
2011-10-16 15:51   ` slash
     [not found]   ` <CAEaiYYxsDmZ_O8N0BwK5Ch071NGbgrb_MyAnupxCyWgRioSTrw@mail.gmail.c>
2011-10-16 17:29     ` erik quanstrom
2011-10-16 19:19       ` slash
2011-10-16 20:13         ` slash
     [not found]         ` <CAEaiYYwfHD0d+SyTLqVVi-si=knjSqH6FKP61pkR-XRo5ixegA@mail.gmail.c>
2011-10-16 20:40           ` erik quanstrom
2011-10-17  1:54             ` slash
2011-10-17  7:44               ` David du Colombier
2011-10-17 10:23               ` Steve Simon
2011-10-17 11:17                 ` slash
2011-10-17 12:15                   ` David du Colombier
2011-10-17 11:56                 ` David du Colombier
2011-10-17 15:43                 ` Lyndon Nerenberg
2011-10-17 16:15                   ` erik quanstrom
2011-10-17 16:46                     ` Lyndon Nerenberg
     [not found]             ` <CAEaiYYys==oFZ7Umr4SD+rT6wtRo=j4K6wd0950gU94cGiR6kw@mail.gmail.c>
2011-10-17  3:28               ` erik quanstrom
2011-10-16 20:43         ` Steve Simon
2011-10-19 11:48         ` Peter A. Cejchan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).