Hello everyone,
We have bought a new bunch of SCSI disks (Rack Mount JBOD) for a server to
replace a lot of individual external disk enclosures. All the disks were
attached to various scsi controller on an unltra enterprise 450 running
solaris 2.6
There are 4 scsi chains on the machine. The new JBOD has 4 scsi chains as
well. We currently have 9 disks (2 per controller, 3 on another) and the
new JBOD has 8 disks (2 per controller)
What is the fastest way to migrate all the data ?
We will have no choice but to "merge" 2 disks together because we had 9 and
now 8.
I was planning to shutdown the server and start up in single user mode
(Before shutting down, modify /etc/vfstab to only connect the OLD disks on
2 channels, disconnect (physically) the other devices and reconnect the new
JBOD channels instead) and then restart, format the NEW disks and copy the
stuff from the old disks to the new disks. (see below)
Then repeat for the 2 remaining channels devices...
The question is:
For the 1 to 1 copy (7 out of 9 drives) can I use 'dd' to copy from one
device to another ? In this case, what is the proper command ? Do I have to
use the /dev/rdsk or /dev/dsk device name ? I presume that in order to work
right, no device should to be mounted ?
For the disk merging, I will simply mount the old devices and the new one
and do a cp -r (Or should I use cpio or tar ?) I need to get an exact
replica, with symlinks and all (I will make sure that bo symlinks points to
each other devices in the 2 drives I will merge)
If I use cpio, what kind of syntax do I need ?
Thanks
|
|
0
|
|
|
|
Reply
|
G
|
6/23/2004 4:26:52 PM |
|
G Dahler wrote:
> Hello everyone,
>
> We have bought a new bunch of SCSI disks (Rack Mount JBOD) for a server to
> replace a lot of individual external disk enclosures. All the disks were
> attached to various scsi controller on an unltra enterprise 450 running
> solaris 2.6
>
> There are 4 scsi chains on the machine. The new JBOD has 4 scsi chains as
> well. We currently have 9 disks (2 per controller, 3 on another) and the
> new JBOD has 8 disks (2 per controller)
>
> What is the fastest way to migrate all the data ?
>
> We will have no choice but to "merge" 2 disks together because we had 9 and
> now 8.
>
> I was planning to shutdown the server and start up in single user mode
> (Before shutting down, modify /etc/vfstab to only connect the OLD disks on
> 2 channels, disconnect (physically) the other devices and reconnect the new
> JBOD channels instead) and then restart, format the NEW disks and copy the
> stuff from the old disks to the new disks. (see below)
>
> Then repeat for the 2 remaining channels devices...
>
> The question is:
>
> For the 1 to 1 copy (7 out of 9 drives) can I use 'dd' to copy from one
> device to another ? In this case, what is the proper command ? Do I have to
> use the /dev/rdsk or /dev/dsk device name ? I presume that in order to work
> right, no device should to be mounted ?
>
> For the disk merging, I will simply mount the old devices and the new one
> and do a cp -r (Or should I use cpio or tar ?) I need to get an exact
> replica, with symlinks and all (I will make sure that bo symlinks points to
> each other devices in the 2 drives I will merge)
>
> If I use cpio, what kind of syntax do I need ?
>
> Thanks
>
>
only use dd when source and target block count is the same.
i guess the new disks are larger then the orig.
see: prtvtoc /dev/rdsk/c0t0d0s2 # for a rootdisk on c0
compare that with prtvtoc on the new disk.
example# dd if=/dev/rdsk/c0t0d0s0 of=/dev/rdsk/c2t1d0s0 bs=8192
i would use tar to copy the data ex.
example# cd fromdir; tar cf - .| (cd todir; tar xfBp -)
where todir is the "new disk" mounted there
for a system/root disk i would use ufsdump ex.
example# ufsdump 0f - / |(cd /todir;ufsrestore xf -)
the examples are from: man tar & man ufsrestore
/J�rgen
|
|
0
|
|
|
|
Reply
|
Jorgen
|
6/23/2004 11:04:16 PM
|
|
The easiest and safe way would be to use ufsdump using raw unmounted
disk devices . The syntax etc can be found at
http://adminschoice.com/docs/techtips.htm under Backup commands -
ufsdump , tar , cpio
Thanks,
"G Dahler" <yellow-shark@spamex.com> wrote in message news:<HbiCc.29579$Nz.1309587@news20.bellglobal.com>...
> Hello everyone,
>
> We have bought a new bunch of SCSI disks (Rack Mount JBOD) for a server to
> replace a lot of individual external disk enclosures. All the disks were
> attached to various scsi controller on an unltra enterprise 450 running
> solaris 2.6
>
> There are 4 scsi chains on the machine. The new JBOD has 4 scsi chains as
> well. We currently have 9 disks (2 per controller, 3 on another) and the
> new JBOD has 8 disks (2 per controller)
>
> What is the fastest way to migrate all the data ?
>
> We will have no choice but to "merge" 2 disks together because we had 9 and
> now 8.
>
> I was planning to shutdown the server and start up in single user mode
> (Before shutting down, modify /etc/vfstab to only connect the OLD disks on
> 2 channels, disconnect (physically) the other devices and reconnect the new
> JBOD channels instead) and then restart, format the NEW disks and copy the
> stuff from the old disks to the new disks. (see below)
>
> Then repeat for the 2 remaining channels devices...
>
> The question is:
>
> For the 1 to 1 copy (7 out of 9 drives) can I use 'dd' to copy from one
> device to another ? In this case, what is the proper command ? Do I have to
> use the /dev/rdsk or /dev/dsk device name ? I presume that in order to work
> right, no device should to be mounted ?
>
> For the disk merging, I will simply mount the old devices and the new one
> and do a cp -r (Or should I use cpio or tar ?) I need to get an exact
> replica, with symlinks and all (I will make sure that bo symlinks points to
> each other devices in the 2 drives I will merge)
>
> If I use cpio, what kind of syntax do I need ?
>
> Thanks
|
|
0
|
|
|
|
Reply
|
hemantsharma
|
6/24/2004 12:26:06 AM
|
|
On Wed, 23 Jun 2004 12:26:52 -0400, G Dahler wrote:
> Hello everyone,
>
> We have bought a new bunch of SCSI disks (Rack Mount JBOD) for a server to
> replace a lot of individual external disk enclosures. All the disks were
> attached to various scsi controller on an unltra enterprise 450 running
> solaris 2.6
>
> There are 4 scsi chains on the machine. The new JBOD has 4 scsi chains as
> well. We currently have 9 disks (2 per controller, 3 on another) and the
> new JBOD has 8 disks (2 per controller)
>
> What is the fastest way to migrate all the data ?
>
> We will have no choice but to "merge" 2 disks together because we had 9 and
> now 8.
>
> I was planning to shutdown the server and start up in single user mode
> (Before shutting down, modify /etc/vfstab to only connect the OLD disks on
> 2 channels, disconnect (physically) the other devices and reconnect the new
> JBOD channels instead) and then restart, format the NEW disks and copy the
> stuff from the old disks to the new disks. (see below)
>
> Then repeat for the 2 remaining channels devices...
>
> The question is:
>
> For the 1 to 1 copy (7 out of 9 drives) can I use 'dd' to copy from one
> device to another ? In this case, what is the proper command ? Do I have to
> use the /dev/rdsk or /dev/dsk device name ? I presume that in order to work
> right, no device should to be mounted ?
I have usually done this with tar (old habits, and odd size disks). In
your case dd would be faster (if the disk slices are identical in size):
dd if=/dev/rdsk/<srcdsk> of=/dev/rdsk/<dstdsk>
There was some note about blocksizes for optimal transfer speed. Someone
else will have to comment on what's best to use. I don't usually do dd.
Yeah, if you're doing raw disk copies, they have to be "quiescent", so
it's best that they be unmounted, so they cannot change while transferring.
BUT MAKE SURE YOU GET THE DEVICE NAMES RIGHT! (and backup first!!)
That's why I chicken out and mount filing systems, look at them,
check my notes, etc., and then do a tar->tar copy (with symlinks).
> For the disk merging, I will simply mount the old devices and the new one
> and do a cp -r (Or should I use cpio or tar ?) I need to get an exact
> replica, with symlinks and all (I will make sure that bo symlinks points to
> each other devices in the 2 drives I will merge)
>
> If I use cpio, what kind of syntax do I need ?
Most say that cpio is a poor way to copy. I don't think it does symlinks?
That's why I usually use tar, as in (the very useful!):
(cd <srcdir>;tar cf -|(cd <dstdir>;tar xvBpf -))
This does a tar (backup) to a stream and tar (restore) in the new place.
I realize that my "catching" switches might be odd. Again, old habits, and
that has always worked for me. In your case, for speed you might want to
leave off the 'v' (verify, by listing the filenames processed) but then
you'll be staring at nothing, wondering what's going on. Probably a
minimal "tar xf -" would be enough for you. Perhaps use another session
to periodically do an "ls" or "du" on the destination device? to make sure
you're making the right kind of progress?
You can also use ufsdump in that kind of transfer. I think that would be:
(cd <srcdir>;ufsdump 0f -|(cd <dstdir>;ufsrestore f -))
Usually, ufsdump is used for filing systems and not parts of them. I think
I've done this kind of copy, but not as often as I've done the tar copy. I
don't know if the ufs transfer is (appreciably?) faster when working
through the filing system (and not on raw slices). Comments anyone?
--
Juhan Leemet
Logicognosis, Inc.
|
|
0
|
|
|
|
Reply
|
Juhan
|
6/24/2004 1:26:39 AM
|
|
G Dahler wrote:
> Hello everyone,
>
> We have bought a new bunch of SCSI disks (Rack Mount JBOD) for a server to
> replace a lot of individual external disk enclosures. All the disks were
> attached to various scsi controller on an unltra enterprise 450 running
> solaris 2.6
>
> There are 4 scsi chains on the machine. The new JBOD has 4 scsi chains as
> well. We currently have 9 disks (2 per controller, 3 on another) and the
> new JBOD has 8 disks (2 per controller)
>
> What is the fastest way to migrate all the data ?
>
> We will have no choice but to "merge" 2 disks together because we had 9 and
> now 8.
>
> I was planning to shutdown the server and start up in single user mode
> (Before shutting down, modify /etc/vfstab to only connect the OLD disks on
> 2 channels, disconnect (physically) the other devices and reconnect the new
> JBOD channels instead) and then restart, format the NEW disks and copy the
> stuff from the old disks to the new disks. (see below)
>
> Then repeat for the 2 remaining channels devices...
>
> The question is:
>
> For the 1 to 1 copy (7 out of 9 drives) can I use 'dd' to copy from one
> device to another ? In this case, what is the proper command ? Do I have to
> use the /dev/rdsk or /dev/dsk device name ? I presume that in order to work
> right, no device should to be mounted ?
>
> For the disk merging, I will simply mount the old devices and the new one
> and do a cp -r (Or should I use cpio or tar ?) I need to get an exact
> replica, with symlinks and all (I will make sure that bo symlinks points to
> each other devices in the 2 drives I will merge)
>
> If I use cpio, what kind of syntax do I need ?
>
> Thanks
>
>
FWIW, I would consider using something along the lines of
pax -rw -p e source target
That's what I used recently to move a disk.
I've read that tar can have problems with long paths, and cp might
not do what you want with symlinks.
The ufsdump/ufsrestore combo somebody suggested might also work.
I don't know which is fastest.
BWDIK?
--
The e-mail address in our reply-to line is reversed in an attempt to
minimize spam. Our true address is of the form che...@prodigy.net.
|
|
0
|
|
|
|
Reply
|
CJT
|
6/24/2004 3:38:39 AM
|
|
BTW, you might
man largefile
and carefully read what's there if that's an issue.
>
--
The e-mail address in our reply-to line is reversed in an attempt to
minimize spam. Our true address is of the form che...@prodigy.net.
|
|
0
|
|
|
|
Reply
|
CJT
|
6/24/2004 4:03:30 AM
|
|
On Thu, 24 Jun 2004 01:04:16 +0200, Jorgen Moquist wrote:
> G Dahler wrote:
>> We have bought a new bunch of SCSI disks (Rack Mount JBOD)...
>> What is the fastest way to migrate all the data ?
>>
> only use dd when source and target block count is the same. i guess the
> new disks are larger then the orig.
> see: prtvtoc /dev/rdsk/c0t0d0s2 # for a rootdisk on c0
> compare that with prtvtoc on the new disk.
>
> example# dd if=/dev/rdsk/c0t0d0s0 of=/dev/rdsk/c2t1d0s0 bs=8192
Good catch. I didn't think to ask about disk (slice) sizes.
> i would use tar to copy the data ex.
> example# cd fromdir; tar cf - .| (cd todir; tar xfBp -)
> where todir is the "new disk" mounted there
OK, so maybe my switches were not so strange after all?
> for a system/root disk i would use ufsdump ex.
> example# ufsdump 0f - / |(cd /todir;ufsrestore xf -)
>
> the examples are from: man tar & man ufsrestore
>
> /J�rgen
Oh, that reminds me: do you also have to do an fssnap or lockfs when doing
the ufsdump from /? I didn't used to do that, but recently came across
some info on the "evils of dumping mounted filesystems". I had no idea.
Which would you recommend: fssnap or lockfs? man pages seem to discourage
lockfs, so I guess the preferred option is fssnap? More complicated!
--
Juhan Leemet
Logicognosis, Inc.
|
|
0
|
|
|
|
Reply
|
Juhan
|
6/24/2004 7:22:37 AM
|
|
G Dahler <yellow-shark@spamex.com> wrote:
> What is the fastest way to migrate all the data ?
In addition to what the other posters already told you - if you
want to keep the time window in which the filesystems are not accessible
as short as possible, it makes sense to make a copy with e.g. a
tar cf | tar xf while the system is still up, and later use rsync
to just copy files which have changed in the meantime.
mp.
--
Systems Administrator | Institute for Software Science | Univ. of Vienna
|
|
0
|
|
|
|
Reply
|
Martin
|
6/24/2004 2:12:42 PM
|
|
Martin Paul <map@par.univie.ac.at> wrote:
> G Dahler <yellow-shark@spamex.com> wrote:
>> What is the fastest way to migrate all the data ?
> In addition to what the other posters already told you - if you
> want to keep the time window in which the filesystems are not accessible
> as short as possible, it makes sense to make a copy with e.g. a
> tar cf | tar xf while the system is still up, and later use rsync
> to just copy files which have changed in the meantime.
I would recommend this too. However, there are some pitfalls when
using rsync. First, the -a option (archive copy) does not preserve
hard links, so make sure you also use -H option if you care about
preserving hard links. Second, rsync does not preserve any
non-standard file attributes. In particular, ACLs will not be
preserved. You would have to write some sort of script to restore ACLs
or use ufsdump. If you don't care about ACLs then rsync is a good way
to move a large, frequently updated file system to new disks with very
little downtime. If you do use ufsdump, perhaps it would be faster to
turn off logging and use Casper Dik's fastfs
(ftp://ftp.wins.uva.nl/pub/solaris/fastfs.c.gz) to enable delayed I/O
on the new file system.
--
Akop Pogosian
This space has been accidentally left blank.
|
|
0
|
|
|
|
Reply
|
Akop
|
6/24/2004 11:08:41 PM
|
|
Martin Paul wrote, On 24/06/2004 15:12:
> G Dahler <yellow-shark@spamex.com> wrote:
>
>>What is the fastest way to migrate all the data ?
>
>
> In addition to what the other posters already told you - if you
> want to keep the time window in which the filesystems are not accessible
> as short as possible, it makes sense to make a copy with e.g. a
> tar cf | tar xf while the system is still up, and later use rsync
> to just copy files which have changed in the meantime.
Or use ufdump/restore with the sytem up, and then, with the system
down, take a level 9 incremental ufsdump, relative to the first dump,
and restore it as an incremental in the new system.
|
|
0
|
|
|
|
Reply
|
Charles
|
7/1/2004 4:04:06 PM
|
|
|
9 Replies
789 Views
(page loaded in 0.097 seconds)
|