Delete all SVM metadevices

Delete all SVM metadevices

Post by js » Fri, 28 Oct 2005 16:08:49



Solaris 9

I have metadevices that I cannot get rid of.

Is there a way to wipe out all SVM devices by say ... deleting all metadb
state repliaces in both the local state database and diskset state
database ?

What about deleting disksets in an unconventional way ?? At the moment, I
cannot even access the disksets, as I am getting "metaset: syddb280r: No
such device".

So I would really like a way to wipe out all SVM devices and disksets
WITHOUT having to reinstall Solaris.

1) Cannot take ownership or delete a metaset:

# metaset -s testset

Set name = testset, Set number = 2

Host Owner
syddb280r
syddbe220r

Drive Dbase

c3t0d5 Yes

c4t0d5 Yes

# metaset -s testset -t -f
metaset: syddb280r: testset: there are no existing databases

bash-2.05# metaset -s testset -t
metaset: syddb280r: testset: there are no existing databases

bash-2.05# metaset -s testset -d c3t0d5
metaset: syddb280r: testset: must be owner of the set for this command

2) The device ID is no longer up to date with SVM ... eventually
ending up with "metastat: No such device "

$ metastat -s shared3310 d50

shared3310/d50: Mirror
Submirror 0: shared3310/d51
State: Needs maintenance
Submirror 1: shared3310/d52
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 204767040 blocks (97 GB)

