Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Mar 2012 14:01:39 +0100
From:      rank1seeker@gmail.com
To:        hackers@freebsd.org
Subject:   BUG: REL 9.0 - MD malloc of custom sector size
Message-ID:  <20120318.130139.003.1@DOMY-PC>

next in thread | raw e-mail | index | archive | help

man mdconfig

----

-S sectorsize to use for malloc backed device

----



I want to create MD device, with sector size of 4 Kb.



It is CRITICAL to NOT append ANY suffixes, when specifing size, via '-s' flag in order to use sectors, to set it's size.

# mdconfig -a -t malloc -S 4096 -s 32768



This should created dev of 128 Mb in size.

32768 sectors * 4 Kb each = 131072 Kb = 128 Mb

Not! It created dev of 16 Mb in size, because sector size remained at 512 bytes.



And look what 'diskinfo' has to say/lie ...

# diskinfo -v md0

md0

        4096            # sectorsize

        16777216        # mediasize in bytes (16M)

        4096            # mediasize in sectors

        0               # stripesize

        0               # stripeoffset



False lines:

  # sectorsize

  # mediasize in sectors (doesn't match '-s 32768')





Does anyone has any advice of creating image / file(vnode) of custom sector sizes (2k, 4k, 8k)

Thanks in advance.





Domagoj Smolčić



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120318.130139.003.1>