05-08-2013 07:43 PM
Hello all,
i would like to replace my failed disk via the vxdiskadm utility
05-08-2013 08:57 PM
Hi,
In vxvm admin guide document, there is a chapter for replace disks, Except upper operation, you need run some os commands to clean device tree.
You can access sort.symantec.com to check document.
https://sort.symantec.com/documents
Regards
05-08-2013 08:59 PM
05-08-2013 10:38 PM
Hi starflyfly,
when i use the vxdiskadm command, is says it needs a diskgroup the problem is that the spare disk has no diskgroup
05-08-2013 11:18 PM
Hi Chunckchang23,
Did you try menu option 5 VolumeManager/Disk/ReplaceDisk? It is used for your condition.
05-09-2013 12:48 AM
05-09-2013 12:41 PM
Make sure your OS can see the c0t2d0s2 disk BEFORE you try any volume manager actions.
Does 'prtvtoc /dev/rdsk/c0t2d0s2' show you the contents of the label, or an error?
If an error is shown, you need to fix your OS to be able to see your disk; try 'devfsadm -Ccv disk', then try the prtvtoc command again, and depending on if that work or not, you might try to format the disk, then make sure you can prtvtoc it.
If that doesn't work, you may need to physically replace the drive (or is that what you have already done)?
You sould also keep on eye on the OS console log (/var/adm/messages) and address any errors reported there.
Only after you have fixed and/or proven access from the OS level should you start using VxVM tools on the device.
Once your OS tools can successfullly see the disk, you should do 'vxdisk scandisks' (or 'vxdctl enable') so that VxVM can refresh his device tables with the new and/or fixed devices.
05-09-2013 07:57 PM
Hi kjbss
It can be seen with the prtvoc command.
EMMDPD03:/# prtvtoc /dev/rdsk/c0t2d0s2
my problem is that when i list down all disks, it shows the disk with an error state,
05-09-2013 08:54 PM
Hi,
The disk is in error state, so you can't use replace failed disk procedures to replace it.
the error state is because you have no partition 2 in this disk.
If you dont' need keep original data on this disk,
use format to create partition 2 for this disk, which from 0 to last sector.
then , run:
vxdctl enable,
it should in online invalid state.
Be careful when do operation, make sure backup data if needed, and run vxdctl enable in non business time.
05-09-2013 09:57 PM
Hello Starflyfly,
Thank you for the input. I'm starting to understand what's going on :)
Since my goal is to reformat the disk and create partition, how do i make sure that files under the disk are not lost(if there are any?)
05-10-2013 01:51 AM
Hi,
You should use format to add partition 2, with full disk capacity, then run vxdctl enable, it will change to "online invalid" state.
Here is my test log, hope you can first finish test in your bed.
================
05-10-2013 01:52 AM
if you like do vxdisksetup for this disk, the data in the old file system will lost.
05-10-2013 04:11 PM
I wonder why you tried to replace disk. There are no "failed" disk media in "vxdisk list" output. c0t2d0s2 is in error state, but it just mean c0t2d0s2 is not initialized at OS level for use of VxVM.
By prtvtoc output, c0t2d0s2 is used without VxVM, so do not format it by format command or vxdisksetup. Ignore 'error' status and keep it as it is.
05-10-2013 08:39 PM
Hi,
If a disk is in error state, the two main causes that drills down are:
1. disk partition table has issues
2. paths to disk are disable .
I agree with starflyfly's advice, you need to fix the partition table & get the disk to online invalid state. If the disk had data before & you want to recover data, you need to ensure that partition table is restored correctly as it was before & while intializing disk in veritas, you need to restore exsting configuration of privlen, publen attributes .. you can use this options with vxdisk init or vxdisksetup..
G
05-13-2013 07:09 PM
Hi Gaurav,
is there a way to check if the disk partition has files before?
05-14-2013 03:25 AM
If you *know* that the disk used to be managed by VxVM, then you would need to get the partition layout as it was back then and reapply that exactly to the disk, as Gaurav says.
Interestingly, from the prtvtoc output you provided, partition 7 has the VxVM Tag (15) and points to the entire disk, so in that way it does appear that it was at one time a VxVM managed disk.
However, the prtvtoc output also now shows two slices (4 and 6) with Mount Directories associated with them, and so it looks like this disk was *last* used as a test disk outside of VxVM management:
* First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 3 9 01 6400 10485760 10492159 4 0 01 18881280 2088960 20970239 /test1 6 0 01 10492160 8389120 18881279 /test 7 15 01 0 20970240 20970239
We can see that slices 4 and 6 were likely used for testing purposes, but if you really want to see the files in those partitions:
...Taking slice 6 as an example:
Check to see if it is a mountable partition:
$ fstyp /dev/rdsk/c2t500601603022FB3Fd17s6
If it shows to be a filesystem on there, like ufs or vxfs, sanity-check the filesystem:
$ fsck -F <FStype> -y /dev/rdsk/c2t500601603022FB3Fd17s6
Make a temporary mount point for it:
$ mkdir /tmp_test
Mount it:
$ mount -F <FStype> /dev/dsk/c2t500601603022FB3Fd17s6 /tmp_test
Inspect it however you want to...
$ ls -l /tmp_test
...etc...
05-14-2013 08:17 AM
Hi again chuckchang23 --
I just noticed I based my last advice to you on the prtvtoc output from starflyfly's test envrionment!
Naughty of me; sorry about that...
The pertinent section of your 'prtvtoc /dev/rdsk/c0t2d0s2' output shown below:
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
3 9 00 16065 10490445 10506509 /opt/bmc
6 11 00 10506510 573424110 583930619 /backup
8 1 01 0 16065 16064
Well, it would appear to me that this disk never had VxVM management on it, or at least has been reformatted since.
The point is, if you want to see the data on there...:
(Using slice 3 as the expample, which seems to contain BMC software data (/opt/bmc) data on there)...
Check to see if it is a mountable partition:
$ fstyp /dev/rdsk/c0t2d0s3
If it shows to be a filesystem on there, like ufs or vxfs, sanity-check the filesystem:
$ fsck -F <FStype> -y /dev/rdsk/c0t2d0s3
Make a temporary mount point for it:
$ mkdir /tmp_opt_bmc
Mount it:
$ mount -F <FStype> /dev/dsk/c0t2d0s3 /tmp_opt_bmc
Inspect it however you want to...
$ ls -l /tmp_opt_bmc
...etc...
05-21-2013 05:07 PM
Hi kjbss,
The first command issued an error on my faulted disk
05-21-2013 07:42 PM
Hi chuck,
The I/O error indicate that there is I/O problem with the disk /dev/rdsk/c0t2d0s2.
You should check on the I/O error first for HW issue or link problem.
05-24-2013 01:09 AM
chuckchange23 -
It would seem that you have transient access to disk /dev/rdsk/c0t2d0s2, because on your 10 May 2013 post above, you show 'prtvtoc /dev/rdsk/c0t2d0s2' working -- this would not have worked if you had I/O errors to that disk, as shown in your 22 May 2013 post.
As stinsong points out, you need to investigate and resolve your I/O errors first.
Do you have this drive on an array that has active/passive support to your host? Maybe another host has the active path to the drive, or some other kind of SAN zoning preventing you from accessing that drive from your EMMDPD03 host on the 22 May.