Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #177546 > unrolled thread

HELP! Re: How to fix I/O errors?

Started byMarc Shapiro <marcnshap@gmail.com>
First post2017-02-08 08:40 +0100
Last post2017-02-10 18:50 +0100
Articles 13 — 5 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  HELP! Re: How to fix I/O errors? Marc Shapiro <marcnshap@gmail.com> - 2017-02-08 08:40 +0100
    Re: HELP! Re: How to fix I/O errors? David Christensen <dpchrist@holgerdanske.com> - 2017-02-08 19:00 +0100
    Re: HELP! Re: How to fix I/O errors? Ric Moore <wayward4now@gmail.com> - 2017-02-09 00:10 +0100
      Re: HELP! Re: How to fix I/O errors? Marc Shapiro <marcnshap@gmail.com> - 2017-02-09 00:40 +0100
        Re: HELP! Re: How to fix I/O errors? Marc Shapiro <marcnshap@gmail.com> - 2017-02-09 01:00 +0100
          Re: HELP! Re: How to fix I/O errors? David Christensen <dpchrist@holgerdanske.com> - 2017-02-09 02:40 +0100
            Re: HELP! Re: How to fix I/O errors? (SOLVED) Marc Shapiro <marcnshap@gmail.com> - 2017-02-11 08:40 +0100
              Re: HELP! Re: How to fix I/O errors? (SOLVED) David Christensen <dpchrist@holgerdanske.com> - 2017-02-11 23:30 +0100
        Re: HELP! Re: How to fix I/O errors? rhkramer@gmail.com - 2017-02-09 03:00 +0100
      Re: HELP! Re: How to fix I/O errors? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-02-09 14:20 +0100
        Re: HELP! Re: How to fix I/O errors? Ric Moore <wayward4now@gmail.com> - 2017-02-09 18:10 +0100
          Re: HELP! Re: How to fix I/O errors? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-02-09 18:20 +0100
            Re: HELP! Re: How to fix I/O errors? Ric Moore <wayward4now@gmail.com> - 2017-02-10 18:50 +0100

#177546 — HELP! Re: How to fix I/O errors?

FromMarc Shapiro <marcnshap@gmail.com>
Date2017-02-08 08:40 +0100
SubjectHELP! Re: How to fix I/O errors?
Message-ID<t8v18-5P4-25@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

How it went is not well.  I tested the new drive with SeagateTools and it
was fine.  Then I made a clonezilla live CD and booted from it.  It stopped
on the first read error with a message saying to restart using the rescue
option.  I did that.  After 5 hours it finished without mentioning any
errors.

I tried to boot to the old disk (since it was still wired that way).  I got
dropped int a maintenance shell with fs errors in /dev/sda4 which is the
physical volume for all my LVM logical volumes -- /usr, /var, /home and
/temp.  It says to run fsck manually.

I decided to try the new drive, so I changed the cables and re-booted.

Maintenance shell, again.

/ mounted clean

lvm started

/home fs has errors run fsck (at this point, I'm afraid to try it)

/var, /usr, and /tmp all say that the superblock can not be read, or is
invalid.  Try running

e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

Which do I use?

How did trying to clone the disk nake such a mess of BOTH disks?

Any help getting a working system again will be greatly appreciated.

Marc

On Feb 6, 2017 2:37 PM, "David Christensen" <dpchrist@holgerdanske.com>
wrote:

On 02/06/17 13:15, Marc Shapiro wrote:

> I am pasting the result of smartctl -x /dev/sda below as I have no real
> clue what to do with the information, but I have a few questions first.
>
> 1) I have purchased a new, very similar, Seagate 1TB drive and I plan to
> install it and copy the whole system to the new drive.
>

It sounds like you don't have a backup of the failing 1 TB drive (?).


Do you have a file server with ~1 TB of free space?  RAID?


Run memtest86+ for 24+ hours to verify that you don't have a memory problem.


Use SeaTools to wipe the new 1 TB drive and run the short and long tests.
Stop if anything fails.



What is the best
> way to do this copy since I don't wangt to copy bad sectors?
>

I've done it with 'dd' in the past, but will use 'ddrescue' in the future.



2) Once I have verified that the new drive boots
>

I'd do a fresh install on a 16+ GB SSD (USB flash drives also work).  A
recovered system disk image is too uncertain.



and everything is running properly
>

As I understand it, the drive microcontroller calculates and stores a
checksum with every sector (block).  That's one way it knows that a block
is bad upon reading.  So, when you copy out whatever blocks you can get,
you probably won't have errors in those blocks.


But, files and directories are stored on one or more sectors.  Depending
upon your file system, fsck may or may not find the missing blocks.


When you're done, the destination disk is likely to be missing files and/or
directories.



I am hoping to reformat the old drive.  This should
> reallocate the bad sectors IIRC.  I then would like to set up a raid
> with both drives (keeping a close eye on the old drive).The
> feasibility of this, I would guess, depends on what the posted smartctl
> information tells someone who knows what to look for.
>
> 3) As I understand it, the above mentioned raid should be safe since,
> even if the old drive deteriorates further, the system can run on just
> the new drive.  Is that correct?
>

