Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2008 10:54:38 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        "B. Cook" <bcook@poughkeepsieschools.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: gmirror and resizing partitions..
Message-ID:  <20080610104830.O18194@wojtek.tensor.gdynia.pl>
In-Reply-To: <BF458E6D-6326-4D66-9C8E-14211EB276DE@poughkeepsieschools.org>
References:  <228F7E24-AFA2-4BD6-91B6-D610380C789A@poughkeepsieschools.org> <20080609181202.V51848@wojtek.tensor.gdynia.pl> <BF458E6D-6326-4D66-9C8E-14211EB276DE@poughkeepsieschools.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>> 
>> more exact info please.
>> 
>> gmirror status
>> mount or cat /etc/fstab
>

now much better - i know that you mirrored whole drives and then 
partitioned.


are whole mirror labeled? if yes - what partition you have to trim down?

if now - where are place (give me bsdlabel gm0s1 output)


as you have 2 drives it's quite easy:

it would be like that:

gmirror remove gm0 ad6
gmirror forget ad6
gmirror clear /dev/ad6
gmirror label -b round-robin -s 1048576 m0 /dev/ad6
                ^^^^^^^^^^^^^^^^^^^^^^^^
that's options i use, use what you think it's good for you.

now - you have 2 degraded mirrors. old - gm0, new - m0

now partition m0 as you like.

then - get the system down to single user, unmount everything except /, 
make / read-only

then:

with partition that are same sized use dd if=/dev/oldpartition 
of=/dev/newpartition bs=1m

others - use newfs and tar|tar to copy files

after all done, mount new root partition somewhere read write, and fix 
etc/fstab

at the end - don't forget to bsdlabel -B

then reboot from ad6.

after successful boot:

gmirror stop gm0
gmirror clear ad4
gmirror insert m0 ad4

to get all new things mirrored.


PS. my advice. make one big partition+swap instead of so many. you won't 
have such problems again

>
>
>
>     Name    Status  Components
> mirror/gm0  COMPLETE  ad4
>                     ad6
>
>
> # Device		Mountpoint	FStype	Options		Dump	Pass#
> /dev/mirror/gm0s1b	none		swap	sw		0	0
> /dev/mirror/gm0s1a	/		ufs	rw		1	1
> /dev/mirror/gm0s1h	/exports	ufs	rw		2	2
> /dev/mirror/gm0s1g	/home	ufs	rw		2	2
> /dev/mirror/gm0s1d	/usr		ufs	rw		2	2
> /dev/mirror/gm0s1e	/usr/local	ufs	rw		2	2
> /dev/mirror/gm0s1f	/var		ufs	rw		2	2
> /dev/acd0		/cdrom		cd9660	ro,noauto	0	0
>
> #/dev/da0s1		/mnt/root	ufs	ro		0 0
> #/dev/da0s1b		none	swap	sw		0 0
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080610104830.O18194>