Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cgd on dk on 4k block size disk



On Tue, May 28, 2013 at 08:57:33PM +0200, Michael van Elst wrote:
> On Mon, May 27, 2013 at 11:34:26PM +0200, Thomas Klausner wrote:
> > > 
> > > newfs should take care about this when writing the superblock, but
> > > only if you use it directly on the disk. It fails when you first
> > > create an image and then copy it to the disk.
> > 
> > I don't think I did that. Anyway, if I "dd if=/dev/zero of=/dev/rsd0d
> > bs=1m count=100" and start again with gpt, newfs, it should work?
> 
> newfs (using code from fsck) uses DIOCGDISKINFO (data from the device
> driver) and falls back to DIOCGDINFO (data from disklabel) to determine
> disk geometry including the sector size. You can override that value with
> the -S option.
> 
> You can dump DIOCGDISKINFO data with drvctl, e.g.:

Hm, then I still don't understand where the problem with the file
system comes from.

# drvctl -p sd0
Properties for device `sd0':
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
        <key>device-driver</key>
        <string>sd</string>
        <key>device-unit</key>
        <integer>0x0</integer>
        <key>disk-info</key>
        <dict>
                <key>geometry</key>
                <dict>
                        <key>cylinders-per-unit</key>
                        <integer>0x57542</integer>
                        <key>sector-size</key>
                        <integer>0x1000</integer>
                        <key>sectors-per-track</key>
                        <integer>0x20</integer>
                        <key>sectors-per-unit</key>
                        <integer>0x2baa1476</integer>
                        <key>tracks-per-cylinder</key>
                        <integer>0x40</integer>
                </dict>
        </dict>
</dict>
</plist>

sector-size=0x1000 == 4096 bytes.

Am I misunderstanding something?
 Thomas



Home | Main Index | Thread Index | Old Index