Once you've copied out whatever blocks you can get, use SeaTools to wipe
the old 1 TB drive and run short and long tests.  If all three pass, I
might be tempted to re-use the drive.


If it fails to wipe and has plaintext, destroy it with a sledge hammer.
(Wear safety glasses!)


If it wipes but fails the short or long tests, recycle it.



Here is the smafrtctl output:
>
...

=== START OF READ SMART DATA SECTION ===
> SMART overall-health self-assessment test result: PASSED
>

Interesting, given that the drive failed SeaTools (short test?).



General SMART Values:
> Offline data collection status:  (0x82)    Offline data collection activity
>                     was completed without error.
>                     Auto Offline Data Collection: Enabled.
> Self-test execution status:      ( 121)    The previous self-test
> completed having
>                     the read element of the test failed.
>

Matches SeaTools result.



Total time to complete Offline
> data collection:         (  600) seconds.
>
...

SMART Attributes Data Structure revision number: 10
> Vendor Specific SMART Attributes with Thresholds:
> ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
>   1 Raw_Read_Error_Rate     POSR--   117   095   006    - 165391146
>   3 Spin_Up_Time            PO----   095   093   000    -    0
>   4 Start_Stop_Count        -O--CK   100   100   020    -    406
>   5 Reallocated_Sector_Ct   PO--CK   072   072   036    -    1181
>   7 Seek_Error_Rate         POSR--   087   060   030    - 656506200
>   9 Power_On_Hours          -O--CK   048   048   000    -    46195
>  10 Spin_Retry_Count        PO--C-   100   100   097    -    0
>  12 Power_Cycle_Count       -O--CK   100   100   020    -    203
> 183 Runtime_Bad_Block       -O--CK   092   092   000    -    8
> 184 End-to-End_Error        -O--CK   100   100   099    -    0
> 187 Reported_Uncorrect      -O--CK   011   011   000    -    89
> 188 Command_Timeout         -O--CK   100   097   000    - 51540394008
> 189 High_Fly_Writes         -O-RCK   100   100   000    -    0
> 190 Airflow_Temperature_Cel -O---K   070   049   045    -    30 (Min/Max
> 27/32)
> 194 Temperature_Celsius     -O---K   030   051   000    -    30 (0 20 0
> 0 0)
> 195 Hardware_ECC_Recovered  -O-RC-   034   003   000    - 165391146
> 197 Current_Pending_Sector  -O--C-   093   083   000    -    310
> 198 Offline_Uncorrectable   ----C-   093   083   000    -    310
> 199 UDMA_CRC_Error_Count    -OSRCK   200   200   000    -    26
> 240 Head_Flying_Hours       ------   100   253   000    -    46718 (49
> 76 0)
> 241 Total_LBAs_Written      ------   100   253   000    - 1725386978
> 242 Total_LBAs_Read         ------   100   253   000    - 265479204
>                             ||||||_ K auto-keep
>                             |||||__ C event count
>                             ||||___ R error rate
>                             |||____ S speed/performance
>                             ||_____ O updated online
>                             |______ P prefailure warning
>

I have yet to find a good explanation for reading smartctl reports. This
post gives some clues:

https://ubuntuforums.org/showthread.php?t=2192335
Here are the statistics for my ST3000DM001:


Here is my ST3000DM001 for comparison:


SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   115   099   006    -    90256224
  3 Spin_Up_Time            PO----   094   094   000    -    0
  4 Start_Stop_Count        -O--CK   100   100   020    -    577
  5 Reallocated_Sector_Ct   PO--CK   100   100   010    -    0
  7 Seek_Error_Rate         POSR--   063   060   030    -    1955231
  9 Power_On_Hours          -O--CK   096   096   000    -    3552

 10 Spin_Retry_Count        PO--C-   100   100   097    -    0
 12 Power_Cycle_Count       -O--CK   100   100   020    -    576
183 Runtime_Bad_Block       -O--CK   100   100   000    -    0

184 End-to-End_Error        -O--CK   100   100   099    -    0
187 Reported_Uncorrect      -O--CK   100   100   000    -    0
188 Command_Timeout         -O--CK   100   100   000    -    0

189 High_Fly_Writes         -O-RCK   100   100   000    -    0
190 Airflow_Temperature_Cel -O---K   070   059   045    -    30 (Min/Max
19/30)
191 G-Sense_Error_Rate      -O--CK   100   100   000    -    0
192 Power-Off_Retract_Count -O--CK   100   100   000    -    35
193 Load_Cycle_Count        -O--CK   100   100   000    -    1323
194 Temperature_Celsius     -O---K   030   041   000    -    30 (0 17 0 0)
197 Current_Pending_Sector  -O--C-   100   100   000    -    0
198 Offline_Uncorrectable   ----C-   100   100   000    -    0
199 UDMA_CRC_Error_Count    -OSRCK   200   200   000    -    0
240 Head_Flying_Hours       ------   100   253   000    -    269092585999820
241 Total_LBAs_Written      ------   100   253   000    -    2338230420
242 Total_LBAs_Read         ------   100   253   000    -    19882466886


