PlugPBX Forums
May 19, 2012, 02:33:24 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Partition table broken on image?  (Read 1408 times)
perlhead
Newbie
*
Posts: 1


« on: February 08, 2010, 08:44:34 AM »

I'm just starting on plugPBX, but the first thing I noticed is that the partition table entry for primary partition 2 goes beyond the end of the device. Now, this probably works most of the time, but it's bound to bring on trouble...

« Last Edit: February 08, 2010, 10:27:59 AM by PlugPBX Admin » Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #1 on: February 08, 2010, 08:48:44 AM »

Hmm. I better take a look.

Know any way of non-destructively fixing the partition table to match the actual partition size on disk?  (so I can fix my existing base system image and re-upload) and also offer users a in field fix...
Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #2 on: February 08, 2010, 10:30:08 AM »

I wonder if this is related to the issue of units failing over time, perhaps if writes are attempted 'out of range' since I screwed up the partitioning.

http://forums.plugpbx.org/index.php?topic=21.0

Time to look over the partition / block range and the errors I posted earlier and see if that is what is happening. Hmm.

Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #3 on: February 08, 2010, 07:27:43 PM »

Lets have a look...

Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mmcblk0p2         3502444    911972   2412556  28% /
tmpfs                   257944         0    257944   0% /lib/init/rw
udev                     10240       128     10112   2% /dev
tmpfs                   257944         0    257944   0% /dev/shm
/dev/mmcblk0p1          210749     17164    182342   9% /boot

Lets check what fdisk says..

Code:
Disk /dev/mmcblk0: 4013 MB, 4013948928 bytes
255 heads, 63 sectors/track, 488 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00072ced

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *           1          28      224878+  83  Linux
/dev/mmcblk0p2              29         471     3558397+  83  Linux
/dev/mmcblk0p3             472         499      224910    5  Extended
/dev/mmcblk0p5             472         499      224878+  82  Linux swap / Solaris

And lets ask it to verify...

Code:
Command (m for help): v
Partitions 5: cylinder 499 greater than maximum 488
Total allocated sectors 8016311 greater than the maximum 7839744

DOH!   Huh

 Cry

How to fix this mess without making a new image *sigh*

Okay so the swap partition is whoopise... I turned my off (might just remove it outright next release) it and its extended companion..

Whats the other issue @perlhead?

--Update--

FYI I've done this to my own PlugPBX ...

1) Removed the swap partition info from /etc/fstab
2) Deleted partitions 4 and 5 via fdisk (no longer used / needed I think )
3) Forced system to restart and fsck itself via  
Code:
shutdown -rF now
command

No file-system errors, I'd assume fsck would get angry if a partition didn't have all its sectors to check?

--Update--

Well something is for sure messed, my webmin just vanished from /etc/webmin ....everything inside is gone. I think I'm going to be building a new system image for the next release of PlugPBX  *sigh* 

$&^@!^#!@&&@

SO....anyone....using this.....be mindful of issues and watch and report them please![/b]
« Last Edit: February 08, 2010, 08:57:59 PM by PlugPBX Admin » Logged

-Greg
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #4 on: February 11, 2010, 07:02:45 PM »

3 Days later, I came down and noticed asterisk not respond, and my serial console (via usb) filled once again... Sad

Code:
[184775.090000] net eth0: tx error
[250877.270000] mvsdio mvsdio: FIFO_EMPTY bit missing
[250877.300000] mmcblk0: error -110 sending read/write command, response 0x400d00, card status 0x400d00
[250877.300000] end_request: I/O error, dev mmcblk0, sector 4119868
....

Dammit.

I have a second SheevaPlug in my house setup same way, same media (not running PlugPBX image), and its been running around 38 days issue free, I wonder if the same SD card troubles will show up there too or not.

Anyone else seeing this? Please post. I'm going to perhaps build another version, maybe the debian asterisk apt builds are better now so I can try those again *sigh*
Logged

-Greg
TenOfZero
Newbie
*
Posts: 17



« Reply #5 on: February 13, 2010, 10:55:48 AM »

My plug is working fine for now. I have it on an 8GB sd card but did not alter the image.

According to free PBX my memory usage is 27% and it has been running for:

System Uptime:   1 week, 3 days, 15 hours, 19 minutes
Asterisk Uptime:   1 week, 3 days, 15 hours, 14 minutes
Last Reload:   5 days, 14 hours, 59 minutes

I think I will take it down now to make a full back-up.
Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #6 on: February 13, 2010, 07:14:55 PM »

I have a hunch.

I think possibly, the partitioning (automatic) with the Debian installer I used might be flawed. I took my breaking system and shrunk the root partition smaller by about 600 megs using the gpartd livecd and a SD card adapter.

I'm noticing the Difference in looking at a cards capacity in GB vs GiB ...ie This card is 4.01 GB, but its 3.73 GiB - I'm wondering if either me, or the installer confused the two?

It would explain why another system I built on a 8 gig SD card is running fine (the Debian net-installer will only format / partition the first 4 gigs of any SD cards I've yet to throw at it...)

*shrug*

I need to sit down and really deep dive over the details, but with a hectic family life, its rare, so I just shut down my own PBX, shrunk it abit and powered it back up. I guess seeing if it lives past 2-3 days again might show something.

In the meantime, I'll keep poking away at a newer build of everything as time permits. This might agree with Perlmonks observations.... 2bit verses 8bit volume sizes anger me Wink

*Update * - Blew up this time after sitting overnight ...I wonder if the SD card is going downhill?

Going to update the kernel on my own system to see if that helps. There is a lack of info on these SD card error(s) online making this very annoying to try and figure out...
« Last Edit: February 14, 2010, 07:07:42 AM by PlugPBX Admin » Logged

-Greg
TenOfZero
Newbie
*
Posts: 17



« Reply #7 on: February 15, 2010, 04:42:09 PM »

Thanks for the work. :-)

So it looks like for now I'll be ok with my 8GB card.
Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #8 on: February 16, 2010, 08:49:00 AM »

Hard to say.

Each SD card is different, many different wear leveling methods (mostly undocumented).

I'm contemplating perhaps creating a version with a /var partition formatted JFFS (disperse writes) and leave the /boot and root filesystems as ext2. The theory being any writes to disk will be staggered thanks to JFFS or something similar...

Logged

-Greg
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Install SimpleMachinesForum web hosting Valid XHTML 1.0! Valid CSS!