Discussion:
[9fans] New disk, i/o error
(too old to reply)
slash
2011-10-16 14:12:43 UTC
Permalink
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?
erik quanstrom
2011-10-16 15:31:42 UTC
Permalink
Post by slash
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
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
slash
2011-10-16 15:52:59 UTC
Permalink
Post by erik quanstrom
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?
erik quanstrom
2011-10-16 17:32:11 UTC
Permalink
Post by slash
Post by erik quanstrom
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.
Post by slash
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
slash
2011-10-16 19:21:48 UTC
Permalink
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?
slash
2011-10-16 20:14:38 UTC
Permalink
Post by slash
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?
Steve Simon
2011-10-16 20:46:43 UTC
Permalink
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
Peter A. Cejchan
2011-10-19 11:50:24 UTC
Permalink
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

erik quanstrom
2011-10-16 20:51:41 UTC
Permalink
Post by slash
Post by slash
No errors, but I noticed it stopped just before 200 gigabytes.
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
slash
2011-10-17 01:56:34 UTC
Permalink
Post by erik quanstrom
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?
David du Colombier
2011-10-17 07:46:30 UTC
Permalink
Post by slash
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
Steve Simon
2011-10-17 10:25:00 UTC
Permalink
Post by slash
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.
Post by slash
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
slash
2011-10-17 11:20:59 UTC
Permalink
Post by David du Colombier
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)
Post by David du Colombier
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)
Post by David du Colombier
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.
David du Colombier
2011-10-17 12:16:31 UTC
Permalink
Post by slash
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
David du Colombier
2011-10-17 11:58:24 UTC
Permalink
Post by Steve Simon
Post by slash
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
Lyndon Nerenberg
2011-10-17 15:46:13 UTC
Permalink
Post by Steve Simon
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.
erik quanstrom
2011-10-17 16:17:09 UTC
Permalink
Post by Lyndon Nerenberg
Post by Steve Simon
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
Lyndon Nerenberg
2011-10-17 16:49:49 UTC
Permalink
Post by erik quanstrom
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.
erik quanstrom
2011-10-17 03:29:43 UTC
Permalink
Post by slash
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
Continue reading on narkive:
Loading...