LOGO
Reply to Thread New Thread
Old 03-31-2012, 05:25 PM   #1
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default Running FSCK on a LVM array
My Fedora machine isn't booting to OS, this morning after a particularly difficult 50km ride into 25km/h headwinds I cam home and the machine was behaving quite oddly.
The monitor looked normal with a mail client visible on-screen, but in every other respect the machine was un-responsive, I thought that the keyboard may have lost it's bluetooth connection - nope all the blue lights were on.
So against my better judgement I did a 'hard re-boot' - pressed the reset button
I can get to GRUB, but whenthings proceed past this stage I get an error page wich says (in part)
try running fsck manually (without -a -p switches)
dropping to a shell
will try and mount file system after exit
I have two seperate drives in the box, I assume that they'll be sda1 and sdb2 or something but when I try to run "e2fsck /devsda1" it says the drive is busy or in use (which I sort of expected) which probably means that I have to run FSCK on boot but I'm burgered if I know how to do it.

So I'm going to dig around for a live disc and try to checkrepair the file systems on each drive without mounting the HDDs

Unless of course someone has a brilliant plan for an alternative way of recovering this PC

What's a good live distro for this sort of caper these days?
CoenceLomneedtrue is offline


Old 04-01-2012, 08:50 PM   #2
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
as an addendum
I don't suppose anyone would know why when I'm in a Live Environment (running an OS from an optical drive) I keep getting errors saying that SDA isn't available because it's being accessed by some other programme, I can neither mount nor unmount the drive running as root using a terminal
CoenceLomneedtrue is offline


Old 04-01-2012, 09:35 PM   #3
QHdy5Z3A

Join Date
Oct 2005
Posts
393
Senior Member
Default
Other than running that live disk on another system to see how it behaves there, it sounds like the HDD in question (or the controller) have serious issues.
Or try another known good HDD in the system (removing the dodgy one) & see how it behaves.
QHdy5Z3A is offline


Old 04-03-2012, 05:16 PM   #4
excivaamome

Join Date
Nov 2005
Posts
381
Senior Member
Default
This link might be of help
http://unix.stackexchange.com/questi...been-confirmed

Also to note, with an LVM array you shouldn't run fsck on the individual drives. instead it should be run on the logical volume (e.g. /dev/VolGroup00/LogVol00)
You can use lvdisplay to get the correct device name for your volume. It might be that the individual devices are reported as busy because the live os has seen that they are part of a LVM set and has auto mounted them, or perhaps these days e2fsck is smart enough to recognise lvm members and refuses to check them.
Read here for more
http://forums.fedoraforum.org/archiv.../t-139776.html
excivaamome is offline


Old 04-03-2012, 05:18 PM   #5
excivaamome

Join Date
Nov 2005
Posts
381
Senior Member
Default
This might also be of help
http://www.cyberciti.biz/faq/linux-f...boot-sequence/
excivaamome is offline


Old 04-03-2012, 10:02 PM   #6
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
Other than running that live disk on another system to see how it behaves there, it sounds like the HDD in question (or the controller) have serious issues.
Or try another known good HDD in the system (removing the dodgy one) & see how it behaves.
The upshot is ...
HDD is failing (the live OS reports to me that the HDD has many bad sectors)
so my plan now is .........

