DiscussWorldIssues - Socio-Economic Religion and Political Uncensored Debate

DiscussWorldIssues - Socio-Economic Religion and Political Uncensored Debate (http://www.discussworldissues.com/forums/)
-   Science Forum (http://www.discussworldissues.com/forums/science-forum/)
-   -   Running FSCK on a LVM array (http://www.discussworldissues.com/forums/science-forum/156615-running-fsck-lvm-array.html)

CoenceLomneedtrue 03-31-2012 05:25 PM

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 04-01-2012 08:50 PM

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

QHdy5Z3A 04-01-2012 09:35 PM

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.

excivaamome 04-03-2012 05:16 PM

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 04-03-2012 05:18 PM

This might also be of help
http://www.cyberciti.biz/faq/linux-f...boot-sequence/

CoenceLomneedtrue 04-03-2012 10:02 PM

Quote:

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 04-03-2012 10:04 PM

Quote:

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 04-03-2012 10:06 PM

Quote:

This might also be of help
http://www.cyberciti.biz/faq/linux-f...boot-sequence/
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

QHdy5Z3A 04-03-2012 10:31 PM

Quote:

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 04-03-2012 10:32 PM

Quote:

- how did you get a "General Science" badge?
It just came up one day.

excivaamome 04-04-2012 03:44 AM

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

CoenceLomneedtrue 04-05-2012 03:39 AM

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 04-05-2012 03:41 AM

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 04-05-2012 03:48 AM

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 04-05-2012 04:03 AM

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 04-05-2012 05:01 AM

3231 read errors
still 96% complete, but miraculously kicking along at 15mb/s

excivaamome 04-05-2012 03:14 PM

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.

CoenceLomneedtrue 04-05-2012 04:03 PM

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?

Nicihntm 04-05-2012 04:22 PM

Quote:

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

excivaamome 04-05-2012 05:52 PM

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


All times are GMT +1. The time now is 11:06 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2