Re: Migrating to a new SAN storage

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Thu, 17 Jul 2014 22:07:58 +0200
Message-ID: <53C82D1E.6060502_at_gmail.com>



This is what I used to identify the asm disks in use (to be removed) before adding the new ones:

_mp=/dev/mpath/<custom_string>
for _asmdisk in /dev/oracleasm/disks/*; do

   _dmname=$(/usr/sbin/oracleasm querydisk -d "${_asmdisk##*/}" | sed -r 's/.* on device (.*)\[.*/\1/')

   printf '%s is on %s\n' "$_asmdisk" "$( ls -l "$_mp"* | sed -nr "/${_dmname##*/}/s/.* (.*) -> .*${_dmname##*/}/\1/p" )" done

Regards
Dimitre

P.S. sed -r is not standard (GNU sed on Linux supports it).

On 17/07/2014 21:49, Justin Mungal wrote:
> Your steps are solid too though Maaz :) That's exactly how I've done
> it before.
>
>
> On Thu, Jul 17, 2014 at 2:48 PM, Maaz Anjum <maazanjum_at_gmail.com
> <mailto:maazanjum_at_gmail.com>> wrote:
>
> You learn something new every day :)
>
> Cheers!
>
>
> On Thu, Jul 17, 2014 at 3:43 PM, Justin Mungal <justin_at_n0de.ws
> <mailto:justin_at_n0de.ws>> wrote:
>
> Or do it in one step:
>
> +1
>
> I've done it this way multiple times with no issues. Half the
> rebalance time.
>
>
>
>
> --
> A life yet to be lived...
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jul 17 2014 - 22:07:58 CEST

Original text of this message