This is a discussion on How to mirror an existing Solaris Volume Manager concat metadevice. within the comp.unix.solaris forums, part of the Solaris Operating System category; --> I have a Solaris 10 system using SAN disk from an external unit. The SAN disk is configured as ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a Solaris 10 system using SAN disk from an external unit. The SAN disk is configured as a Solaris Volume Manager concat metadevice and hosts various soft partitions. I need to migrate everything on the current SAN disk to new SAN disk on a different external unit, and then retire the old SAN unit. For the migration, I would like to mirror the current metadevice to the new disk. Mirroring should hopefully reduce downtime and help ensure the accuracy of the data migration. However, I haven't found any documentation on how to do this. I was wondering, if my current metadevice is named d90, can I create a new mirror named d95 that includes d90 as a submirror (e.g. metainit d95 -m d90) without damaging d90, and while d90 is live? If so, then I could attach the new metadevice to d95, and be on my merry way. If not, is there another way? One alternative is, of course, to shut everything down and copy the data over manually, but I'd like to avoid that if possible. Thanks, Pete |
| |||
| Peter Havens schrieb: > I have a Solaris 10 system using SAN disk from an external unit. The > SAN disk is configured as a Solaris Volume Manager concat metadevice > and hosts various soft partitions. I need to migrate everything on the > current SAN disk to new SAN disk on a different external unit, and > then retire the old SAN unit. > > For the migration, I would like to mirror the current metadevice to > the new disk. Mirroring should hopefully reduce downtime and help > ensure the accuracy of the data migration. However, I haven't found > any documentation on how to do this. > > I was wondering, if my current metadevice is named d90, can I create a > new mirror named d95 that includes d90 as a submirror (e.g. metainit > d95 -m d90) without damaging d90, and while d90 is live? If so, then I > could attach the new metadevice to d95, and be on my merry way. If > not, is there another way? and why not establish a second mirror on your d90 and throw away the old one after that, like metainit d89 ... metanit d90 -m d89 ? I am not shure if that works with svm concat, but it seems to me as the more logical solution and the way most storage migrations i know about have done. there are some special solutions, which work over IP, but thats mor for migration of storage and machines. Wolfgang |
| |||
| Peter Havens <peter.havens@gmail.com> wrote: > I was wondering, if my current metadevice is named d90, can I create a > new mirror named d95 that includes d90 as a submirror (e.g. metainit > d95 -m d90) without damaging d90, and while d90 is live? Yes. > If so, then I > could attach the new metadevice to d95, and be on my merry way. Not while d90 is live. You can set up the mirror (one-way only), but you cannot start using the mirror until you unmount d90 from use. So one possible path: d90 in use (mounted) create mirror d95 attach d90 to d95 create metadevice on new storage (d91?) unmount d90 mount d95 attach d91 to d95 You have downtime for the storage this way (it has to be unmounted), but it only has to be unmounted for a short period of time. -- Darren Dunham ddunham@taos.com Senior Technical Consultant TAOS http://www.taos.com/ Got some Dr Pepper? San Francisco, CA bay area < This line left intentionally blank to confuse you. > |
| |||
| Wolfgang schrieb: > Peter Havens schrieb: >> I have a Solaris 10 system using SAN disk from an external unit. The >> SAN disk is configured as a Solaris Volume Manager concat metadevice >> and hosts various soft partitions. I need to migrate everything on the >> current SAN disk to new SAN disk on a different external unit, and >> then retire the old SAN unit. > > I am not shure if that works with svm concat, but it seems to me as the > more logical solution and the way most storage migrations i know about > have done. > so i have testet it: i need a submirror for this :-( (i was mislead by veritas plexes) ... |
| |||
| On May 2, 2:43 pm, ddun...@taos.com (Darren Dunham) wrote: > > ...You have downtime for the storage this way (it has to be > unmounted), but it only has to be unmounted for a short period > of time. It's only a short period because I can mount d95 file systems immediately after unmounting d90 file systems and reconfiguring the zones, right? Then I can let d91 sync up while d95 is in use (with the corresponding performance penalty, of course)? Thanks for all the help, Pete |
| |||
| On May 2, 2:02 pm, Wolfgang <wtra...@AT.web.de> wrote: > Peter Havens schrieb: > > > The SAN disk is configured as a Solaris Volume Manager concat metadevice > > and hosts various soft partitions...if my current metadevice is named > > d90, can I create a new mirror named d95 that includes d90 as a > > submirror (e.g. metainit d95 -m d90) without damaging d90, and while d90 > > is live? > > and why not establish a second mirror on your d90 and throw away the old > one after that, like > metainit d89 ... > metanit d90 -m d89 Well, the d90 metadevice isn't a mirror. It's a simple concat metadevice. So, I'm not sure I can "re-create" it as a mirror and attach a submirror to it (is that possible?). Perhaps I misunderstood what you meant, though. Thanks, Pete |
| |||
| Peter Havens wrote: > On May 2, 2:02 pm, Wolfgang <wtra...@AT.web.de> wrote: >> Peter Havens schrieb: >> >> > The SAN disk is configured as a Solaris Volume Manager concat >> > metadevice and hosts various soft partitions...if my current metadevice >> > is named d90, can I create a new mirror named d95 that includes d90 as >> > a submirror (e.g. metainit d95 -m d90) without damaging d90, and while >> > d90 is live? >> >> and why not establish a second mirror on your d90 and throw away the old >> one after that, like >> metainit d89 ... >> metanit d90 -m d89 > > Well, the d90 metadevice isn't a mirror. It's a simple concat > metadevice. So, I'm not sure I can "re-create" it as a mirror and > attach a submirror to it (is that possible?). Perhaps I misunderstood > what you meant, though. > > Thanks, > Pete You will need to create the mirror and attach the sub mirror to it. Read the man page for metainit: http://docs.sun.com/app/docs/doc/816...6nc66vo?a=view You already have the sub mirror d90 Get your existing setup metastat -p metadb -i If you have any meta state databases on the old SAN you'll need to create new ones some place else and delete the old ones. metadb -a -c 3 cXtXdXsX metadb -d cXtXdXsX Start work on the file system: umount d90 file system metainit d95 -m d90 Amend your system to use the the new one way mirror. mount d95 mirror create your new sub mirror metainit d91 4 1 slice1 slice2 slice3 slice4 or whatever type of metadevice you want to create. It can not be smaller than the existing! metattach d95 d91 Allow the mirroring to complete metadettach d95 d90 metaclear d90 metastat -p update /etc/lvm/md.tab You may want to grow your file system into the new volume growfs -M /d90 /dev/md/rdsk/d90 Always use a mirror not a sub mirror as it takes some of the hasle out of doing this type of work! -- Thanks JulianJ (remove nopsam from email) |
| |||
| On May 2, 4:43 pm, JulianJ <juli...@btinternet.nospam.com> wrote: > > ...You will need to create the mirror and attach the sub mirror to it... Exactly my plan. > ...You already have the sub mirror d90... Correct. However, I think Wolfgang thought d90 was already a mirror, but I'm not sure. > ...Always use a mirror not a sub mirror as it takes some of the hasle out of > doing this type of work! I agree. However, I inherited this system without a mirror in place (probably because the real RAIDing is being done on the backend with the SAN device), and am just trying to get some maintenance done on it. My thought was to try and mirror the old SAN disk to new SAN disk, thus reducing downtime and ensuring accurate transfer of data. Thanks, Pete |
| |||
| Peter Havens wrote: > On May 2, 4:43 pm, JulianJ <juli...@btinternet.nospam.com> wrote: >> >> ...You will need to create the mirror and attach the sub mirror to it... > > Exactly my plan. > >> ...You already have the sub mirror d90... > > Correct. However, I think Wolfgang thought d90 was already a mirror, > but I'm not sure. > >> ...Always use a mirror not a sub mirror as it takes some of the hasle out >> of doing this type of work! > > I agree. However, I inherited this system without a mirror in place > (probably because the real RAIDing is being done on the backend with > the SAN device), and am just trying to get some maintenance done on > it. My thought was to try and mirror the old SAN disk to new SAN disk, > thus reducing downtime and ensuring accurate transfer of data. > > Thanks, > Pete That is what my idea should do. I don't know your system, seeing the output from metastat -p would help. If d90 is a sub mirror and the mirror hasn't been created you will need to do this. SVM doesn't know anything about your SAN and it can't mirror your data without having the correct metadevices in place. if you create a mirror with d90 as a sub mirror and then attach another sub mirror it will start to sync. +----- /dev/md/dsk/d90 /dev/md/dsk/d95-| +----- /dev/md/dsk/d91 However if d90 is still mounted then any changes sent to that device won't be sent to the other sub mirror Filesystem Size Used Avail Use% Mounted on /dev/md/dsk/d90 21G 1.4G 20G 7% /d90-mountpoint You will need to change to use: Filesystem Size Used Avail Use% Mounted on /dev/md/dsk/d95 21G 1.4G 20G 7% /d90-mountpoint This way any writes made to the volume will go to d95. SVM will then ensure it goes to both sub mirrors. If you have any other SAN storage I would suggest you have mirrors mounted not sub mirrors. That way when you need to do this all you have to do is attach the new sub mirror wait for it to sync and detach the old sub mirror. -- Thanks JulianJ (remove nopsam from email) |
| ||||
| "Peter Havens" <peter.havens@gmail.com> wrote in message news:ed2a7d7f-afd6-45b1-a49d-0c3cf5ccbe06@m44g2000hsc.googlegroups.com... >I have a Solaris 10 system using SAN disk from an external unit. The > SAN disk is configured as a Solaris Volume Manager concat metadevice > and hosts various soft partitions. I need to migrate everything on the > current SAN disk to new SAN disk on a different external unit, and > then retire the old SAN unit. Yes, you may be able to do this, and not even go down. But takes some planning and precision. And much depends on how it is already configured. There are some things that may necessitate a reboot or remounting the file systems. > For the migration, I would like to mirror the current metadevice to > the new disk. Mirroring should hopefully reduce downtime and help > ensure the accuracy of the data migration. However, I haven't found > any documentation on how to do this. In simplified terms, yes, if your disks are already mirred on the system. - create a 3rd mirror, same size and meta devices - add the third mirror to the mounted d90 - sync it up - split off one of the old mirrors. > I was wondering, if my current metadevice is named d90, can I create a > new mirror named d95 that includes d90 as a submirror (e.g. metainit > d95 -m d90) without damaging d90, and while d90 is live? If so, then I > could attach the new metadevice to d95, and be on my merry way. If > not, is there another way? But in above, it will not work. While you might be able to create d95 as a mirrored device, and add d90 to to it, then say add a mirror d96 to d95 as a mirror, mirroring isn't going to work right unless the mounted device is a mirrored device. That is, d90 must be a mirrored device and not a concat. This would work: d90 - mirrored and mounted device \- d91 - concat of 1 or more disks/partitions, mirror 1 of d90 \- d92 - concat of 1 or more disks/partitions, mirror 2 of d90 You then add new disk as: (and remember metadb devices if any!!!) d90 - mirrored and mounted device \- d91 - concat of 1 or more disks/partitions, mirror 1 of d90 \- d92 - concat of 1 or more disks/partitions, mirror 2 of d90 \- d93 - concat of 1 or more disks/partitions, mirror 3 of d90 \- d94 - concat of 1 or more disks/partitions, mirror 4 of d90 Sync them up. Then remove d91 and d92, remove both from the mirror d90 and d91/d92 definitions including metadb entries if they exist. You then end up with: d90 - mirrored and mounted device \- d93 - concat of 1 or more disks/partitions, mirror 1 of d90 \- d94 - concat of 1 or more disks/partitions, mirror 2 of d90 But as I said, d90 must be the mounted and mirrored device. If it is a concat, then you either must create a mirror device and remount or use your method below. > One alternative is, of course, to shut everything down and copy the > data over manually, but I'd like to avoid that if possible. > > Thanks, > Pete And in any case, backups before you do anything. Would not hurt to read as much as you can get on SVM as while it isn't idiot proof, it is lean, mean fast and flexible when used correctly. It can even do RAID 0+1 on odd numbers of disks. Say you had 3 disks. SVM can do it. |