These statistics for your drive look suspicious:

Reallocated_Sector_Ct
Reported_Uncorrect
Runtime_Bad_Block


...

SMART Extended Comprehensive Error Log Version: 1 (5 sectors)
> Device Error Count: 89 (device log contains only the most recent 20 errors)
>

That's not good.  Mine says:

No Errors Logged



SMART Extended Self-test Log Version: 1 (1 sectors)
> Num  Test_Description    Status                  Remaining
> LifeTime(hours)  LBA_of_first_error
> # 1  Short offline       Completed: read failure       90% 46194
>

This could be SeaTools (?).


Let us know how it turns out.


David

[toc] | [next] | [standalone]


#177566

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2017-02-08 19:00 +0100
Message-ID<t8EH7-3ls-5@gated-at.bofh.it>
In reply to#177546
On 02/07/17 23:37, Marc Shapiro wrote:
 > How it went is not well.

 > David Christensen wrote:
 >> Run memtest86+ for 24+ hours to verify that you don't have a memory
 >> problem.

Did you test the memory?  If not, test it now just to be sure.


 >> Use SeaTools to wipe the new 1 TB drive and run the short and long
 >> tests.  Stop if anything fails.
> I tested the new drive with SeagateTools and it
> was fine.

Please confirm that you wiped the 1 TB recovery drive.


> Then I made a clonezilla live CD and booted from it.  It stopped
> on the first read error with a message saying to restart using the rescue
> option.  I did that.  After 5 hours it finished without mentioning any
> errors.
>
> I tried to boot to the old disk (since it was still wired that way).  I got
> dropped int a maintenance shell with fs errors in /dev/sda4 which is the
> physical volume for all my LVM logical volumes -- /usr, /var, /home and
> /temp.  It says to run fsck manually.
>
> I decided to try the new drive, so I changed the cables and re-booted.
>
> Maintenance shell, again.
>
> / mounted clean
>
> lvm started
>
> /home fs has errors run fsck (at this point, I'm afraid to try it)
>
> /var, /usr, and /tmp all say that the superblock can not be read, or is
> invalid.  Try running
>
> e2fsck -b 8193 <device>
> or
> e2fsck -b 32768 <device>
>
> Which do I use?
 >
> How did trying to clone the disk nake such a mess of BOTH disks?

Don't blame Clonezilla.  Everything is decaying -- you, me, those hard 
drives, etc..  With that in mind, do the most precious operations first 
-- because in 1 second, 1 minute, 1 hour, 1 day, 1 month, 1 year, 1 
decade, 1 century, whatever, the data will be inaccessible without 
extraordinary means.


Forget about booting off the failing 1 TB disk.  Disconnect it for now.


Forget about booting off the 1 TB recovery disk.  It should now contain 
whatever blocks Clonezilla was able to recover.  It is now in a state 
analogous to Swiss cheese.  Disconnect it for now.


> Any help getting a working system again will be greatly appreciated.

On the computer you use for e-mail, start an administration log folder 
for the machine in question.  Start a log.txt file and take notes.  Cut 
and paste what you can.  Photograph screens and transcribe what you 
can't.  Collect important files.  Put it all into a version control system.


 >> I'd do a fresh install on a 16+ GB SSD (USB flash drives also
 >> work).

Install SSH when you build the new system drive.


Use ssh(1) to log in from your e-mail computer.  Consider using 
script(1) to capture your console sessions, and scp(1) to copy out the 
files.  Read fsck(8) and consider your moves carefully.  Reconnect the 1 
TB recovery disk and see what fsck can recover.


David

[toc] | [prev] | [next] | [standalone]


#177573

