[SOLVED]Multiply-claimed block(s) in inode errors on boot

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED]Multiply-claimed block(s) in inode errors on boot

Postby Myles » Jan 18th, '18, 12:25

I searched the forums for this problem but I couldn't find anything.

So, I didn't shut down my system the other night but just powered it off. I have been doing this for a few weeks now because I couldn't be bothered waiting for the shutdown rigmarole of checking drives etc. Anyway on the morning before last it wouldn't boot. I was presented with a black screen in a "Repair:" scenario. Asking to type in "Journalctl -xb" or press "Control-D to continue".
So, I typed in "Journalctl -xb" and went through all of the start-up msgs. Near the end I came upon a series of msgs like this:
"Mageia_Data : Multiply-claimed block(s) in inode 116788128: 467376358" or
"Mageia_Data : Multiply-claimed block(s) in inode 117047301: 468563968--468564520"

Then to run fsck manually. (without -a and -p) (See image below - I hope you can see it okay.)
[img]
Multiply-claimed%20inode%20error%20msgs.jpg
[/img]

There are 64 inodes that are the problem.

Anyway, I probably caused this by just powering down my computer rather than shutting it down properly - so, self-inflicted pain! :cry:

But, be that as it may - I have absolutely no idea how to proceed from here. I have never run fsck so no idea what options or anything that that I would have to use to rectify this situation.

