Re: Copying mirrored partitions - will this work?

2010-03-31 Thread Mike Clarke
On Saturday 20 March 2010, Mike Clarke wrote:

 I'm currently running 8.0-RELEASE and am considering experimenting
 with 8.0-STABLE. I'd like to preserve my existing system in case
 things go pear-shaped so I'll copy the entire system onto a spare
 slice and then use csup to upgrade the copy to STABLE. Normally I'd
 go through the steps of bsdlabel, newfs and then dump|restore to
 create the copy but I'm wondering if I can take advantage of my
 recently created gmirror to cut down the work.

 I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned into
 4 slices of 88, 88, 42 and 259GB. My system is installed on the first
 slices (ad4s1 and ad8s1) which are mirrored as /dev/mirror/gm0. The
 second slices (ad4s2 and ad8s2) are currently unused. My thoughts are
 to temporarily add ad4s2 into gm0 with gmirror insert gm0 ad4s2 and
 wait for the mirror to synchronise. I should then be able to remove
 the temporary addition with gmirror remove gm0 /dev/ad4s2 at which
 point ad4s2 should be a duplicate of the original system and I can
 then go ahead and create a new mirror with gmirror label -b load gm1
 ad4s2 and gmirror insert gm1 ad8s2. After editing /etc/fstab in
 the new mirror to use gm1 instead of gm0 I should then be able to
 boot into the system on slice 2 and upgrade it to STABLE while still
 keeping my original system to fall back to if required.

 Is this approach of moving disks from one mirror to another workable,
 or have I missed something that would lead me into deep trouble? I
 don't mind unduly if I make a mess of the second slice and have to
 start again but I don't want to lose the contents of my original
 system on slice 1.

I decided to give it a try and the process went through very smoothly. 
It was much less tedious than bsdlabel - newfs - dump|restore, and 
quicker too. The mirror synchronised at a bit over 100 MB/sec but dump|
restore only gave me about 10 MB/sec.

The system has now been running for a bit over a week without any 
problems with either the original or cloned slices so I'm quite 
confident that things are OK.

-- 
Mike Clarke
___
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


Re: Copying mirrored partitions - will this work?

2010-03-31 Thread krad
On 31 March 2010 10:22, Mike Clarke jmc-freeb...@milibyte.co.uk wrote:

 On Saturday 20 March 2010, Mike Clarke wrote:

  I'm currently running 8.0-RELEASE and am considering experimenting
  with 8.0-STABLE. I'd like to preserve my existing system in case
  things go pear-shaped so I'll copy the entire system onto a spare
  slice and then use csup to upgrade the copy to STABLE. Normally I'd
  go through the steps of bsdlabel, newfs and then dump|restore to
  create the copy but I'm wondering if I can take advantage of my
  recently created gmirror to cut down the work.
 
  I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned into
  4 slices of 88, 88, 42 and 259GB. My system is installed on the first
  slices (ad4s1 and ad8s1) which are mirrored as /dev/mirror/gm0. The
  second slices (ad4s2 and ad8s2) are currently unused. My thoughts are
  to temporarily add ad4s2 into gm0 with gmirror insert gm0 ad4s2 and
  wait for the mirror to synchronise. I should then be able to remove
  the temporary addition with gmirror remove gm0 /dev/ad4s2 at which
  point ad4s2 should be a duplicate of the original system and I can
  then go ahead and create a new mirror with gmirror label -b load gm1
  ad4s2 and gmirror insert gm1 ad8s2. After editing /etc/fstab in
  the new mirror to use gm1 instead of gm0 I should then be able to
  boot into the system on slice 2 and upgrade it to STABLE while still
  keeping my original system to fall back to if required.
 
  Is this approach of moving disks from one mirror to another workable,
  or have I missed something that would lead me into deep trouble? I
  don't mind unduly if I make a mess of the second slice and have to
  start again but I don't want to lose the contents of my original
  system on slice 1.

 I decided to give it a try and the process went through very smoothly.
 It was much less tedious than bsdlabel - newfs - dump|restore, and
 quicker too. The mirror synchronised at a bit over 100 MB/sec but dump|
 restore only gave me about 10 MB/sec.

 The system has now been running for a bit over a week without any
 problems with either the original or cloned slices so I'm quite
 confident that things are OK.

 --
 Mike Clarke
 ___
 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



