Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have two identical HDD. First has geometry 3876021/16/63 and second has geometry 3876018/16/63. First disk's capacity is 50% already. I want to add second disk to mirror (first disk is master). How to fix geometry in second disk? And why geometry isn't match for identical disks?

System: FreeBSD 8.1, mirror: gmirror.

share|improve this question
    
...wouldn't that mean they're not identical? –  Bart Silverstrim Jan 27 at 3:33
    
I thought geometry is a physical thing, so you can't "change" the geometry. That said, if the capacity matches, you should be able to mirror the volumes or create a mirror where the max size of the mirror is the size of the smaller capacity drive... –  Bart Silverstrim Jan 27 at 3:34
    
I'm surprised that model of disks is identical, but geometry doesn't match. –  Mufanu Jan 27 at 3:52
    
@bartsilverstrim any modern drive doesn't use the actual geometry, they use LBA. The geometry information just faked to match the right size, for tools that think it still matters. –  Grant Jan 27 at 5:32
    
That's true. I was synonymizing LBA and geometry. But it still can't be changed. :-) –  Bart Silverstrim Jan 28 at 18:22

1 Answer 1

up vote 1 down vote accepted

Disks even of the same model, even from the same batch can vary in size slightly. This may be because the disks are actually slighly different but the manufacturer kept the same model number, or because drives come from the factory with some sectors already marked as unusable. A drive that had more bad sectors but is otherwise fine will show a smaller number of usable blocks. The drive firmware hides the bad sectors from you and presents a slightly smaller drive.

Its also possible that the smaller drive has a host protected area (HPA) setup. This reserves part of the drive, completely hiding it from the OS, to store things like BIOS images or system recovery. This is less likely if its a brand new drive. It can be removed, though I'm not sure what tools you would use on freebsd to do so.

The solution is not to have the array extend to quite the entire size of the disk, so that replacement drives will work even if they are a few KB smaller. Some RIAD setups do this automatically, others leave the decision up to the administrator.

Umfortunately since all the data is on the larger disk already you will either need to shrink it to fit or start fresh.

share|improve this answer
1  
to see HPA limit command camcontol hpa ada0 can be used (freebsd 8.4 need). It strange, but HPA limit can be found even in brand new HDD. –  citrin Jan 27 at 8:13
    
There are freebsd 8.1 is installed in my server. –  Mufanu Jan 29 at 2:01
    
Grant, thank you very much. I will be copy data from master disk to slave and then replace them. –  Mufanu Jan 29 at 2:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.