FromRic Moore <wayward4now@gmail.com>
Date2017-02-09 00:10 +0100
Message-ID<t8Jx7-6AK-1@gated-at.bofh.it>
In reply to#177546
On 02/08/2017 04:38 PM, Marc Shapiro wrote:
> On 02/08/2017 01:26 PM, Ric Moore wrote:
>> On 02/08/2017 02:37 AM, Marc Shapiro wrote:
>>> How it went is not well.  I tested the new drive with SeagateTools and
>>> it was fine.  Then I made a clonezilla live CD and booted from it.  It
>>> stopped on the first read error with a message saying to restart using
>>> the rescue option.  I did that.  After 5 hours it finished without
>>> mentioning any errors.
>>>
>>> I tried to boot to the old disk (since it was still wired that way).  I
>>> got dropped int a maintenance shell with fs errors in /dev/sda4 which is
>>> the physical volume for all my LVM logical volumes -- /usr, /var, /home
>>> and /temp.  It says to run fsck manually.
>>>
>>> I decided to try the new drive, so I changed the cables and re-booted.
>>>
>>> Maintenance shell, again.
>>>
>>> / mounted clean
>>>
>>> lvm started
>>>
>>> /home fs has errors run fsck (at this point, I'm afraid to try it)
>>>
>>> /var, /usr, and /tmp all say that the superblock can not be read, or is
>>> invalid.  Try running
>>>
>>> e2fsck -b 8193 <device>
>>> or
>>> e2fsck -b 32768 <device>
>>>
>>> Which do I use?
>>>
>>> How did trying to clone the disk nake such a mess of BOTH disks?
>>
>>
>> You cloned a mess, you got a perfect copy. I'd do a clean install to
>> the new drive, after formatting the entire drive. Once you boot into
>> that drive, mount the old drive. It should show up in /media/<username>
>> Then copy the directories of personal stuff you want to keep to a new
>> location on the new drive. I use cp -raf <source directory>
>> <destination> and everything, including sub-directories, file
>> ownership and file permissions are preserved. If a file is clunky, it
>> won't copy it and should proceed.
>>
>> Next, if you are in your office, observe if the window is open. If
>> yes, throw the old drive out of it. :) Ric
>>
>>
> Ric,
>
>
> As soon as I finished my last post (above) I realized that what you
> suggest is exactly what I should have done in the first place.  Why I
> did not realize that earlier (and save myself a lot of headaches) I do
> not know.  The system is now booting to the old drive, just as it did
> before.  I think it just needed a good night's sleep.  I know that I did.
>
> My next steps are:
>
>     Format new drive
>
>     Install fresh on new drive
>
>     Mount and copy /home from old drive to new drive

Careful there, I would not copy any of the /home/username/dot-files or 
dot directories over, except like .mozilla and .thunderbird, so you 
don't carry over some old and crufty setting that might have been 
problematic. To spare you nightmares like this one, I use the /opt 
directory on a separate partition for all of my personal data.
So, I use /opt/ric/Documents and in my brand-new /home/ric directory I 
delete the newly created Documents directory and then link (ln -s 
/opt/ric/Documents Documents) and do the same with the other familiar 
home directories like Videos, Music, Downloads, everything except 
Desktop. If something goes ape, systemk-wise, you can do a fresh install 
of / (root) directory and leave /opt alone. I've done this since the old 
Caldera days. Nary a burp in the barrel! Ric



-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html

[toc] | [prev] | [next] | [standalone]


#177576

FromMarc Shapiro <marcnshap@gmail.com>
Date2017-02-09 00:40 +0100
Message-ID<t8K0a-6KO-13@gated-at.bofh.it>
In reply to#177573
On 02/08/2017 03:06 PM, Ric Moore wrote:
> On 02/08/2017 04:38 PM, Marc Shapiro wrote:
>> On 02/08/2017 01:26 PM, Ric Moore wrote:
>>> On 02/08/2017 02:37 AM, Marc Shapiro wrote:
>>>> How it went is not well.  I tested the new drive with SeagateTools and
>>>> it was fine.  Then I made a clonezilla live CD and booted from it.  It
>>>> stopped on the first read error with a message saying to restart using
>>>> the rescue option.  I did that.  After 5 hours it finished without
>>>> mentioning any errors.
>>>>
>>>> I tried to boot to the old disk (since it was still wired that 
>>>> way).  I
>>>> got dropped int a maintenance shell with fs errors in /dev/sda4 
>>>> which is
>>>> the physical volume for all my LVM logical volumes -- /usr, /var, 
>>>> /home
>>>> and /temp.  It says to run fsck manually.
>>>>
>>>> I decided to try the new drive, so I changed the cables and re-booted.
>>>>
>>>> Maintenance shell, again.
>>>>
>>>> / mounted clean
>>>>
>>>> lvm started
>>>>
>>>> /home fs has errors run fsck (at this point, I'm afraid to try it)
>>>>
>>>> /var, /usr, and /tmp all say that the superblock can not be read, 
>>>> or is
>>>> invalid.  Try running
>>>>
>>>> e2fsck -b 8193 <device>
>>>> or
>>>> e2fsck -b 32768 <device>
>>>>
>>>> Which do I use?
>>>>
>>>> How did trying to clone the disk nake such a mess of BOTH disks?
>>>
>>>
>>> You cloned a mess, you got a perfect copy. I'd do a clean install to
>>> the new drive, after formatting the entire drive. Once you boot into
>>> that drive, mount the old drive. It should show up in /media/<username>
>>> Then copy the directories of personal stuff you want to keep to a new
>>> location on the new drive. I use cp -raf <source directory>
>>> <destination> and everything, including sub-directories, file
>>> ownership and file permissions are preserved. If a file is clunky, it
>>> won't copy it and should proceed.
>>>
>>> Next, if you are in your office, observe if the window is open. If
>>> yes, throw the old drive out of it. :) Ric
>>>
>>>
>> Ric,
>>
>>
>> As soon as I finished my last post (above) I realized that what you
>> suggest is exactly what I should have done in the first place. Why I
>> did not realize that earlier (and save myself a lot of headaches) I do
>> not know.  The system is now booting to the old drive, just as it did
>> before.  I think it just needed a good night's sleep.  I know that I 
>> did.
>>
>> My next steps are:
>>
>>     Format new drive
>>
>>     Install fresh on new drive
>>
>>     Mount and copy /home from old drive to new drive
>
> Careful there, I would not copy any of the /home/username/dot-files or 
> dot directories over, except like .mozilla and .thunderbird, so you 
> don't carry over some old and crufty setting that might have been 
> problematic. To spare you nightmares like this one, I use the /opt 
> directory on a separate partition for all of my personal data.
> So, I use /opt/ric/Documents and in my brand-new /home/ric directory I 
> delete the newly created Documents directory and then link (ln -s 
> /opt/ric/Documents Documents) and do the same with the other familiar 
> home directories like Videos, Music, Downloads, everything except 
> Desktop. If something goes ape, systemk-wise, you can do a fresh 
> install of / (root) directory and leave /opt alone. I've done this 
> since the old Caldera days. Nary a burp in the barrel! Ric
>
>
>
I don't usually go quite that far, but photos, videos, and virtual disks 
are all in /usr/local/  which I will also need to copy over.  You say to 
avoid copying   except .mozilla and .thunderbird.  I have 117 such 
dot-files and dot-directories.  Are you saying only to leave .mozilla 
and .thunderbird and have everything else rebuild when it is next used.  
Admittedly, that will get rid of some cruft, but how should I determine 
if there are others that I should keep?


