LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-11-2012, 03:39 PM   #1
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Rep: Reputation: 0
Disk geometry has one less cylinder


I have a software RAID 10 configuration with a couple of failing drives. I bought replacement drives that have the same model number and same firmware version and installed them. First I used fdisk to create a primary partition (all the other drives have one large partition that takes up the entire disk). However, this results in the partition being one cylinder less than the other partitions, making it too small to join the RAID array. Since we needed the array rebuilt ASAP, I deleted the partition and added the block device to the array instead. So far it appears to be working but it makes me nervous knowing that the system is not configured exactly as it was prior to the disk failure.
Code:
root@gluster1:~# mdadm -D /dev/md0 
/dev/md0:
        Version : 00.90
  Creation Time : Fri Nov 25 20:01:48 2011
     Raid Level : raid10
     Array Size : 2930282304 (2794.54 GiB 3000.61 GB)
  Used Dev Size : 976760768 (931.51 GiB 1000.20 GB)
   Raid Devices : 6
  Total Devices : 6
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon Jun 11 13:23:21 2012
          State : active
 Active Devices : 6
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 0

         Layout : near=2, far=1
     Chunk Size : 64K

           UUID : 71a08ee6:fb932da8:47410f7e:e8606d18
         Events : 0.18217457

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       32        2      active sync   /dev/sdc
       3       8       49        3      active sync   /dev/sdd1
       4       8       64        4      active sync   /dev/sde
       5       8       81        5      active sync   /dev/sdf1
root@gluster1:~# fdisk -l /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00097d47

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121602   976760832   fd  Linux raid autodetect
root@gluster1:~# fdisk -l /dev/sdc

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table
Note that both /dev/sdb and /dev/sdc have 121601 cylinders. /dev/sdb has a partition that ends on cylinder 121602 but if I create a partition on /dev/sdc and use the default (maximum) values, it ends on cylinder 121601. Why isn't it identical to the other drives? As I said earlier, these new disks are the same model number and have the same firmware version as the existing disks.
 
Old 06-11-2012, 07:46 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
It's all just magnetised bits of metal spinning around - why worry ?.

This is artifact of the change in default allocation in fdisk. You might be able to force cylinder allocation, and may need to force the first sector as well. An old system if you happen to have one lying around will have an old fdsik, so maybe a default allocation there might suffice.
 
Old 06-11-2012, 08:07 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
The exact geometry should be either posted on the drive or at the OEM site. If it differs from the posted then return it.

At one time you did have to buy matched drives to get some raid arrays to work. Still might on some hardware raids.
 
Old 06-12-2012, 08:38 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Your disks are exactly the same size (1000204886016 bytes). You're just trying to partition the new one with a different tool or option. Run "fdisk -lu /dev/sdb" to see the exact layout without rounding to cylinders, and then use 'fdisk -u /dev/sdc' to set up the new disk the same way.

Or, if you're in a mood to be bold and daring, you could use sfdisk to copy the partitioning from sdb to sdc:
Code:
sfdisk -d /dev/sdb | sfdisk /dev/sdc
 
Old 06-12-2012, 05:14 PM   #5
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Original Poster
Rep: Reputation: 0
Thanks. I didn't know about the -u option in fdisk. I'll try that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yet another disk geometry question acidjuice *BSD 2 12-06-2005 02:41 PM
disk geometry wrong? blotch *BSD 0 01-07-2005 04:00 PM
Disk Geometry error pinko_liberal Linux - Newbie 2 03-14-2004 01:01 AM
OpenBSD disk geometry help amp2000 *BSD 6 04-27-2002 01:28 PM
Confused about disk geometry rdaves@earthlink.net Linux - General 1 09-20-2001 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration