User Tools

Site Tools


Q: Is it possible to create a RAID array using a slice or partition instead of the whole disk?
Yes, but this cannot be done in the WebGUI, you must use the CLI.

During instalation, I selected the option of full instal on disk + DATA on that disk. For the installation I used 500MB.

I have been using 1.5TB disks, which for some reason were fdisk'ed in some odd way. The data slice was 1.0TB, instead of ~1.4TB. And FreeBSD fdisk was unable to make it better. So one reboot to Hiren Boot CD, modifying the partition to preserve the first one, with already installed XigmaNAS and maximize the second.

My disk was ad4, so

# fdisk ad4 … The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)

  start 63, size 1044162 (509 Meg), flag 80 (active)
      beg: cyl 0/ head 1/ sector 1;
      end: cyl 64/ head 254/ sector 63

The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)

  start 1044225, size 2929227840 (1430287 Meg), flag 0
      beg: cyl 65/ head 0/ sector 1;
      end: cyl 1022/ head 254/ sector 63

After that, in shell, I created the gmirror device:

Code # gmirror label -v -n -b round-robin gm0 /dev/ad4s2 # gmirror load # gmirror status Geom name: gm0 State: COMPLETE Components: 1 Balance: round-robin Slice: 4096 Flags: NOAUTOSYNC GenID: 0 SyncID: 1 ID: 1586815337 Providers: 1. Name: mirror/gm0

 Mediasize: 1499764653568 (1.4T)
 Sectorsize: 512
 Mode: r1w1e2

Consumers: 1. Name: ad4s2

 Mediasize: 1499764654080 (1.4T)
 Sectorsize: 512
 Mode: r1w1e1
 State: ACTIVE
 Priority: 0
 Flags: NONE
 GenID: 0
 SyncID: 1
 ID: 3745794968

For another odd reasons, I had to use one-disk solution (second HDD arrived broken). So I would add the second device into the mirror later, after beeing partitioned the same way as the first disk:

Code: Select all # gmirror configure -a gm0 # gmirror insert -p 2 gm0 /dev/ad6s2

This leaves the first ad6s1 500MB slice unused. Possibly for system backup, swap, etc…

And now the tricky part, how to convince XigmaNAS, that I am doing the right thing. I had to fill this into the config.xml file, because WebGUI won't allow me to do this thing. So in the XML i found the empty <gmirror/> section and replaced it with:

Code: <gmirror>

                      <desc>Software gmirror RAID 1</desc>


After this hack, the gm0 raid appeared in the webgui and all subsequent operations were done within GUI, namely formating, mounting and sharing.

faq/0066.txt · Last modified: 2018/08/10 21:34 by zoon01