I tried to format the new drive using st (Seagate Tools).  It said that 
it would remove all data, which is expected, but nothing was removed!  
It also took less than a minute.  Should I be using /dev/sda in the 
command line instead of /dev/sg0 (which is how st -l lists the drive?


Marc



Marc

[toc] | [prev] | [next] | [standalone]


#177577

FromMarc Shapiro <marcnshap@gmail.com>
Date2017-02-09 01:00 +0100
Message-ID<t8Kjw-6RL-13@gated-at.bofh.it>
In reply to#177576
On 02/08/2017 03:37 PM, Marc Shapiro wrote:
> On 02/08/2017 03:06 PM, Ric Moore wrote:
>> On 02/08/2017 04:38 PM, Marc Shapiro wrote:
>>> On 02/08/2017 01:26 PM, Ric Moore wrote:
>>>> On 02/08/2017 02:37 AM, Marc Shapiro wrote:
>>>>> How it went is not well.  I tested the new drive with SeagateTools 
>>>>> and
>>>>> it was fine.  Then I made a clonezilla live CD and booted from 
>>>>> it.  It
>>>>> stopped on the first read error with a message saying to restart 
>>>>> using
>>>>> the rescue option.  I did that.  After 5 hours it finished without
>>>>> mentioning any errors.
>>>>>
>>>>> I tried to boot to the old disk (since it was still wired that 
>>>>> way).  I
>>>>> got dropped int a maintenance shell with fs errors in /dev/sda4 
>>>>> which is
>>>>> the physical volume for all my LVM logical volumes -- /usr, /var, 
>>>>> /home
>>>>> and /temp.  It says to run fsck manually.
>>>>>
>>>>> I decided to try the new drive, so I changed the cables and 
>>>>> re-booted.
>>>>>
>>>>> Maintenance shell, again.
>>>>>
>>>>> / mounted clean
>>>>>
>>>>> lvm started
>>>>>
>>>>> /home fs has errors run fsck (at this point, I'm afraid to try it)
>>>>>
>>>>> /var, /usr, and /tmp all say that the superblock can not be read, 
>>>>> or is
>>>>> invalid.  Try running
>>>>>
>>>>> e2fsck -b 8193 <device>
>>>>> or
>>>>> e2fsck -b 32768 <device>
>>>>>
>>>>> Which do I use?
>>>>>
>>>>> How did trying to clone the disk nake such a mess of BOTH disks?
>>>>
>>>>
>>>> You cloned a mess, you got a perfect copy. I'd do a clean install to
>>>> the new drive, after formatting the entire drive. Once you boot into
>>>> that drive, mount the old drive. It should show up in 
>>>> /media/<username>
>>>> Then copy the directories of personal stuff you want to keep to a new
>>>> location on the new drive. I use cp -raf <source directory>
>>>> <destination> and everything, including sub-directories, file
>>>> ownership and file permissions are preserved. If a file is clunky, it
>>>> won't copy it and should proceed.
>>>>
>>>> Next, if you are in your office, observe if the window is open. If
>>>> yes, throw the old drive out of it. :) Ric
>>>>
>>>>
>>> Ric,
>>>
>>>
>>> As soon as I finished my last post (above) I realized that what you
>>> suggest is exactly what I should have done in the first place. Why I
>>> did not realize that earlier (and save myself a lot of headaches) I do
>>> not know.  The system is now booting to the old drive, just as it did
>>> before.  I think it just needed a good night's sleep.  I know that I 
>>> did.
>>>
>>> My next steps are:
>>>
>>>     Format new drive
>>>
>>>     Install fresh on new drive
>>>
>>>     Mount and copy /home from old drive to new drive
>>
>> Careful there, I would not copy any of the /home/username/dot-files 
>> or dot directories over, except like .mozilla and .thunderbird, so 
>> you don't carry over some old and crufty setting that might have been 
>> problematic. To spare you nightmares like this one, I use the /opt 
>> directory on a separate partition for all of my personal data.
>> So, I use /opt/ric/Documents and in my brand-new /home/ric directory 
>> I delete the newly created Documents directory and then link (ln -s 
>> /opt/ric/Documents Documents) and do the same with the other familiar 
>> home directories like Videos, Music, Downloads, everything except 
>> Desktop. If something goes ape, systemk-wise, you can do a fresh 
>> install of / (root) directory and leave /opt alone. I've done this 
>> since the old Caldera days. Nary a burp in the barrel! Ric
>>
>>
>>
> I don't usually go quite that far, but photos, videos, and virtual 
> disks are all in /usr/local/  which I will also need to copy over.  
> You say to avoid copying   except .mozilla and .thunderbird.  I have 
> 117 such dot-files and dot-directories.  Are you saying only to leave 
> .mozilla and .thunderbird and have everything else rebuild when it is 
> next used.  Admittedly, that will get rid of some cruft, but how 
> should I determine if there are others that I should keep?
>
>
> I tried to format the new drive using st (Seagate Tools).  It said 
> that it would remove all data, which is expected, but nothing was 
> removed!  It also took less than a minute.  Should I be using /dev/sda 
> in the command line instead of /dev/sg0 (which is how st -l lists the 
> drive)?
I just tried this with 'st -i /dev/sda' (which should give drive info) 
and it does nothing, so that doesn't work.  So how do I lay down a low 
level format on this drive?
>
>
> Marc
>
>
>
> Marc
>

[toc] | [prev] | [next] | [standalone]


#177585

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2017-02-09 02:40 +0100
Message-ID<t8LSh-7Ue-3@gated-at.bofh.it>
In reply to#177577
On 02/08/17 15:59, Marc Shapiro wrote:
> So how do I lay down a low level format on [the new 1 TB] drive?

I would use the SeaTools bootable CD to fill the drive with zeroes:

On 02/03/17 23:13, David Christensen wrote:
 > Sometimes you get lucky and the tool is a live CD:
 >
 > 
www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS223ALL.ISO


David

[toc] | [prev] | [next] | [standalone]


#177679 — Re: HELP! Re: How to fix I/O errors? (SOLVED)

FromMarc Shapiro <marcnshap@gmail.com>
Date2017-02-11 08:40 +0100
SubjectRe: HELP! Re: How to fix I/O errors? (SOLVED)
Message-ID<t9ArL-6fy-1@gated-at.bofh.it>
In reply to#177585
On 02/08/2017 05:32 PM, David Christensen wrote:
> On 02/08/17 15:59, Marc Shapiro wrote:
>> So how do I lay down a low level format on [the new 1 TB] drive?
>
> I would use the SeaTools bootable CD to fill the drive with zeroes:
>
> On 02/03/17 23:13, David Christensen wrote:
> > Sometimes you get lucky and the tool is a live CD:
> >
> > 
> www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS223ALL.ISO
>
>
> David
>
I didn't feel like burning a CD and it has been a long time since I had 
a box with a 3.5" floppy (although i do have one or two drives in a box 
somewhere and quite a few of the folppies, themselves, as well) so I 
just used dd to write zeros to the disk.  It took a while, but it did 
the job.  In the end, I picked yet another method for moving to the new 
disk.  As mentioned  in my first post, I am using LVM and I have unused 
space in the VG. I was debating with myself whether I wanted to continue 
to use LVM, or just use raw disk partitions.  I almost went with raw 
disk partitions before I came across 'pvmove', which does exactly what I 
needed.  So...