ive cloned many systems in this way before, and it does work. Not just
gmirror two, it should work with any mirroring, hardware or software.  One
thing to remember though is that it works at the block level. Therefore if
the drive if very big with a small % of data on it might be quicker to copy
it manually.

There is always an exception though. If you are using zfs, then only the
data on the drive is copied. This is because zfs works at block, and file
system levels, and therefore is aware of what is allocated on the disks.

One thing about your dump/restore speed. Did you play around with larger
block sizes? Increasing it should give you better throughput.
___
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


Re: Copying mirrored partitions - will this work?

2010-03-31 Thread Mike Clarke
On Wednesday 31 March 2010, krad wrote:

 On 31 March 2010 10:22, Mike Clarke jmc-freeb...@milibyte.co.uk 
wrote:
  On Saturday 20 March 2010, Mike Clarke wrote:

[snip]

   I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned
   into 4 slices of 88, 88, 42 and 259GB. My system is installed on
   the first slices (ad4s1 and ad8s1) which are mirrored as
   /dev/mirror/gm0. The second slices (ad4s2 and ad8s2) are
   currently unused. My thoughts are to temporarily add ad4s2 into
   gm0 with gmirror insert gm0 ad4s2 and wait for the mirror to
   synchronise. I should then be able to remove the temporary
   addition with gmirror remove gm0 /dev/ad4s2 at which point
   ad4s2 should be a duplicate of the original system and I can then
   go ahead and create a new mirror with gmirror label -b load gm1
   ad4s2 and gmirror insert gm1 ad8s2. After editing /etc/fstab
   in the new mirror to use gm1 instead of gm0 I should then be able
   to boot into the system on slice 2 and upgrade it to STABLE while
   still keeping my original system to fall back to if required.
  
   Is this approach of moving disks from one mirror to another
   workable, or have I missed something that would lead me into deep
   trouble? I don't mind unduly if I make a mess of the second slice
   and have to start again but I don't want to lose the contents of
   my original system on slice 1.
 
  I decided to give it a try and the process went through very
  smoothly. It was much less tedious than bsdlabel - newfs -
  dump|restore, and quicker too. The mirror synchronised at a bit
  over 100 MB/sec but dump| restore only gave me about 10 MB/sec.

[snip]

 One thing about your dump/restore speed. Did you play around with
 larger block sizes? Increasing it should give you better throughput.

I used 32 MB for the cache size but I expect the reduced speed comes 
about from the need to find and open a large number of files whereas 
synchronising the mirror just does a sequential disk to disk copy at 
block level.

-- 
Mike Clarke
___
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


Re: Copying mirrored partitions - will this work?

2010-03-21 Thread Mike Clarke
On Sunday 21 March 2010, Modulok wrote:

 On 3/20/10, Mike Clarke jmc-freeb...@milibyte.co.uk wrote:

[snip]

  I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned
  into 4 slices of 88, 88, 42 and 259GB. My system is installed on
  the first slices (ad4s1 and ad8s1) which are mirrored as
  /dev/mirror/gm0. The second slices (ad4s2 and ad8s2) are currently
  unused. My thoughts are to temporarily add ad4s2 into gm0 with
  gmirror insert gm0 ad4s2 and wait for the mirror to synchronise.
  I should then be able to remove the temporary addition with
  gmirror remove gm0 /dev/ad4s2 at which point ad4s2 should be a
  duplicate of the original system and I can then go ahead and create
  a new mirror with gmirror label -b load gm1 ad4s2 and gmirror
  insert gm1 ad8s2. After editing /etc/fstab in the new mirror to
  use gm1 instead of gm0 I should then be able to boot into the
  system on slice 2 and upgrade it to STABLE while still keeping my
  original system to fall back to if required.

 How valuable is your data?

In financial terms not very, but still valuable enough to not want to 
lose it.

 I recommend you make an offline backup.

Yes, I take regular backups but regard them as the emergency parachute 
and prefer to not put myself in a position where I'm doing something 
risky and the backup files are the only protection, so I'll be making 
additional backups anyway.

 There's a lot of steps in 
 your procedure which introduce room for error.

Yes, it's a bit of unknown territory for me but with 6 partitions on the 
slice it does require fewer potentially dangerous manual steps (like 
newfs or restore to the wrong device) so looks like an interesting 
experiment.

 You could perhaps 
 disconnect one of the hard drive's data cable (same thing). Also,
 make a backup copy of your geom meta data somewhere.

