-   Linux - Hardware (
-   -   Partitioning questions... (

kmbarlow 03-07-2013 12:37 AM

Partitioning questions...
Hi all,

I am new to this and was wondering if someone could help me out. I have Ubuntu 12.04 installed on a custom built computer. I have a RAID 0 setup across 2 160 GB disks (512 sector size). I have been thinking that my system is not performing as well as it should be lately. When I apply the system updates, they are now taking an extended length of time to complete (up to 20-30 mins).

I am thinking the problem is I/O related as it's things like updates which give me the most grief (slowing the system to a crawl and top is not showing high levels of memory/CPU utilization).

I have done some digging and found some curious items in my partition tables. sfdisk is showing two empty partions (gparted complains about partitions not on the disk):


kbarlow@atlantia:/home/kbarlow$ sudo sfdisk -d /dev/mapper/isw_cacihdigbh_Volume0
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
# partition table of /dev/mapper/isw_cacihdigbh_Volume0
unit: sectors

/dev/mapper/isw_cacihdigbh_Volume0p1 : start=      512, size=599995392, Id=83, bootable
/dev/mapper/isw_cacihdigbh_Volume0p2 : start=599996416, size= 25157632, Id= 5
/dev/mapper/isw_cacihdigbh_Volume0p3 : start=        0, size=        0, Id= 0
/dev/mapper/isw_cacihdigbh_Volume0p4 : start=        0, size=        0, Id= 0
/dev/mapper/isw_cacihdigbh_Volume0p5 : start=599998464, size= 25155584, Id=82

also, fdisk doesn't show these partitions but shows some weird values for I/O size:


kbarlow@atlantia:/home/kbarlow$ sudo fdisk -l /dev/mapper/isw_cacihdigbh_Volume0

Disk /dev/mapper/isw_cacihdigbh_Volume0: 320.1 GB, 320079134720 bytes
255 heads, 63 sectors/track, 38914 cylinders, total 625154560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 131072 bytes / 262144 bytes
Disk identifier: 0x0007c90a

                              Device Boot      Start        End      Blocks  Id  System
/dev/mapper/isw_cacihdigbh_Volume0p1  *        512  599995903  299997696  83  Linux
/dev/mapper/isw_cacihdigbh_Volume0p2      599996416  625154047    12578816    5  Extended
/dev/mapper/isw_cacihdigbh_Volume0p5      599998464  625154047    12577792  82  Linux swap / Solaris

Looking at this link

I think I should be able to simply delete the two empty partitions (I think the installer had some difficulties when setting up the partitioning structure). However, I am wondering if I have a misconfiguration with respect to the I/O size values... most of the samples I see that people have posted appear to have I/O sizes set to 512 or 4096 (advanced formatting). I don't know if these values are to be expected because of the RAID 0 configuration or what... Can anyone shed some light on this?



pan64 03-07-2013 03:54 AM

as far as I know p3 and p4 are not real partitions but spaces (or slots) for two primary partitions. By default 4 partition entries exist and you use only two. p1 is a primary bootable linux partition, p4 is an extension. It may contain 4 additional entry, but it has only one (p5 which is a swap).
You cannot remove p3 and p4, they do not exist, they are just placeholder for two additional primary partition.

TobiSGD 03-07-2013 05:59 AM

pan64 is right, this is just a weird display format used by sfdisk, actually the partitions you see as empty just don't exist, which is why fdisk doesn't show them.

To your actual problem, have you tried a disk benchmark or just a simple test with

hdparm -Tt /dev/mapper/isw_cacihdigbh_Volume0p1
to see if disk performance is in fact your problem?

kmbarlow 03-07-2013 02:16 PM

I installed iotop and have tried to look at that to see what it says. Unfortunately, I haven't done it during the system updates yet. I need to examine that a bit more closely. I can say that the activity indicator on my system appears to be a constant red instead of a flurry of activity like it usually is. Maybe this is more indicative of pending hard drive failures? I ran an fsck on the partition and it reported it as clean but I am curious of the result as it completed immediately - took almost no time. I should check the SMART status of the drives though I believe the BIOS would warn me on boots if there was a message.

I will give the hdparm command you suggested a try and see what it results. I am glad to know the partition structure is normal. Those I/O size numbers not being in sync w/ the section sizes doesn't appear alarming to you guys I take it?



kmbarlow 03-08-2013 08:09 PM

@TobiSGD - Thanks! I took your suggestion and tried some benchmarks. I think I definitely do have a problem. My read speed turned out OK:


kbarlow@atlantia:~$ sudo hdparm -Tt /dev/mapper/isw_cacihdigbh_Volume0p1
 Timing cached reads:  23218 MB in  2.00 seconds = 11621.62 MB/sec
 Timing buffered disk reads: 358 MB in  3.00 seconds = 119.17 MB/sec

but my write speed is abysmal:


IOzone 3.405:
    pts/iozone-1.8.0 [Record Size: 4Kb - File Size: 512MB - Disk Test: Write Performance]
    Test 1 of 1
    Estimated Trial Run Count:    3
    Estimated Time To Completion: 22 Minutes
        Started Run 1 @ 19:40:01
        Started Run 2 @ 19:47:21
        Started Run 3 @ 19:54:53  [Std. Dev: 1.27%]

    Test Results:

    Average: 2.30 MB/s

I will have to do some diagnosing.


kmbarlow 03-09-2013 01:59 AM

Running some diagnostics on my hard drives showed that one is in fact showing some health issues:


kbarlow@atlantia:~$ sudo ./HDSentinel
Hard Disk Sentinel for LINUX console 0.08 (c) 2008-2011     
Start with -r [reportfile] to save data to report, -h for help                 
Examining hard disk configuration ...                                           
HDD Device  0: /dev/sda                                                         
HDD Model ID : WDC WD1600JS-00NCB1                                             
HDD Serial No: WD-WCANM7285475                                                 
HDD Revision : 10.02E02                                                         
HDD Size    : 152628 MB                                                       
Interface    : S-ATA II                                                         
Temperature  : 40 C                                                           
Highest Temp.: 62 C                                                           
Health      : 64 %                                                            
Performance  : 100 %                                                           
Power on time: 658 days, 4 hours                                               
Est. lifetime: 477 days                                                         
HDD Device  1: /dev/sdb
HDD Model ID : WDC WD1600JS-00NCB1
HDD Serial No: WD-WCANM7285467
HDD Revision : 10.02E02
HDD Size    : 152628 MB
Interface    : S-ATA II
Temperature  : 38 C
Highest Temp.: 52 C
Health      : 100 %
Performance  : 100 %
Power on time: 657 days, 21 hours
Est. lifetime: more than 1000 days

Smart status appeared to be OK but badblocks showed that there was, in fact, bad blocks. Will look into replacing the drive.

Marking thread solved. Thanks for your help!

kmbarlow 03-16-2013 12:59 AM

Follow up
Just as a follow up for anyone who might be trying to diagnose similar errors.

More diagnosis confirmed the bad blocks were affecting the systems ability to read partition table information. I received errors indicating the partition table did not exist after removing and recreating the partition. Ultimately, after splitting the raid and removing the bad hard drive, the remaining good hard drive was able to sustain about 55 MB/s using the same test that yielded a 2.5 MB/s throughput in RAID-0 configuration.

All times are GMT -5. The time now is 12:00 AM.