I partitioned the new disk with 3 physical partitions of 2GB each for 
root/boot partitions.

The 4th partition was set up for LVM and was set as a Physical Volume 
(PV) to be added to the volume group along with my old drive.

Before adding the new disk, I created a new Logical Volume (LV) and 
manually copied my home partition (one user tree at a time) to the new 
partition.  This spat out errors whenever it hit an unreadable sector 
and I redirected those errors to a file for later use.

I then added the LVM partition from the new disk to the Volume Group 
(VG) and did a 'pvmove' for each LV from the old PVto the new PV.

I included the original LV for /home, along with the newly copied LV.  I 
expected it to spit out errors and fail, but it didn't.  I could hear it 
struggle a bit when it hit the bad spots, but then it kept going.  This 
was actually a good thing.  I had the list of affected files from when I 
did the manual copy of the /home partition, so I knew what to check 
after the move.  Several of the files were videos.  Using the original 
files before copying, Xine would play up to the first I/O Error and then 
freeze, even though it continued to read the file and advance the 
timeline until the file ended.  Using the manually copied file, which 
truncated at the first error, I also only got the beginning of the video 
and then it ended.  Using the file from the original LV which I moved to 
the new disk with pvmove, however, gave better results.  There is a bit 
of flicker when it hits a sector that had been unreadable before moving, 
but it continues on so the rest of the video can be viewed.  A few of 
the other files I did delete (Libre Office document files do not survive 
well, but I have a PDF of that file if I ever need it again).

