Problem with writing an UFS2 to iStore Storage System / can't find block in cyl 0 / bad magic number

Miroslav Lachman 000.fbsd at quip.cz
Wed Feb 24 13:33:04 UTC 2010


Erik Scholtz, ArgonSoft GmbH wrote:
> Miroslav,
>
> thanks for your reply. No - I haven't tried this yet and so did this a
> minute ago, but got stucked on the second command:
>
> **********************************************************************************
>
> |# gpart create -s GPT da0

[...]

> |# gpart add -b 1 -s 20971519 -t freebsd-ufs -l MyLabel da0
> |gpart: start '1': Invalid argument
> |
> |# gpart add -b 34 -s 20971519 -t freebsd-ufs -l MyLabel da0
> |gpart: size '20971519': Invalid argument
> |
> |# gpart add -b 34 -s 20971485 -t freebsd-ufs -l MyLabel da0
> |gpart: size '20971485': Invalid argument
> **********************************************************************************
>
>
> Since gpart set the begin (start) on 1 and not on 34, I changed the -b
> option too. After failing this, I set the begin to 34 as in your
> example, which did not work either. Then I reduced the size (since when
> the start is later, it reduces the size too), which also did not work.

You can try 'gpart show da0' right after gpart create, it will show you 
available space.

for example:
# gpart show da2
=>       34  209715133  da2  GPT  (100G)
          34  209715133       - free -  (100G)

The first line tells you about your hard drive. You can start 
partitioning from sector 34 and the last available sector is 209715133.
The second line gives information that there is free space beginning at 
sector 34 and spreading to sector 209715133.
It means that the drive is empty.

I am not sure if -s must be given in 512 bytes sectors, I saw some 
HowTos with "-s 100G", but it didn't work in my setup with FreeBSD 7.2 
(it may work on 8.0?) You can try both versions and you can try little 
smaller partition if it gives you an error.
(I am not too experienced with gpart)

Miroslav Lachman


More information about the freebsd-fs mailing list