I now know which drive is about to cark it
remove it from the PC (which is turned off, of course)
drop it into a cradle
clone it using HDDClone to a newly formatted new drive (it's ext4) that's also in an external case
I'm hoping that HDDClone won't copy bad sectors but if it does I should be able to run some sort of repair programme
CoenceLomneedtrue is offline


Old 04-03-2012, 10:04 PM   #7
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
Or try another known good HDD in the system (removing the dodgy one) & see how it behaves.
it's an LVM set-up I need the two discs to boot

- how did you get a "General Science" badge?
(or is that your new Nick 'The General')
CoenceLomneedtrue is offline


Old 04-03-2012, 10:06 PM   #8
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
it wasn't much help for the current problem
I'd have to be able to boot the machine to get it to check for errors on boot, and I have only been able to boot to the optical drive
CoenceLomneedtrue is offline


Old 04-03-2012, 10:31 PM   #9
QHdy5Z3A

Join Date
Oct 2005
Posts
393
Senior Member
Default
I'm hoping that HDDClone won't copy bad sectors but if it does I should be able to run some sort of repair programme
It will copy whatever it finds there. Not sure what it would put on the new drive in the event of a sector being unreadable.
QHdy5Z3A is offline


Old 04-03-2012, 10:32 PM   #10
QHdy5Z3A

Join Date
Oct 2005
Posts
393
Senior Member
Default
- how did you get a "General Science" badge?
It just came up one day.
QHdy5Z3A is offline


Old 04-04-2012, 03:44 AM   #11
excivaamome

Join Date
Nov 2005
Posts
381
Senior Member
Default
OK, I had just thought that you might be able to create the forcefsck file from the live disc, then try to boot off the LVM, if it could load the kernel and read e2fsck it might have been able to start the file system check before it encountered the bad sectors.

(the live OS reports to me that the HDD has many bad sectors) Does this mean that you are able to perform an fsck from the live disc, or is the live disc reporting on the SMART status of the drive?
In either case it shouldn't be a problem for cloning the disc as the data should have been moved to clean sectors. It might be an issue depending on the cloning process used, most cloning procedures should recognise blocks that are marked as bad and skip them. If a higher level cloning system is used it might fail if the file system contains errors, or is marked as not being cleanly unmounted.

It might pay to read up if there are any special requirements for cloning part of an LVM set, I wouldn't think that the drives can operate independently with their own file systems, so a file system blind, block by block clone method might be needed. And possibly some LVM repair tools.

Why not just plug the new drive into this system and use a live disc to clone the drive (or ideally the whole LVM set)

Parted Magic is a live disc with a lot of useful drive duplication and repair tools
http://partedmagic.com/doku.php
excivaamome is offline


Old 04-05-2012, 03:39 AM   #12
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
So I have been running HDDClone 4.1 (the free version) for about 12 hours and it seems to have been stuck at 96% for around 2 hours,
The programme reports 1400 or so read errors with zero write errors
So I'm guessing that the failing (source) drive has that many bad sectors but the target drive is hunky dory
I last used this programme when I had an almost-new Microsoft Windows XP computer, does it eventually just give up, or will it keep going until........... ??
- I click the stop button

"Echidna" !!!!!!
CoenceLomneedtrue is offline


Old 04-05-2012, 03:41 AM   #13
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
Why not just plug the new drive into this system and use a live disc to clone the drive (or ideally the whole LVM set) because ....
it's a half-size case, and only has room for two HDDs
CoenceLomneedtrue is offline


Old 04-05-2012, 03:48 AM   #14
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
The number of read errors has just skyrocketed, of the 1,500,000 sectors read so far there has been 2373 failed
erm, that penulitmate question remains

How long should I let this cloning caper run until it becomes obvious that it is no longer doing anything useful and I should pull the plug?
CoenceLomneedtrue is offline


Old 04-05-2012, 04:03 AM   #15
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
so I suppose another question would be is it worth trying the 'pro' version with it's added extras ?
- or just leave this sitting here at 96% (the programme says that it's reading/sriting at 15mb/s but I think it's not being completely honest and frank with me
CoenceLomneedtrue is offline


Old 04-05-2012, 05:01 AM   #16
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
3231 read errors
still 96% complete, but miraculously kicking along at 15mb/s
CoenceLomneedtrue is offline


Old 04-05-2012, 03:14 PM   #17
excivaamome

Join Date
Nov 2005
Posts
381
Senior Member
Default
Did you mean HDClone http://www.miray.de/order/sat.hdclone.pe.html ?

Rather than spend $106 on HDclone Professional, which i suspect will do nothing to improve reading of the faulty drive, I would strongly suggest spending $87 on SpinRite http://www.grc.com/sr/spinrite.htm.
If the problem can be fixed short of disassembling the drive in a clean room, SpinRite will fix it.
excivaamome is offline


Old 04-05-2012, 04:03 PM   #18
CoenceLomneedtrue

Join Date
Oct 2005
Posts
514
Senior Member
Default
who said anything about spending $106 ????
- go an wash your mouth out with soap!!!

The free HDDClone has finished so I'll see if it has copied errors

Spinrite probably won't repair bad superbloxcks though
will it?
CoenceLomneedtrue is offline


Old 04-05-2012, 04:22 PM   #19
Nicihntm

Join Date
Oct 2005
Posts
562
Senior Member
Default
Spinrite probably won't repair bad superbloxcks though
will it?
I seem to recall that it will detect them and mark them. This will make a rivetting read http://serverfault.com/questions/167...epair-bad-bloc
Nicihntm is offline


Old 04-05-2012, 05:52 PM   #20
excivaamome

Join Date
Nov 2005
Posts
381
Senior Member
Default
The superblock is a logical construct of the file system. SpinRite doesn't care if it is looking at a super block or user data block. In fact SpinRite is file system agnostic, and can even be run on unformatted drives.

SpinRite works on a sector by sector approach. As each physical sector on the platter has it's own error correcting code, SpinRite will try to read damaged sectors multiple times (and multiple ways) to try and recover the data. SpinRite also has it's own advanced error correcting algorithms which it employs when the sectors can not be fully read. When a damaged sector is successfully read (or SpinRite determines it can't be read) the recovered data is moved to a new sector and the original marked as bad. Even if the sector can not be fully recovered SpinRite can usually read most of the data, recovering what it can rather than discarding the entire sector.

Most file system duplication programs work on either a file by file copy procedure, or preferably a block by block procedure. Even when a block by block approach is employed it should be remembered that the block is a file system abstraction, and each block can span multiple physical sectors. This approach can leave a large amount of otherwise readable data discarded when a bad block is encountered.

It's worth having a read about how SpinRite works
http://www.grc.com/files/technote.pdf
excivaamome is offline



Reply to Thread New Thread

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

All times are GMT +1. The time now is 10:35 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 PL2
Design & Developed by Amodity.com
Copyright© Amodity