I do have another install of MGA6 in a separate partition (that I installed when I was having lots of problems after upgraing to #6, re-installing and then problems caused by
the nouveau driver freezing the X-server). Anyway, on this instance I can successfully mount the offending (internal drive) Mageia_Data. So if I need to run fsck and fix these errors I should be able to. (shouldn't I?)

As always, any help gratefully accepted.
Attachments
Multiply-claimed inode error msgs.jpg
Multiply-claimed inode error msgs.jpg (2.73 MiB) Viewed 5100 times
Last edited by Myles on Jan 22nd, '18, 07:43, edited 1 time in total.
Myles,
Canberra, Australia
User avatar
Myles
 
Posts: 276
Joined: Apr 29th, '12, 10:05

Re: Multiply-claimed block(s) in inode errors on boot

Postby wintpe » Jan 18th, '18, 16:00

Hi Myles

i was just going to laugh falling off my chair and say tough..... :lol:

as you have found out cached data not yet written to disk just went up in smoke leaving filesystem half saved and in a mess.

unix has always since the very beginnings required this correct powerdown, long before microsoft invented windows NT, requiring the same, for the same reasons.

im afraid from experience the only way to get your filesystem sane is to run fsck.

fsck does have a -y option, some say dont use it, and answer every question, but when its 10000 questions theres not much you can do -y is the only solution.

it should move unallocated inodes to lost and found where you can do a strings on them to see if you can work out if any are your data.

but it will keep fscking until the filesystem consistency is sane.

if its data that you might loose then definitely trawl through lost and found.

if its just system, you can always reinstall the system, or if you can get the system up in text and networked mode, reinstall the rpm's fully so that any missing files get replaced.

oh and lastly if you are going to switch a system off , before shutting it down properly, while never recommended, at least run sync before you do.
then at least the cached filesystem data will be synced to disk.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Multiply-claimed block(s) in inode errors on boot

Postby doktor5000 » Jan 18th, '18, 19:22

wintpe wrote:oh and lastly if you are going to switch a system off , before shutting it down properly, while never recommended, at least run sync before you do.


This can be done via Magic SysRQ keys even when the X server is not responding anymore, as long as the kernel is still OK. See e.g. https://en.wikipedia.org/wiki/Magic_SysRq_key
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18055
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Multiply-claimed block(s) in inode errors on boot

Postby Myles » Jan 19th, '18, 02:41

Peter,
We meet again! Thankyou so much for your very valuable reply, as always. (you helped me out last year with getting OpenVPN working and the nouveau driver problem).

Darn, forgot about the cached data!
Also, one other salient point I omitted when I submitted this, is that originally the inode errors were on Mageia_ROOT. That didn't look good so because of that, and other reasons due to other problems with updates that were a bugbear, I decided to re-install from the DVD and start from scratch. System booted fine, I had started setting it up and then had to reboot, this is when I hit this problem with the inodes on Mageia_Data! Does that shed a new light on things or change the complexity of what I should do and how I should approach this problem? Sorry, I should have written that bit of information at the very begining of the initial problem. My bad!

On this drive are all of my documents, movies and photos. When I powered it off (late in the evening) all of my backups should have run. (I had better check the logs to see if they all ran successfully - I can get to my backed up home drive). So if need be could I just format the drive and copy all of my data back? Or would it be better for system consistency to run fsck and go through the 64 questions??? Also, if I run fsck, is it just "fsck -y" and that's the only option I need to specify?

And doktor, thanks for your input as well, always appreciated. I'll have a read of the article to appraise myself of this option.
Myles,
Canberra, Australia
User avatar
Myles
 
Posts: 276
Joined: Apr 29th, '12, 10:05

Re: Multiply-claimed block(s) in inode errors on boot

Postby wintpe » Jan 19th, '18, 11:29

ive no idea why your original consistency error occurred but bad blocks on the drive can cause this.

so can bad power, ie interrupted power

there is a program called badblocks you can run under mageia and it will test your drive.

by default it enters non destructive mode, ie it puts your data back after testing the block.

anyways if you are sure you have great backups definitely re-install would be the simplest

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Multiply-claimed block(s) in inode errors on boot

Postby Myles » Jan 20th, '18, 09:20

Peter,
Now I'm REALLY stuffed!
I used fdisk to delete the disk partiton, recreate, format as ext4 etc. After much mucking around in MCC giving it a label (and trying to give it a mount point which gave a strange msg). I finally re-booted and I was able to mount the newly formatted Mageia_Data drive in Dolpin and see a folder "lost+found". BUT, the funny thing is I cannot R-click on the drive to see the properties, nor can I copy 'n' paste the backup folders onto new Mageia_Data!! Both the drives are mounted in the same directory:

Code: Select all
[root@Bilbo myles]# df
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           3.9G  1.1M  3.9G   1% /run
/dev/sda7        15G   13G  1.5G  90% /
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs           3.9G  604K  3.9G   1% /tmp
/dev/sda2        59G   59G  496M 100% /media/win_d
/dev/sdb1        98G   95G  3.1G  97% /media/win_c
/dev/sdb5       1.8T  769G  983G  44% /media/win_d2
tmpfs           794M     0  794M   0% /run/user/984
tmpfs           794M   16K  794M   1% /run/user/1000
/dev/sdi2       3.7T  2.9T  824G  78% /run/media/myles/NexStar_4Tb
/dev/sdc1       1.8T   77M  1.7T   1% /run/media/myles/Mageia_Data
[root@Bilbo myles]# cp -R /run/media/myles/NexStar4Tb/'Backup Files'/Mageia_64/Home_Folders/ /run/media/myles/Mageia_Data/
cp: cannot stat '/run/media/myles/NexStar4Tb/Backup Files/Mageia_64/Home_Folders/': No such file or directory
[root@Bilbo myles]# cp -R /run/media/myles/NexStar_4Tb/'Backup Files'/Mageia_64/Home_Folders/ /run/media/myles/Mageia_Data/
cp: cannot stat '/run/media/myles/NexStar_4Tb/Backup Files/Mageia_64/Home_Folders/': No such file or directory
[root@Bilbo myles]# cd /
[root@Bilbo /]# cp -R /run/media/myles/NexStar_4Tb/'Backup Files'/Mageia_64/Home_Folders/ /run/media/myles/Mageia_Data/
cp: cannot stat '/run/media/myles/NexStar_4Tb/Backup Files/Mageia_64/Home_Folders/': No such file or directory
[root@Bilbo /]# cp -R "/run/media/myles/NexStar_4Tb/Backup Files/Mageia_64/Home_Folders/" /run/media/myles/Mageia_Data/
cp: cannot stat '/run/media/myles/NexStar_4Tb/Backup Files/Mageia_64/Home_Folders/': No such file or directory
[root@Bilbo /]# cd /run/media/myles/
[root@Bilbo myles]# ls -ol
total 20
drwxr-xr-x 3 root   4096 Jan 20 17:08 Mageia_Data/
drwxrwxrwx 1 myles 16384 Jan 15 11:49 NexStar_4Tb/
[root@Bilbo myles]# cd /NexStar_4Tb
bash: cd: /NexStar_4Tb: No such file or directory
[root@Bilbo myles]# cd /NexStar_4Tb/
bash: cd: /NexStar_4Tb/: No such file or directory
[root@Bilbo myles]# ^C
[root@Bilbo myles]#


I'm trying to copy the data back from NexStar_4Tb on newly formatted Mageia_Data, but as you can see it says I can't.
Is it the permissions that are a problem????
I'm out of my depth at the moment!
What to do?
Last edited by isadora on Jan 20th, '18, 09:44, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
Myles,
Canberra, Australia
User avatar
Myles
 
Posts: 276
Joined: Apr 29th, '12, 10:05

Re: Multiply-claimed block(s) in inode errors on boot

Postby Ken-Bergen » Jan 20th, '18, 10:23

The folder you want isn't in the root directory so try
Code: Select all
[root@Bilbo myles]# cd NexStar_4Tb
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Multiply-claimed block(s) in inode errors on boot

Postby doktor5000 » Jan 20th, '18, 15:28

The problem with the cp commands is more that the drive now has a different label. NexStar_4Tb but before it seems it was called NexStar4Tb without the underscore, at least that's where you try to copy from.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18055
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Multiply-claimed block(s) in inode errors on boot

Postby Myles » Jan 21st, '18, 08:49

Ken and doktor, thanks for that - but it hasn't got anything to do with NexStar_4Tb - nothing was done to that at all; it's name has always been that. The drive I had problems with and mucked around with and formatted was Mageia_Data.

BUT - all of what I put in the the previous post was a red herring (and sorry isadora for not using the "code" quotes). The actual problem, was I didn't look at what the ACTUAL file path was.....D'OH!!!

The below cmd is what I should have put in and now have on my - yet-again - re-installed system. Notice the folder path includes "/Backup files/ NOT /Backup Files/ as I thought - and usually would named it!!! Idiot! :oops:

Code: Select all
cp -R /run/media/myles/NexStar_4Tb/'Backup files'/Mageia_64/Home_Folders/ /run/media/myles/Mageia_Data/


And I think that the problem with the drive is that 'root' is the owner of the drive.

Anyway, after I have copied all of the data back I'll see if I can "chown" it to my id so I can use it.
Myles,
Canberra, Australia
User avatar
Myles
 
Posts: 276
Joined: Apr 29th, '12, 10:05

Re: Multiply-claimed block(s) in inode errors on boot

Postby jiml8 » Jan 22nd, '18, 03:05

Would have been lots easier to just use fsck and not reformat the drive.

If the root of the filesystem is corrupted, as you indicated, then what you do is boot the system using a bootable USB stick or a CDROM or DVD with a Live distro on it.

You can do all your repairs from that distro, with a miniscule fraction of the pain you are currently experiencing.

For myself, I have a number of different USB sticks (and a couple of DVDs) around so I can boot into pretty much anything (either current or historical) to deal with any problem I am likely to encounter.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Multiply-claimed block(s) in inode errors on boot

Postby Myles » Jan 22nd, '18, 07:43

Thanks jiml8. But even though it was a PITA, (I'm almost finished re-installing/setting up my re-installed system from when I got the first inode errors on the root drive!) - it's been a valuable learning experience (once again! for me. I now know how to copy to preserve the dates of my files (I found that out out AFTER I had already copied over everything to the re-formatted Mageia_Data drive - I had to delete the folders and files and re-copy).

So, as I said, I'm almost done recovering from my stupidity. :oops:

Thanks to Peter, doktor, Ken and yourself jiml8, always appreciated.
Myles,
Canberra, Australia
User avatar
Myles
 
Posts: 276
Joined: Apr 29th, '12, 10:05


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron