Re: Adding partitions to gmirror device

2009-01-27 Thread Vladislav Sekulic

Thanks, Wojciech and Jerry, for your help.

Quoting Jerry McAllister jerr...@msu.edu:


First of all, you say that you have allocated 27GB of 238GB available.
Is that 238GB in the existing slice - gm0s1 or is it outside of
that slice?   (NOTE, the 's' in the device name stands for slice -
so it is slice 1 of a possible 4).



It's 27GB used within the existing slice; gm0s1 spans the entire disk.


It could be helpful if you posted you  /etc/fstab  file and also
what is printed if you do:bsdlabel gm0s1   or, if it is what
they call 'dangerously dedicated'  do:  bsdlabel gm0



$ sudo bsdlabel /dev/mirror/gm0s1
# /dev/mirror/gm0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a:  104857604.2BSD 2048 16384 8
  b:  8320016  1048576  swap
  c: 4883759370unused0 0 # raw  
part, don't edit

  d:  2097152  93685924.2BSD 2048 16384 28528
  e: 10485760 114657444.2BSD 2048 16384 28528
  f: 41943040 219515044.2BSD 2048 16384 28528


If it is all in that gmos1 slice, then just use bsdlabel on that
slice to add the rest to another partition within that slice.  Just
boot from something other than that mirror, make sure nothing
in gm0 is mounted and then do:   bsdlabel -e gm0s1  and fix it
up as needed.



Great, makes sense.  I'll boot from the FreeBSD livecd and do this.

Thanks again!
Vlad

--
Vladislav Sekulic
Research Computing System Administrator
Systems and Networks Research Group
Dept. of Computer Science, University of Toronto
http://www.cs.toronto.edu/~pocsys

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Adding partitions to gmirror device

2009-01-26 Thread Vladislav Sekulic

Hi!

I'm running FreeBSD 7.1-RELEASE on a couple of Sun X2100 servers, each  
with 2X 250GB SATA drives that I've established a gmirror(8) over,  
following the instructions in section 19.4 of the Handbook.


Now, one of the machines, being transformed into a webserver, needs a  
separate, newly created /var/www partition (its current partitions  
only take up 27G of the total ~238G available).


My dilemma is -- how do I add another partition without hosing the  
system?  It seems to me that there is no other way than to destroy the  
gmirror, create the new partition, then re-create the gmirror.  The  
issue is how to proceed in a safe manner, without destroying any data  
or causing undue hassle (time is of the essence, as always).


My draft plan is as follows, with ad4 and ad6 being the component drives:

  $ sudo gmirror deactivate gm0 /dev/ad6
  $ sudo gmirror deactivate gm0 /dev/ad4
  $ sudo gmirror remove gm0 /dev/ad6
  $ sudo gmirror remove gm0 /dev/ad4

I believe this would result in all metadata associated with the  
gmirror to be wiped, and hence the gmirror to be destroyed, based on  
my potentially faulty reading of the manpage.


Then edit fstab to restore the ``/dev/mirror/gm0s1?'' entries to their  
corresponding ``/dev/ad4s1?'' entries  reboot.


Afterwards, would run ``bsdlabel -e ad4'', then newfs, and finally,  
redo the gmirror sequence (following the steps in section 19.4 of the  
handbook, as before).


Am I missing any critical steps here, or have any redundant steps?  Or  
just not getting it?


Thank you for any pointers!

Vlad

P.S.  Is it possible to operate directly on the gm0 device, i.e., to  
create a partition using it rather than destroying the entire gmirror?


--
Vladislav Sekulic
Research Computing System Administrator
Systems and Networks Research Group
Dept. of Computer Science, University of Toronto
http://www.cs.toronto.edu/~pocsys

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org