Sponsored Content
Operating Systems Solaris metadevices: how to test metadb (how to corrupt replicas/understanding replicas) Post 302440978 by deadeyes on Thursday 29th of July 2010 04:16:15 AM
Old 07-29-2010
Quote:
Originally Posted by kumarmani
Your state database is showing no issue reason being the below one has not executed

dd if=/dev/zero of=/dev/md/rdsk/c1t1d0s3
Sorry that was a typo. I used /dev/rdsk/c1t1d0s3. And that returned no error.

Quote:
Originally Posted by kumarmani
2nd point is for running of volume manager the minimum functioning database is needed is more then 50% +1 in your case if all the meatda file is on one partition, and if you corrupt the metadb then your entire filesystem is going to get corrupted.
Do note that the meta dbs are on 2 different slices (I wanted to "simulate" having 2 hard drives). So in the first case only 50% of the replicas can be damaged and in the second case half+1 get damaged.
Also from the docs it tells that 50% of the replicas is enough to keep it running while half+1 is necessary to get your system booting again.

Quote:
Originally Posted by kumarmani
you can use metadb -f for deletion and addition of state replica.
The tools in itself are not the problem.
I want to test how the number of available replicas affects the system.
But for deleting half+1 replicas the system did not panic as mentioned in the docs. It is almost as it doesn't matter if there are 5 or 1 replicas available as the only problem I have seen happening is when I reboot the system or unmount the filesystem. (see example below with 7 replicas and overwriting 4 of them)

Thanks for your response!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SDS and replicas

Hello, We are using Solstice Disk Suite on Solaris 2.7. We want to add two striped volume with six disks. On each disk, we take a slice and we create the stripe. That I want to know : Is it necessary to add two replicas on the same slice on the new disks, as made before on the others... (1 Reply)
Discussion started by: christophe
1 Replies

2. Solaris

insufficient metadevice database replicas ERROR

First I would like to thank this forum for assisting me in setting up my 1st sunbox. Could not have done it if it had not been for you guys and google :D I have mirrored my box and have SUCCESSFULLY tested booting from the rootdisk and rootmirror successfully. I am now looking at configuring... (2 Replies)
Discussion started by: mr_manny
2 Replies

3. Solaris

Problem with DiskSuite replicas

Good morning, I have Solstice disk suite installed on my server. One disk broke so I sostitute it. A replica was present on this disk. I had delete and then recreate it with commands metadb -d and metadb -a. Now when I inquire for the status of replicas I see this: stp11# metadb -i ... (2 Replies)
Discussion started by: bonovox
2 Replies

4. Solaris

Metadevices in mirroring ?

Hi Guys. I have the follow disk mappig.... My doubt is that the filesystem root is in mirroring. I can see this in the configuration but , I dont know exactly if this in mirroring mean disk in RAID. In short: Watching the configuration...Can I said if the filesystem / is in Raid? ... (3 Replies)
Discussion started by: aggadtech08
3 Replies

5. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

6. Solaris

Solaris Volume Manger - Database Replicas Question - Benefits of Increasing Default Size?

Hey all! I was hoping someone knew anything about this one... I know with Solaris Volume Manager the default Database Replica size is 8192 blocks (4MB approximately) Now I know you can increase this amount but is there any point? The reason I am asking this is that I've setup mirroring on... (2 Replies)
Discussion started by: Keepcase
2 Replies

7. Solaris

Metadevices deleted

Hi Guys, We have an issue, all metadb's on system was deleted and the system was rebooted. the system is currented mounted in single-user mode . its a x86 server. the volumes under SVM is as follows. / /var and /usr please suggest Please use code tags <- click the... (1 Reply)
Discussion started by: karthick.sh
1 Replies

8. Solaris

SVM - Metadevices are offline after changing hostname solaris x86

Hi , We are facing an issue on one of our solaris x86 server, After changing the hostname and a orderly reboot , all metadevices shows offline. please let us know the steps to restore back all metadevices to working state with this new hostname (3 Replies)
Discussion started by: karthick.sh
3 Replies

9. Solaris

zfs raidz2 - insufficient replicas

I lost my system volume in a power outage, but fortunately I had a dual boot and I could boot into an older opensolaris version and my raidz2 7 drive pool was still fine. I even scrubbed it, no errors. However, the older os has some smb problems so I wanted to upgrade to opensolaris11. I... (3 Replies)
Discussion started by: skk
3 Replies

10. Solaris

Creating metadevices

Hi I am new to SVM, but I would like to configure it in one of my servers. The setup is as follows: I have one server running solaris 10 , and is connected to a NetApp via iSCSI protocol. This is how I intend to do it: Ask the NetApp admin, to provide me with 3 LUNs of 100G each, them use the... (14 Replies)
Discussion started by: fretagi
14 Replies
md(7D)								      Devices								    md(7D)