Then I just had to copy over the root/boot partitions which I did from a 
shell after booting my clonezilla CD (it came in handy after all) and 
run lilo on them to make the new disk bootable. Everything seems good, 
now.  I ran the full test from SeagateTools (st) again, today, just to 
verify that all was still good.  It was.  I now have an empty PV in my 
LVM volume group that I will need to remove before I add any new Logical 
Volumes (LVs), but I can do that any time.  Since there are no LVs on it 
nothing will attempt to read from it, or write to it.

I'll keep an eye on the disk for a while, but this should fix the 
problem.  If I ever have a failing disk again I hope that I will 
remember this method because the LVM pvmove command really did make 
moving to another disk easy.  The hard part was dealing with the 
root/boot partitions and getting the new disk bootable.

Hopefully this thread will help someone else who has a similar problem 
in the future.


Marc

[toc] | [prev] | [next] | [standalone]


#177717 — Re: HELP! Re: How to fix I/O errors? (SOLVED)

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2017-02-11 23:30 +0100
SubjectRe: HELP! Re: How to fix I/O errors? (SOLVED)
Message-ID<t9Ol3-6nD-3@gated-at.bofh.it>
In reply to#177679
On 02/10/17 23:39, Marc Shapiro wrote:
> On 02/08/2017 05:32 PM, David Christensen wrote:
>> On 02/08/17 15:59, Marc Shapiro wrote:
>>> So how do I lay down a low level format on [the new 1 TB] drive?
>> I would use the SeaTools bootable CD to fill the drive with zeroes:
>> On 02/03/17 23:13, David Christensen wrote:
>>> Sometimes you get lucky and the tool is a live CD:
>> www.seagate.com/files/www-content/support-content/downloads/seatools/_shared/downloads/SeaToolsDOS223ALL.ISO
> I didn't feel like burning a CD and it has been a long time since I had
> a box with a 3.5" floppy (although i do have one or two drives in a box
> somewhere and quite a few of the folppies, themselves, as well)

3.5" floppy?  The link above is for a live CD.


>  so I just used dd to write zeros to the disk. It took a while, but it 
 > did the job.

For a HDD, the effect should be the same.


> I partitioned the new disk with 3 physical partitions of 2GB each for
> root/boot partitions.  ...
> The 4th partition was set up for LVM and was set as a Physical Volume
> (PV) to be added to the volume group along with my old drive.

The problem with putting everything on one big disk is that it becomes 
impractical to clone the system image.  I'm still climbing the disk 
imaging learning curve, but it's a useful technique that has saved me 
countless hours.


> In the end, I picked yet another method for moving to the new disk. ...

Congratulations on your success battling through it all, especially LVM.


David

[toc] | [prev] | [next] | [standalone]


#177586

Fromrhkramer@gmail.com
Date2017-02-09 03:00 +0100
Message-ID<t8MbE-81G-19@gated-at.bofh.it>
In reply to#177576
On Wednesday, February 08, 2017 06:37:55 PM Marc Shapiro wrote:
> On 02/08/2017 03:06 PM, Ric Moore wrote:
> > On 02/08/2017 04:38 PM, Marc Shapiro wrote:
> > Careful there, I would not copy any of the /home/username/dot-files or
> > dot directories over, except like .mozilla and .thunderbird, so you
> > don't carry over some old and crufty setting that might have been
> > problematic. To spare you nightmares like this one, I use the /opt
> > directory on a separate partition for all of my personal data.
> > So, I use /opt/ric/Documents and in my brand-new /home/ric directory I
> > delete the newly created Documents directory and then link (ln -s
> > /opt/ric/Documents Documents) and do the same with the other familiar
> > home directories like Videos, Music, Downloads, everything except
> > Desktop. If something goes ape, systemk-wise, you can do a fresh
> > install of / (root) directory and leave /opt alone. I've done this
> > since the old Caldera days. Nary a burp in the barrel! Ric

Why not make your own top level directory, i.e. /ric (with Documents and 
such)--that's what I do.

> I don't usually go quite that far, but photos, videos, and virtual disks
> are all in /usr/local/  which I will also need to copy over.  

Same comment as above--why not make your own top level directory for that 
stuff.  (Reading the File Hierarchy Standard (FHS), I don't think that is quite 
the intent of /usr/local--and could make some things inconvenient at one time 
or another...)

