Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2010, 04:08 PM
ecpeachy ecpeachy is offline
Junior Member
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ZFS - A Stripe of Mirrors
Hello,

I was wondering if there is a GUI way to create a two, two-way mirrors AKA RAID 10 during the Installation of PC-BSD

Something like this command
Code:
# zpool create tank mirror c1d0 c2d0 mirror c3d0 c4d0
Thanks
Reply With Quote
  #2  
Old 01-03-2011, 04:58 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,569
Thanks: 0
Thanked 163 Times in 127 Posts
Default ZFS - A Stripe of Mirrors
That particular feature has not been implemented yet, but may be something to explore adding
down the road
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #3  
Old 01-03-2011, 05:53 PM
ecpeachy ecpeachy is offline
Junior Member
 
Join Date: Dec 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Thanks for your reply, I appreciate your efforts
Reply With Quote
  #4  
Old 12-03-2011, 05:26 PM
ProBSD.com ProBSD.com is offline
Junior Member
 
Join Date: Dec 2006
Location: Southeast Wisconsin
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Hi Kris,

Any closer on this yet?

Rick
Reply With Quote
  #5  
Old 12-05-2011, 03:04 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,569
Thanks: 0
Thanked 163 Times in 127 Posts
Default ZFS - A Stripe of Mirrors
This will have to be something for 9.1, since the interface is frozen
for 9.0.
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #6  
Old 12-23-2011, 06:40 PM
qtsidekick qtsidekick is offline
Junior Member
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default RE: ZFS - A Stripe of Mirrors
I would love to do see this working too.

Is there anyway I can transfer the whole PC-BSD DVD to the computer like step 10 in the link below?
http://www.aisecure.net/2011/11/28/root-zfs-freebsd9/

Sorry I am new to PC-BSD and I have not had time to read the post guideline. You probably do not allow external links.
Code:
# sh
# cd /usr/freebsd-dist
# export DESTDIR=/mnt
# for file in base.txz lib32.txz kernel.txz doc.txz ports.txz src.txz; do (cat $file | tar --unlink -xpJf - -C ${DESTDIR:-/}); done
I can install FreeBSD but I am also new to FreeBSD so the configurations and all are the new learning materials. It takes time to get going. Like I have to config Xorg, sound, keyboard, mouse, VirtualBox, hosts/names, Xmonad, etc. I want something pre-configured like PC-BSD so I just add some more stuffs to it.

Any hint how-to put PC-BSD on the computer after step 9 in the link would be much appreciated.
Reply With Quote
  #7  
Old 12-23-2011, 08:06 PM
Nukama Nukama is offline
Member
 
Join Date: Jul 2010
Posts: 50
Thanks: 1
Thanked 2 Times in 2 Posts
Default
I'm not sure, if this works, as only content of PCBSD.tbz and PCBSD.ufs.uzip are copied to DESTDIR:

Code:
#!/bin/sh
setenv $DESTDIR=/mnt
cd $DESTDIR
tar -xvjf /root/PCBSD/PCBSD.tbz
kldload geom_uzip
mdconfig -f /root/PCBSD/PCBSD.ufs.uzip -o readonly -u 100
mkdir -p /tmp/mount
mount -r /dev/md100.uzip /tmp/mnt
rsync -avP /tmp/mnt $DESTDIR
fbsd-release.tbz and xtra-data.tbz aren't covered with this script, so beware...not at all tested.
rsync should be found somewhere inside /tmp/mnt - it's {Free|PC}BSD - so you might figure it out.

Would be nice if specification of filesystem-layout could be done via cli, and DESTIR could be set via GUI in expert mode.
No need to implement all permutations of zfs installations.
Reply With Quote
  #8  
Old 12-27-2011, 05:55 PM
kmoore134's Avatar
kmoore134 kmoore134 is offline
Administrator
 
Join Date: May 2005
Location: Knoxville, TN
Posts: 2,569
Thanks: 0
Thanked 163 Times in 127 Posts
Default ZFS - A Stripe of Mirrors
In this case you only need PCBSD.tbz, and then you can pkg_add the
various bits you want in our packages/ directory.

For 9.1, I plan on adding a feature which lets you customize the disk
layout via the CLI, and then point the installer at a mount-point and
it'll handle the rest of the install
__________________
----
Kris Moore
PC-BSD Founder
Reply With Quote
  #9  
Old 12-30-2011, 06:54 PM
ProBSD.com ProBSD.com is offline
Junior Member
 
Join Date: Dec 2006
Location: Southeast Wisconsin
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Smile
Hi Kris,

