NetBSD-Users archive

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

Beating a dead horse





I have a small server running NetBSD 6.1.5, setup last summer with a combination of help onlist (*THANKS*) & an online tutorial I found here: http://abs0d.blogspot.com/2011/08/setting-up-8tb-netbsd-file-server.html (watch for line wrap). He setup a 5-HDD box, I used 6 HDD's, he used 2TB drives, I used 1 TB 2.5" drives, but I followed his procedure closely, in particular the part about fdisk-ing/disklabel-ing the drives. The machine works well except for horribly slow I/O to the RAID5 I setup using 4 data slices, 1 parity slice & 1 hot-swap slice, 1 from each of my 6 HDD's. I had a bit of time this weekend & went back & reviewed his site & noticed the following in the part of the page where he detailed his use of fdisk to partition his drives into 1 large partition, to be sliced up later using disklabel:


Creating MBR partitions with fdisk

Start by using fdisk to create a single NetBSD partition on each disk, and to make the partition bootable on the first two disks (which have the root filesystem).


onyx# fdisk -iau0 wd0

fdisk: primary partition table invalid, no magic in sector 0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 3876021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 3907029168

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 3907029168

Partitions aligned to 2048 sector boundaries, offset 2048 <------ *DING DING DING* !!!!

Do you want to change our idea of what BIOS thinks? [n] [RETURN]

Partition 0:
<UNUSED>
The data for partition 0 is:
<UNUSED>
sysid: [0..255 default: 169] [RETURN]
start: [0..243201cyl default: 2048, 0cyl, 1MB] [RETURN]
size: [0..243201cyl default: 3907027120, 243201cyl, 1907728MB] [RETURN]
bootmenu: [] [RETURN]
Do you want to change the active partition? [n] y[RETURN]
Choosing 4 will make no partition active.
active partition: [0..4 default: 0] [RETURN]
Are you happy with this choice? [n]  y[RETURN]
Update the bootcode from /usr/mdec/mbr? [n] y[RETURN]

We haven't written the MBR back to disk yet. This is your last chance.
Partition table:
0: NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 0-243201/80/63), Active
PBR is not bootable: All bytes are identical (0x00)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
Should we write new partition table? [n]  y[RETURN]

    Run fdisk -iau0 wd1 giving the same answers
Run fdisk -u0 wd2 similar except it skips the active & bootcode questions
    Run fdisk -u0 wd3 and fdisk -u0 wd4


When I used fdisk to check my drives (well, 1 of them, all are identically fdisk-ed & sliced), I see the following:


4256EE1 # fdisk  wd0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 1938021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 1953525168

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 1953525168

Partitions aligned to 16065 sector boundaries, offset 63 <----- *DING DING DING* !!!!

Partition table:
0: NetBSD (sysid 169)
start 2048, size 1953523120 (953869 MB, Cyls 0/32/33-121601/80/63), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
4256EE1 # uname -a
NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
4256EE1 #


His tutorial setup shows that his fdisk chose different default values for the alignment & offset of his partitions than mine did (see the *DING DING DING* lines above). I followed his setup instructions precisely, taking defaults where he said to & typing in stuff where he said to. Are these alignment/offset values the cause for my crappy I/O performance ? If so, is there any way to redo that w/o a complete reinstall :-) ? I can do that if needed, I have all config stuff backed up on another machine & don't have much installed (Suse compatibility libraries, pkgin, rsync, & a few other sundries). Also, why did my fdisk choose those values when his chose apparently better ones ? TIA & have a good one.

--

	William A. Mahaffey III

 ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                           -- Gen. George S. Patton Jr.



Home | Main Index | Thread Index | Old Index