> You say to
> avoid copying   except .mozilla and .thunderbird.  I have 117 such
> dot-files and dot-directories.  Are you saying only to leave .mozilla
> and .thunderbird and have everything else rebuild when it is next used.
> Admittedly, that will get rid of some cruft, but how should I determine
> if there are others that I should keep?
> 
> 
> I tried to format the new drive using st (Seagate Tools).  It said that
> it would remove all data, which is expected, but nothing was removed!
> It also took less than a minute.  Should I be using /dev/sda in the
> command line instead of /dev/sg0 (which is how st -l lists the drive?
> 
> 
> Marc
> 
> 
> 
> Marc

[toc] | [prev] | [next] | [standalone]


#177599

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2017-02-09 14:20 +0100
Message-ID<t8WNI-6CT-23@gated-at.bofh.it>
In reply to#177573
On Wed, Feb 08, 2017 at 06:06:34PM -0500, Ric Moore wrote:
> Careful there, I would not copy any of the /home/username/dot-files or 
> dot directories over, except like .mozilla and .thunderbird, so you 
> don't carry over some old and crufty setting that might have been 
> problematic.

I have the exact opposite philosophy.  My home directory has survived
across many, many different operating systems and computers.  If a
new version of some app breaks compatibility with a dot file, which
is rare, then I'll handle that on a case by case basis.  Otherwise,
I get to keep all of my comfortable settings.

[toc] | [prev] | [next] | [standalone]


#177611

FromRic Moore <wayward4now@gmail.com>
Date2017-02-09 18:10 +0100
Message-ID<t90oi-rG-15@gated-at.bofh.it>
In reply to#177599
On 02/09/2017 08:10 AM, Greg Wooledge wrote:
> On Wed, Feb 08, 2017 at 06:06:34PM -0500, Ric Moore wrote:
>> Careful there, I would not copy any of the /home/username/dot-files or
>> dot directories over, except like .mozilla and .thunderbird, so you
>> don't carry over some old and crufty setting that might have been
>> problematic.
>
> I have the exact opposite philosophy.  My home directory has survived
> across many, many different operating systems and computers.

How so?? Don't "many other operating systems" have different 
configuration files in many other locations?? I wouldn't expect BSD 
config files to migrate to Linux, or Windows to do anything useful.


> If a
> new version of some app breaks compatibility with a dot file, which
> is rare, then I'll handle that on a case by case basis.

...and that is you. I suspect that in this case that the OP doesn't wish 
anything to jump up and bite his behind. And, you seem to be able to 
deal with things on a case by case level, but just maybe the OP cannot. 
Ergo, some discretion is in order ...unless you are willing to provide 
life support in person.

> Otherwise,
> I get to keep all of my comfortable settings.

True, true. But, we're now talking about your comfort level, with 
successful builds, and not his. Some empathy is always a good thing, 
especially when it comes to tech support advice. :) Ric


-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html

[toc] | [prev] | [next] | [standalone]


#177613

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2017-02-09 18:20 +0100
Message-ID<t90xX-vh-11@gated-at.bofh.it>
In reply to#177611
On Thu, Feb 09, 2017 at 12:03:18PM -0500, Ric Moore wrote:
> How so?? Don't "many other operating systems" have different 
> configuration files in many other locations?? I wouldn't expect BSD 
> config files to migrate to Linux, or Windows to do anything useful.

When I shared my $HOME between OpenBSD and Debian for a time, I didn't
have many problems at all.  There are some shell functions that I only
created when $(uname -s) was Linux, but that's about it.

Most of the command-line tools that use dot-files in $HOME are the same.
Just stick with the older-common-denominator syntax in things like
~/.muttrc and and ~/.ssh/config and you should be fine.  (Hint: when
mixing Debian with other non-legacy Unixes, usually it'll be Debian that
has the older version of the tool.)

You shared your philosophy ("tear it all down and rebuild it from scratch
every two years") and I shared mine ("keep everything unchanged until
you are forced to change it").  Neither one is right, and neither one
is wrong.  I just wanted both viewpoints to be equally represented.

[toc] | [prev] | [next] | [standalone]


#177652

FromRic Moore <wayward4now@gmail.com>
Date2017-02-10 18:50 +0100
Message-ID<t9nux-6yj-7@gated-at.bofh.it>
In reply to#177613
On 02/09/2017 12:13 PM, Greg Wooledge wrote:

> You shared your philosophy ("tear it all down and rebuild it from scratch
> every two years")

I don't know where you got this. The OP was having one helluva time with 
a harddrive. I suggested that he create a partition to store his 
personal files "more safely" as /opt, when he did a partition, format 
and re-install to the new drive. After he could mount the failing drive 
and copy as many personal files as he could salvage to the new 
/opt/<username> install. Then, if the need arises, a re-install is 
relatively painless. I have never exposed wipe and re-install every two 
years. That would be stupid. The decision to upgrade is purely a 
personal one, driven either by choice or necessity.

> and I shared mine ("keep everything unchanged until
> you are forced to change it").


A dying harddrive will drive change, don't you think??

> Neither one is right, and neither one
> is wrong.  I just wanted both viewpoints to be equally represented.


"Viewpoints", as in politics, do not remedy a failing drive nor the 
rescue of it's contents. That was the reason the OP posted. Please keep 
his needs in mind. Ric


-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web