That's a possibility to consider but would result in additional changes 
to the mirror configuration, something I'd prefer to keep to a minimum.

-- 
Mike Clarke
___
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


Copying mirrored partitions - will this work?

2010-03-20 Thread Mike Clarke

I'm currently running 8.0-RELEASE and am considering experimenting with 
8.0-STABLE. I'd like to preserve my existing system in case things go 
pear-shaped so I'll copy the entire system onto a spare slice and then 
use csup to upgrade the copy to STABLE. Normally I'd go through the 
steps of bsdlabel, newfs and then dump|restore to create the copy but 
I'm wondering if I can take advantage of my recently created gmirror to 
cut down the work.

I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned into 4 
slices of 88, 88, 42 and 259GB. My system is installed on the first 
slices (ad4s1 and ad8s1) which are mirrored as /dev/mirror/gm0. The 
second slices (ad4s2 and ad8s2) are currently unused. My thoughts are 
to temporarily add ad4s2 into gm0 with gmirror insert gm0 ad4s2 and 
wait for the mirror to synchronise. I should then be able to remove the 
temporary addition with gmirror remove gm0 /dev/ad4s2 at which point 
ad4s2 should be a duplicate of the original system and I can then go 
ahead and create a new mirror with gmirror label -b load gm1 ad4s2 
and gmirror insert gm1 ad8s2. After editing /etc/fstab in the new 
mirror to use gm1 instead of gm0 I should then be able to boot into the 
system on slice 2 and upgrade it to STABLE while still keeping my 
original system to fall back to if required.

Is this approach of moving disks from one mirror to another workable, or 
have I missed something that would lead me into deep trouble? I don't 
mind unduly if I make a mess of the second slice and have to start 
again but I don't want to lose the contents of my original system on 
slice 1.

-- 
Mike Clarke
___
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


Re: Copying mirrored partitions - will this work?

2010-03-20 Thread Modulok
How valuable is your data?

I recommend you make an offline backup. There's a lot of steps in your
procedure which introduce room for error. You could perhaps disconnect
one of the hard drive's data cable (same thing). Also, make a backup
copy of your geom meta data somewhere.

Other than that, your procedure sounds like it should work. Though,
I've never tried it. I do recall, that when updating from 6.2-RELEASE
to 8-RELEASE, the geom meta data was automatically updated. I'm not
sure if there is any change between Release and Stable, though. I'm
also not sure if it was a backward incompatible change, as I never
went back to 6.2. Just something to be aware of.

Sorry I can't be more helpful. Maybe someone else knows more.
-Modulok-

On 3/20/10, Mike Clarke jmc-freeb...@milibyte.co.uk wrote:

 I'm currently running 8.0-RELEASE and am considering experimenting with
 8.0-STABLE. I'd like to preserve my existing system in case things go
 pear-shaped so I'll copy the entire system onto a spare slice and then
 use csup to upgrade the copy to STABLE. Normally I'd go through the
 steps of bsdlabel, newfs and then dump|restore to create the copy but
 I'm wondering if I can take advantage of my recently created gmirror to
 cut down the work.

 I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned into 4
 slices of 88, 88, 42 and 259GB. My system is installed on the first
 slices (ad4s1 and ad8s1) which are mirrored as /dev/mirror/gm0. The
 second slices (ad4s2 and ad8s2) are currently unused. My thoughts are
 to temporarily add ad4s2 into gm0 with gmirror insert gm0 ad4s2 and
 wait for the mirror to synchronise. I should then be able to remove the
 temporary addition with gmirror remove gm0 /dev/ad4s2 at which point
 ad4s2 should be a duplicate of the original system and I can then go
 ahead and create a new mirror with gmirror label -b load gm1 ad4s2
 and gmirror insert gm1 ad8s2. After editing /etc/fstab in the new
 mirror to use gm1 instead of gm0 I should then be able to boot into the
 system on slice 2 and upgrade it to STABLE while still keeping my
 original system to fall back to if required.

 Is this approach of moving disks from one mirror to another workable, or
 have I missed something that would lead me into deep trouble? I don't
 mind unduly if I make a mess of the second slice and have to start
 again but I don't want to lose the contents of my original system on
 slice 1.

 --
 Mike Clarke
 ___
 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

___
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