on 24/05/2011 12:04 Andrey V. Elsukov said the following:
> There are several operations which can/should be changed:
> 1. MBR detection. All users want keep their partitions accessible.
> But with r221788 it is now problematic. I can revert r221788, but for
> me it seems right and instead reverting MBR support should be changed:
>       a) table->gpt_last should not be aligned to track boundary;
>       b) table->gpt_first can be aligned to track for compatibility, but
>          if there is already some partition starts from inside first
>          track, table->gpt_first should be set to 1.


I think that we should completely ignore anything and everything CHS in our
_validations_ (should not even warn). Words/notions "track", "cylinder", "head"
should just disappear from source code.  On other points - I agree with you.

> 2. MBR creating.
>       a) table->gpt_last should not be aligned to track boundary;
>       b) table->gpt_first can be aligned to track for compatibility.
> 
> 3. Creating partitions. Users should choose alignment method, not the kernel.
> and they can do it:
>       Align to 4k:
>       # gpart add -t freebsd -a 4k -s 5g ada0
>       
>       Align according to disk geometry:
>       # gpart add -t freebsd -g -s 5g ada0
> 
> So, patch is here:
>       http://people.freebsd.org/~ae/mbr_geometry.diff
> 
> Examples:
> 
> # gpart create -s mbr md0
> md0 created
> # gpart show md0
> =>        63  4294967232  md0  MBR  (5.5T)
>           63  4294967232       - free -  (2T)
> 
> # gpart add -t freebsd -s 10g -a 4k md0
> md0s1 added
> # gpart show md0
> =>        63  4294967232  md0  MBR  (5.5T)
>           63           1       - free -  (512B)
>           64    20971520    1  freebsd  (10G)
>     20971584  4273995711       - free -  (2T)
> 
> # gpart add -t freebsd -s 10g -g md0
> md0s2 added
> # gpart show md0
> =>        63  4294967232  md0  MBR  (5.5T)
>           63           1       - free -  (512B)
>           64    20971520    1  freebsd  (10G)
>     20971584          45       - free -  (22k)
>     20971629    20971503    2  freebsd  (10G)
>     41943132  4253024163       - free -  (2T)
> 


-- 
Andriy Gapon
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[email protected]"

Reply via email to