NAME
md - user configurable pseudo device driver DESCRIPTION
md is a user configurable pseudo device driver that provides disk concatenation, striping, mirroring, RAID5 metadevices, trans metadevices, and hot spare utilities. Trans devices are no longer supported and have been replaced by UFS logging. See mount_ufs(1M). The block devices access the disk using the system's normal buffering mechanism and are read and written without regard to physical disk records. There is also a ``raw'' device which provides for direct transmission between the disk and the user's read or write buffer. A sin- gle read or write call usually results in one I/O operation; raw I/O is therefore considerably more efficient when many bytes are transmit- ted. The names of the block devices are found in /dev/md/dsk; the names of the raw devices are found in /dev/md/rdsk. Metadevices have the appearance of whole disks; there are no slices (partitions). I/O requests (such as lseek(2)) to the metadevices must have an offset that is a multiple of 512 bytes (DEV_BSIZE), or the driver returns an EINVAL error. If the transfer length is not a multiple of 512 bytes, the tranfer count is rounded up by the driver. The md pseudo device drivers support all disk devices on all Solaris 2.4 or later Solaris systems. IOCTLS
This section provides a list of the ioctls supported by the metadisk driver. The following ioctls are valid when issued to the raw metadevice, such as /dev/md/rdsk/d0. See dkio(7i) for additional information. DKIOCGGEOM This ioctl is used to get the disk geometry. The metadisk driver fills in the dkg_nhead, dkg_nsect, dkg_rpm, dkg_write_reinstruct and dkg_read_reinstruct from the first component of the metadevice (at metainit time). dkg_ncyl is calculated using the size of the metadevice (reported by metastat) divided by (dkg_nhead * dkg_nsect). The total size is always a multiple of (dkg_nhead * dkg_nsect). If the first component of a metadevice does not start on cylinder number 0, then the dkg_ncyl is increased by one cylinder; because DKIOCGVTOC reports the metadevice as starting on cylinder 1. The side effect here is that it looks like cylinder 0 is not being used, but all the arithmetic works out correctly. If the metadevice is not set up, then ENXIO is returned. DKIOCINFO When issued to the administrative device or metadevice, this ioctl sets dki_unit to the unit number of the metadevice, dki_ctype to a value of DKC_MD, and dki_partition to 0, because there are no slices. DKIOCGVTOC This ioctl returns the current vtoc. If one has not been written, then a default vtoc is returned. v_nparts is always 1. v_part[0].p_start is 0 if the first component of the metadevice starts on cylinder 0. Otherwise, the p_start field is the starting sector of cylinder 1. v_part[0].p_size is the same as the total size reported by metastat. DKIOCSVTOC This ioctl stores the vtoc in the metadevice state database so it is persistent across reboots. DIAGNOSTICS
Notice Log Messages The informative log messages include: md: dnum: Hotspared device dev with dev The first device name listed has been hot spare replaced with the second device name listed. md: dnum: Hotspared device dev(num,num) with dev(num,num) The first device number listed has been hot spare replaced with the second device number listed. md: Could not load misc /dev The named misc module is not loadable. It is possibly missing, or something else has been copied over it. md: dnum: no mem for property dev Memory could not be allocated in the prop_op entry point. md: db: Parsing error on 'dev' Set command in /kernel/drv/md.conf for the mddb.bootlist <number> is not in the correct format. metadb -p can be run to put the correct set commands into the /kernel/drv/md.conf file. md: dnum: dev(num,num) needs maintenance md: dnum: dev needs maintenance An I/O or open error has occurred on a device within a mirror causing a component in the mirror to change to the Maintenance state. md: dnum: dev(num,num) last erred md: dnum: dev last erred An I/O or open error has occurred on a device within a mirror and the data is not replicated elsewhere in the mirror. This is causing the component in the mirror to change to the Last Erred state. Warning Log Messages The warning log messages include: md: State database is stale This error message comes when there are not enough usable replicas for the state database to be able to update records in the database. All accesses to the metadevice driver will fail. To fix this problem, more replicas need to be added or inaccessible replicas need to be deleted. md: dnum: read error on devmd: dnum: write error on dev A read or write error has occurred on the specified submirror, at the specified device name. This happens if any read or write errors occur on a submirror. md: dnum: read error on dev(num,num)md: dnum: write error on dev(num,num) A read or write error has occurred on the specified submirror, at the specified device number. This happens if any read or write errors occur on a submirror. md: State database commit failed md: State database delete failed These messages occur when there have been device errors on components where the state database replicas reside. These errors only occur when more than half of the replicas have had device errors returned to them. For instance, if you have three components with state database replicas and two of the components report errors, then these errors may occur. The state database commit or delete is retried periodically. If a replica is added, then the commit or delete will finish and the system will be operational. Otherwise the system will timeout and panic. md: dnum: Cannot load dev driver Underlying named driver module is not loadable (for example, sd, id, xy, or a third-party driver). This could indicate that the driver mod- ule has been removed. md: Open error of hotspare devmd: Open error of hotspare dev(num,num) Named hotspare is not openable, or underlying driver is not loadable. Panic Log Messages The panic log messages include: md: dnum: Unknown close typemd: dnum: Unknown open type Metadevice is being opened/closed with an unknown open type (OTYP). md: State database problem Failed metadevice state database commit or delete has been retried the default 100 times. FILES
/dev/md/dsk/dn block device (where n is the device number) /dev/md/rdsk/dn raw device (where n is the device number) /dev/md/setname/dsk/dn block device (where setname is the name of the diskset and n is the device number) /dev/md/setname/rdsk/dn raw device (where setname is the name of the diskset and n is the device number) /dev/md/admin administrative device /kernel/drv/md driver module /kernel/drv/md.conf driver configuration file /kernel/misc/md_stripe stripe driver misc module /kernel/misc/md_mirror mirror driver misc module /kernel/misc/md_hotspares hotspares driver misc module /kernel/misc/md_trans metatrans driver for UFS logging /kernel/misc/md_raid RAID5 driver misc module SEE ALSO
mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metarename(1M), metareplace(1M), metaroot(1M), metassist(1M), metaset(1M), metastat(1M), metasync(1M), metattach(1M), md.cf(4), md.tab(4), attributes(5), Solaris Volume Manager Administration Guide NOTES
Trans metadevices have been replaced by UFS logging. Existing trans devices are not logging--they pass data directly through to the under- lying device. See mount_ufs(1M) for more information about UFS logging. SunOS 5.10 29 Aug 2003 md(7D)
All times are GMT -4. The time now is 08:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy