Koozali.org formerly Contribs.org

Re install grub. No space.

Re install grub. No space.
« on: May 15, 2018, 03:48:47 PM »
Hi, not been able to reinstall grub from the recovery console, it works through the stages and then just says out of space.
DF shows that the /MD0 is 100% So I would assume that I would need to make some space? Suggestions on what to remove?

The full story of this is that the customer had a disk fail. They are fairly computer literate, and so just removed the faulty disk. A few months later of course the second disk failed! (Did tell them they needed new disks too)
Infamy, Infamy, they all have it in for me!

Offline ReetP

  • *
  • 1,193
Re: Re install grub. No space.
« Reply #1 on: May 15, 2018, 04:47:56 PM »
Hi, not been able to reinstall grub from the recovery console, it works through the stages and then just says out of space.
DF shows that the /MD0 is 100% So I would assume that I would need to make some space? Suggestions on what to remove?

If you can mount it check the number of kernels in /boot as I think that may be the bit that has gobbled up the space.

HOWEVER, I'm not sure of the best way to remove them  as they are tied to RPMs obviously. Someone else may be able to help

Quote
The full story of this is that the customer had a disk fail. They are fairly computer literate, and so just removed the faulty disk. A few months later of course the second disk failed! (Did tell them they needed new disks too)

"Ah it's knackered. Well, clearly we don't need it - machine still runs fine without...."

<slapshead>

Can you just rewind a bit and tell the full story.

Presumably a mirrored pair?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Re install grub. No space.
« Reply #2 on: May 15, 2018, 04:56:09 PM »
If you can mount it check the number of kernels in /boot as I think that may be the bit that has gobbled up the space.

HOWEVER, I'm not sure of the best way to remove them  as they are tied to RPMs obviously. Someone else may be able to help

"Ah it's knackered. Well, clearly we don't need it - machine still runs fine without...."

<slapshead>

Can you just rewind a bit and tell the full story.

Presumably a mirrored pair?

Smirk. I am with you all the way on the last comments. The full story is this. I built this server up for them a while back, had a nice mirror pair and all was well with the world. They were maintaining it themselves with updates. Whilst I was away I had a call to say that it would not boot. Seems a duff disk? So I suggested swapping the disk round, and that should get it running. It did. However they wanted to upgrade the disks and were waiting for confirmation of the largest size to fit. As per usual the second disk gave up the ghost it seems, probably tried to do a kernel update and ran out of space. (Speculation on my part) So they have dumped it back in my lap. Disk is 91% full, and the contents of the grub folder seem to be there, but grub.conf is empty! As I said tried to install grub, but now space?
Infamy, Infamy, they all have it in for me!

Offline ReetP

  • *
  • 1,193
Re: Re install grub. No space.
« Reply #3 on: May 15, 2018, 05:26:31 PM »
OK.

Questions.

You have got a backup ??????

You say the second disk died. Why are you trying to mount it or rescue it, or is it not actually dead ?

I would imagine that it tried to do a kernel update that failed when it ran out of space, and probably didn't write the grub file correctly as a result. Whilst it was running it was fine, but the moment they rebooted, carnage ensued.

So the drive *may* be OK, just out of space ?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: Re install grub. No space.
« Reply #4 on: May 15, 2018, 08:23:24 PM »
Yes, you are right, disk seems to be ok.
As for a backup, seems the answer is maybe! Sighs
And yes as you said earlier, I removed some very old files, made some room, and managed to install grub. Said it had completed but still no boot. Not checked the grub.conf yet to see if anything is in it. Did the install to sdb. As sda is my usb boot. Really at my knowledge limit with grub.
Infamy, Infamy, they all have it in for me!

Offline janet

  • ****
  • 4,644
Re: Re install grub. No space.
« Reply #5 on: May 16, 2018, 01:55:07 AM »
Drifting

Have you run a manufacturers test on that remainng drive to see if it is faulty ? There are also tools on contribs (smartctl I think).

I would be treating that diisk as suspect (no matter what) & stop using it immediately eg faulty surface, sectors etc.

You could make a clone of the disk using dd command but it will take a long time.

Then work with the copied disk trying to get it working.


You might be able to do the following but it requires a command to be run on the original drive/system, so as you cannot boot, that is problematic.

Rebuild the server using new disks & then use this Howto to restore directly  from the "faulty" disk (in lieu of there being no known good backup.

https://wiki.contribs.org/UpgradeDisk
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,644
Re: Re install grub. No space.
« Reply #6 on: May 16, 2018, 02:41:19 AM »
Drifting

Did you fo─║low this
https://wiki.contribs.org/Grub
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Re install grub. No space.
« Reply #7 on: May 17, 2018, 11:52:38 AM »
Thanks everyone for their help, as always very appreciated.
The disk is definitely up the creek, quite a few bad blocks. Currently copying all the data I can off onto another disk.
And yes, I did follow the grub wiki, that was when I got the out of space.
Thanks again

Paul.
Infamy, Infamy, they all have it in for me!

Offline Jean-Philippe Pialasse

  • *
  • 1,129
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Re install grub. No space.
« Reply #8 on: May 17, 2018, 01:37:03 PM »
You might have better chances with the clone.

May i suggest you clone the clone too, and work on only one of the copy. Consider you will have only one chance to get data from failing disk. It is also the opportunity to use larger disk !

Then you can do again what is on wiki grub page. Alternatively, try an upgrade with sme9 last iso.