shared3310/d51: Submirror of shared3310/d50
State: Needs maintenance
Invoke: metasync shared3310/d50
Size: 204767040 blocks (97 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot
Spare
c3t0d4s0 0 No Okay Yes

shared3310/d52: Submirror of shared3310/d50
State: Needs maintenance
Invoke: metasync shared3310/d50
Size: 204767040 blocks (97 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot
Spare
c4t0d4s0 0 No Okay Yes

Device Relocation Information:
Device Reloc Device ID

< ... snip ...>

I tried to detach the submirrors, but I then get the
following errors:

bash-2.05# metadetach -s shared3310 -f d50 d52
metadetach: syddb280r: shared3310/d50: resync in
progress

bash-2.05# metadetach -s shared3310 -f d50 d51
metadetach: syddb280r: shared3310/d50: resync in
progress

# metadb -i -s shared3310
flags first blk block count
a m luo 16 8192 /dev/dsk/c3t0d0s7
a luo 16 8192 /dev/dsk/c3t0d1s7
a luo 16 8192 /dev/dsk/c3t0d2s7
a luo 16 8192 /dev/dsk/c3t0d3s7
M 16 unknown /dev/dsk/c3t0d4s7
a luo 16 8192 /dev/dsk/c4t0d0s7
a luo 16 8192 /dev/dsk/c4t0d1s7
a luo 16 8192 /dev/dsk/c4t0d2s7
a luo 16 8192 /dev/dsk/c4t0d3s7
M 16 unknown /dev/dsk/c4t0d4s7

# metadb -s shared3310 -d c4t0d4s7

# metadb -s shared3310 -a c4t0d4s7

# metadb -i -s shared3310
flags first blk block count
a m luo 16 8192 /dev/dsk/c3t0d0s7
a luo 16 8192 /dev/dsk/c3t0d1s7
a luo 16 8192 /dev/dsk/c3t0d2s7
a luo 16 8192 /dev/dsk/c3t0d3s7
M 16 unknown /dev/dsk/c3t0d4s7
a luo 16 8192 /dev/dsk/c4t0d0s7
a luo 16 8192 /dev/dsk/c4t0d1s7
a luo 16 8192 /dev/dsk/c4t0d2s7
a luo 16 8192 /dev/dsk/c4t0d3s7
a u 16 8192 /dev/dsk/c4t0d4s7

# metastat -s shared3310 d50
metastat: syddb280r: No such device

# metastat -s shared3310 d30
metastat: syddb280r: No such device

# metastat -s shared3310
metastat: syddb280r: No such device

# metaset -s shared3310
metaset: syddb280r: No such device

 
 
 

Delete all SVM metadevices

Post by Mr. Johan Andersso » Fri, 28 Oct 2005 17:28:28



> Solaris 9

> I have metadevices that I cannot get rid of.

> Is there a way to wipe out all SVM devices by say ... deleting all metadb
> state repliaces in both the local state database and diskset state
> database ?

> What about deleting disksets in an unconventional way ?? At the moment, I
> cannot even access the disksets, as I am getting "metaset: syddb280r: No
> such device".

> So I would really like a way to wipe out all SVM devices and disksets
> WITHOUT having to reinstall Solaris.

<lots of metastat data snipped>

Not one of your commands seesm to have tried adding the -f flag to your
arguments, i.e. force it whatever the error.

IF that fails, then we can investigate further.

IF you cant remove the metasets, then you can remove the "local set" and
reinitiate that, that should wipe any knwledge about the metasets from it.

/Johan A

 
 
 

Delete all SVM metadevices

Post by js » Fri, 28 Oct 2005 22:27:43




>> Is there a way to wipe out all SVM devices by say ... deleting all metadb
>> state repliaces in both the local state database and diskset state
>> database ?

>> What about deleting disksets in an unconventional way ?? At the moment, I
>> cannot even access the disksets, as I am getting "metaset: syddb280r: No
>> such device".

>> So I would really like a way to wipe out all SVM devices and disksets
>> WITHOUT having to reinstall Solaris.

> <lots of metastat data snipped>

> Not one of your commands seesm to have tried adding the -f flag to your
> arguments, i.e. force it whatever the error.

Believe me ... I tried

Quote:

> IF that fails, then we can investigate further.

> IF you cant remove the metasets, then you can remove the "local set" and
> reinitiate that, that should wipe any knwledge about the metasets from it.

That's what I thought, I just wanted confirmation from someone who knows
better. Since disksets have their own metadbs, and they are not listed
in /etc/lvm/* , ... SVM must know if the location of the state replicas for
disksets from the local disksets.

If I then recreate the disksets, I presume SVM will not read any existing
diskset state database replicas that previously existed on the disks.

 
 
 

Delete all SVM metadevices

Post by js » Fri, 28 Oct 2005 22:35:11



> That's what I thought, I just wanted confirmation from someone who knows
> better. Since disksets have their own metadbs, and they are not listed
> in /etc/lvm/* , ... SVM must know if the location of the state replicas
> for disksets from the local disksets.

That should have read:

Since disksets have their own metadbs, and they are not listed
in /etc/lvm/* , ... SVM must know of the location of the state replicas
for disksets from the local metadb

Having said that, you actually said:

== IF you cant remove the metasets, then you can remove the "local set" and
== reinitiate that, that should wipe any knwledge about the metasets from
it.

I actually originally read that you meant "remove the local state replicas".
Meaning, I presume you meant "metadb -d", without specifying any diskset
parameter, until all local state replicas are deleted, will effectively
wipe out any knowledge of disk sets.

Then I can recreate the disk sets again by first creating new local state
replicas.

 
 
 

Delete all SVM metadevices

Post by Mr. Johan Andersso » Fri, 28 Oct 2005 23:20:11




> > That's what I thought, I just wanted confirmation from someone who knows
> > better. Since disksets have their own metadbs, and they are not listed
> > in /etc/lvm/* , ... SVM must know if the location of the state replicas
> > for disksets from the local disksets.

> That should have read:

> Since disksets have their own metadbs, and they are not listed
> in /etc/lvm/* , ... SVM must know of the location of the state replicas
> for disksets from the local metadb

This is what I ment and belive yes...

Quote:> Having said that, you actually said:

> == IF you cant remove the metasets, then you can remove the "local set" and
> == reinitiate that, that should wipe any knwledge about the metasets from
> it.

> I actually originally read that you meant "remove the local state replicas".
> Meaning, I presume you meant "metadb -d", without specifying any diskset
> parameter, until all local state replicas are deleted, will effectively
> wipe out any knowledge of disk sets.

Yes, basically that means recreating your default metaset and all in it,
not a big problem if you know what you are doing.

when you specify any meta command and dont give a -s <metaset> you are
working with the default metaset, if you clean that, i.e remove all
metadevices and metadatabases and start over, it should NOT remember that
you had such before.

Quote:> Then I can recreate the disk sets again by first creating new local state
> replicas.

I believe that should work, was a while since I needed to do something
like that though so I am not 100% sure, you might need to reboot "out of
SDS" to clear in memory data, but I am as I said unsure of that.

/Johan A

 
 
 

Delete all SVM metadevices

Post by js » Sat, 29 Oct 2005 16:05:09



> 1) Cannot take ownership or delete a metaset:

> # metaset -s testset

> Set name = testset, Set number = 2

> Host Owner
> syddb280r
> syddbe220r

> Drive Dbase

> c3t0d5 Yes

> c4t0d5 Yes

> # metaset -s testset -t -f
> metaset: syddb280r: testset: there are no existing databases

> bash-2.05# metaset -s testset -t
> metaset: syddb280r: testset: there are no existing databases

> bash-2.05# metaset -s testset -d c3t0d5
> metaset: syddb280r: testset: must be owner of the set for this command

Sun support offered this gem:

        metaset -s testset -P

... and the diskset is now gone.

Interestingly, the -P option is not in the man page of metaset in Solaris9,
but it seems that it is in Solaris10. Fortunately, it also works on
Solaris9.

 
 
 

1. SVM: From metadevice to non-metadevice and back to metadevice

SVM on Solaris 9

SVM mirror consisting of submirrors. The SVM mirror metadevices are used as
raw devices.

If you delete the metadevices ( one way or another ), and recreate the SVM
mirror devices, will the data on the raw devices still remain intact ?

I guess the question is similar to:

SVM mirror consisting of submirrors. The SVM mirror metadevices are used as
block devices for a ufs partition.

Some thing went wrong with SVM, where both submirrors are in "Needs
maintenance" .... so I directly mounted the disk device of one of the
submirror and begin reading / writing to it.

If you delete the metadevices ( one way or another ), and create the SVM
submirror on that device and attach it to a SVM mirror, will the data on
that device remain intact ? In other words, will the updated data on the
directly mounted disk device be reflected on the SVM mirror ?

2. Setup/LILO question

3. Mapping SVM metadevices back to a specific StorEdge 3310 ( mirrored )

4. Fallback internet connection

5. 'delete' command in ftp delete files in local hard disk ???

6. Solaris useradd command

7. I want delete to right-delete

8. Kernel messages in xconsole

9. Tricky bug in program caused by delete/delete [] - help

10. Remapping Keys (want delete key to delete etc!)

11. How to make Delete key delete forward?

12. getting Delete key to DELETE on RS6000

13. How to (setq delete-key-deletes-forward t) in syscons?