Using the above mentioned script method (http://www.aisecure.net/2011/05/01/r...reebsd-current) provided by Olaf, and then adding "mount /dev/da2s1a /mnt/PCBSD; tar -xvjf /mnt/PCBSD/PCBSD.tbz" right after;

Code:
cd /usr/freebsd-dist
export DESTDIR=/mnt
for file in base.txz lib32.txz kernel.txz doc.txz ports.txz src.txz;
do (cat $file | tar --unlink -xpJf - -C ${DESTDIR:-/}); done
I run the script and I keep getting an error stating it can not unlink existing link with /bin/rpc, do you have any ideas? I realize you are swamped trying to get version 9 ready for launch but many of us really want to get your wonderful PC-BSD 9.0 installed to a RAID10 ZFS setup. Any and all help is greatly appreciated.

Thank,
ProBSD
Reply With Quote
  #10  
Old 01-23-2012, 02:27 AM
qtsidekick qtsidekick is offline
Junior Member
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Temp Solution.
Hi all,

I finally figured out the easiest way to get over this (A Stripe of Mirror or Raidz10). This is root on ZFS as you know.

So I install PC-BSD as a basic ZFS. No mirror or any other drive selected.
The log on the system and issue this command zpool status
Code:
 pool: tank0
 state: ONLINE
 scan: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	tank0       ONLINE       0     0     0
	  ada0p2    ONLINE       0     0     0
I forgot to mention, I have total 4 hard drives. Also, they are pre-configured. All of them has the same layout; 64k for boot partition and the rest for ZFS.
As you can see only one drive is currently attach/active in my zpool (tank0). So I do gpart show command to make sure I have everything I thought.
Code:
=>        34  1953525101  ada0  GPT  (931G)
          34         128     1  freebsd-boot  (64k)
         162        1854        - free -  (927k)
        2016  1953513472     2  freebsd-zfs  (931G)
  1953515488        9647        - free -  (4.7M)

=>        34  1953525101  ada1  GPT  (931G)
          34         128     1  freebsd-boot  (64k)
         162  1953524973     2  freebsd-zfs  (931G)

=>        34  1953525101  ada2  GPT  (931G)
          34         128     1  freebsd-boot  (64k)
         162  1953524973     2  freebsd-zfs  (931G)

=>        34  1953525101  ada3  GPT  (931G)
          34         128     1  freebsd-boot  (64k)
         162  1953524973     2  freebsd-zfs  (931G)
Then I added bootcode to every boot partition of the hard drive.
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada2
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada3
Next thing I attach the one more drive to the pool by issuing this commad:
Code:
zpool attach -f tank0 /dev/ada0p2 /dev/ada1p2
(Credit go to Nukama - http://forums.pcbsd.org/newreply.php...treply&t=13977)
Then I want to see if it is working, using the command zpool status
Code:
   pool: tank0
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
	continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scan: resilver in progress since Sun Jan 22 21:21:54 2012
    97.0M scanned out of 6.13G at 10.8M/s, 0h9m to go
    93.0M resilvered, 1.55% done
config:

	NAME        STATE     READ WRITE CKSUM
	tank0       ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada0p2  ONLINE       0     0     0
	    ada1p2  ONLINE       0     0     0  (resilvering)
It is working! Resilvering means mirror(ing). Now that I have a mirror in my zpool. I will just add another mirror to make it a-stripe-of-mirror or RAIDZ10; command
Code:
zpool add -f tank0 mirror /dev/ada2p2 /dev/ada3p2
To verify zpool status
Code:
  pool: tank0
 state: ONLINE
 scan: resilvered 6.13G in 0h7m with 0 errors on Sun Jan 22 21:28:56 2012
config:

	NAME        STATE     READ WRITE CKSUM
	tank0       ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada0p2  ONLINE       0     0     0
	    ada1p2  ONLINE       0     0     0
	  mirror-1  ONLINE       0     0     0
	    ada2p2  ONLINE       0     0     0
	    ada3p2  ONLINE       0     0     0

errors: No known data errors
You might ask, what the hell? There is no swap partition at all? Easy fix.
Command:
Code:
zfs create -V 16G tank0/swap
zfs set org.freebsd:swap=on tank0/swap
zfs set checksum=off tank0/swap
These steps are very important especially the 3rd line. (Yes, credit go to gkontos. You can google Root on ZFS. Swap partition always doubled your physical RAM amount.
I hope this help whoever is struggling on this issue like me.
I love FreeBSD and PC-BSD. I hope someday it will shine more than it is right now. Thanks to all the people contribute to FreeBSD, PC-BSD and this forum. I can now have my PC-BSD & VirtualBox running Windows 7 and start learning some coding programs. If you have any question, just ask. I will see if I can answer. As I stated in earlier posted, I am no expert. I am just learning to get my system working (more like self-study)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:27 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.