Koozali.org: home of the SME Server

help newbie with partition table plse

Anonymous

help newbie with partition table plse
« on: June 27, 2004, 12:40:18 PM »
I have (had) a P1 233 running software raid 1 and we probably lost a drive in a brownout overnight.  At first this was very grim as the box wouldnt even reliably boot (or at least stay booted).  Tracked the problem down to the dead hard drive (weirdly boots without it).  Got file system corrupt prompt, enter root password to go to shell and fix it.  

I an e2fsck and it fixed it.

The box runs a booking system for my wifes business (as in vital-as in vital to be running in 12 hrs time) and has been an evolving "learning experience" for me (they dont pay me so they cant expect full service IT)...

The drive is a 20g maxtor and it doesnt seem to be fully used by esmith (this had previously been bugging me but i ignored it assuming i e-smith for whatever reason didnt find the remaining space).  This system has been running 24/7 for 18 months btw.

DF
Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              9.3G  3.7G  5.2G  41% /
/dev/md0               15M  2.9M   11M  21% /boot

Fdisk says this
Disk /dev/hda: 255 heads, 63 sectors, 2498 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        33    265041   fd  Linux raid autodetect
/dev/hda2            34      2498  19800112+   5  Extended
/dev/hda5            34        35     16033+  fd  Linux raid autodetect
/dev/hda6            36        37     16033+  fd  Linux raid autodetect
/dev/hda7            38      1268   9887976   fd  Linux raid autodetect

I have installed raidmonitor after a backup to desktop
Personalities : [raid1]
read_ahead 1024 sectors
md2 : active raid1 hda1[0] 264960 blocks [2/1] [U_]
md0 : active raid1 hda6[1] hda5[0] 15936 blocks [2/2] [UU]
md1 : active raid1 hda7[0] 9887872 blocks [2/1] [U_]
unused devices: <none>

Current partition info saved in /root/raidmonitor/sfdisk.out:

# partition table of /dev/hda
unit: sectors

/dev/hda1 : start=       63, size=  530082, Id=fd, bootable
/dev/hda2 : start=   530145, size=39600225, Id= 5
/dev/hda3 : start=        0, size=       0, Id= 0
/dev/hda4 : start=        0, size=       0, Id= 0
/dev/hda5 : start=   530208, size=   32067, Id=fd
/dev/hda6 : start=   562338, size=   32067, Id=fd
/dev/hda7 : start=   594468, size=19775952, Id=fd

Am I correct in assuming that there is 10gig of unused space still left there?  How can I get at this?

I assume its in half of this part of the disk which is a big extended partition??,

In fact I think the unused bit is from cylinders 1268 to 2498:

/dev/hda2            34      2498  19800112+   5  Extended

I will be racing out tomorrow and buying another hard disk drive to reconstruct the array on to. fingers crossed that will work.  I have binned the P1 233 and replaced it with an asus mobo and celeron (cause i wasnt too sure of the cause and suspected the mobo and the system MUST run tomorrow am).  

Am I on the right track with understanding how the drive is partitioned here?  

Can I make esmith use it (easily?)

thx in advance

JD

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
help newbie with partition table plse
« Reply #1 on: June 27, 2004, 11:31:44 PM »
JD

Your partition table does not match a standard sme install !!! (not at all)
...your raid array data:
>>md2 : active raid1 hda1[0] 264960 blocks [2/1] [U_]
>>md0 : active raid1 hda6[1] hda5[0] 15936 blocks [2/2] [UU]
>>md1 : active raid1 hda7[0] 9887872 blocks [2/1] [U_]

seems taken at a strange time
DURING A RESYNC
AND AFTER YOUR NEW REINSTALL of RAID1 on a single disk (note: md0 on hda6 and hda5 both working [UU]
(= this is worthless even if it's only "/boot" ?!))

The data you show is ALL VERY WRONG !!!

You could REINSTALL SME 6.x ON TWO FRESH DISKS
and restore your backup
(and maybe get some local help if this is so important/urgent).

look at pico /etc/raidtab how things are really  configured...
(which may not be useful since your raid1 seems to run that way :-/
try cat /proc/mdstat ... to have a look at what your raid does now
start reading: http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html

Good luck
Reinhold
............

Offline Boris

  • *
  • 783
  • +0/-0
help newbie with partition table plse
« Reply #2 on: June 28, 2004, 12:25:35 AM »
Quote from: "Reinhold"
Your partition table does not match a standard sme install !!! (not at all)

The standard has changed at version 5.6. Before this version /boot partition was 15Mb and after /boot partition adopted RH new default 100Mb for accomodating larger kernel (multiple versions)
This system was likely originaly installed with e-smith < 5.5.
Quote from: "Guest"

The drive is a 20g maxtor and it doesnt seem to be fully used by esmith (this had previously been bugging me but i ignored it assuming i e-smith for whatever reason didnt find the remaining space).

It was known issue with some configurations then server only seen half of the drive (in your case 10Gb out of 20Gb)
I agree with Reinhold's conclusion on "You could REINSTALL SME 6.x ON TWO FRESH DISKS and restore your backup"
This will assure that new partition will be created for future compatibility and hopefuly drives recognizes and formated properly to their full size.
...

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
help newbie with partition table plse
« Reply #3 on: June 28, 2004, 05:46:08 PM »
I admit I don't know a thing about e-smith versions before 5.6 :-D ...
...nevertheless, if (!) the current partition data given is true i.e. "hda3 & hda4 = size zero (!)" ...I doubt anyone from e-smith or Mitel is responsible  :hammer:
...this is <ahem> "garbage" .-)
...AND... md0, the raid1 drive on hda5 + hda6 is even worse... less safe that a plain setup  :hammer:  :hammer:  :hammer:

Current 6.x setup IMHO is still "below optimum" but it will fdisk root to "fill" or full hd capactiy and a leave a reasonable layout...

MD ... as we both say: "Get rid of that partition table" ...asap ...as fair as I'm concerned

Reinhold

P.S.: I really would like to have access to the original Redhat ks.conf ...  :idea:
Anybody know know some leads (url) to reconfigure the severely "handicapped" Mitel configuration procedure and reintroduce Kickstart to it's fullest ??? :pint:
............