Saturday, August 18, 2012

Error in enabling mirror in ZFS File system

We have reimaged our Intel hardware with Solaris 10 x86 
10/09 image. 

As part of installation we have selected ZFS file system and single hard 
disk. 



So the primary hard disk is of ZFS format and Secondary hard disk is of UFS 
format. 



So we are facing following issue while trying to enable mirroring using 
following command 



bash-3.00# *zpool attach rpool c0t0d0s0 c0t1d0s0* 



invalid vdev specification 

use '-f' to override the following errors: 

/dev/dsk/c0t1d0s0 contains a ufs filesystem. 



Could you please tell us what needs to be done in this case

Hi 

I changed the disk label using format -e 

But facing another issue while trying to enable mirroring using 
following command 

bash-3.00# *zpool attach rpool c0t0d0s0 c0t1d0s0* 

cannot attach c0t1d0s0 to c0t0d0s0: EFI labeled devices are not supported on 
root pools. 


I found thht you are trying to mirror slices 'S0'.......that 
can't be done.....U have to mirror the entire HDD's....First of all u can't 
mirror ZFS with a UFS,u need to do erase the contents in the Secondary UFS 
HDD else u can override the UFS which deletes the data's n those UFS HDD. 

*# zpool -f attach rpool c0t0d0 c0t1d0 ( dont denote slices over 
here)* 
*# zpool list* 
*# zpool status -xv*
Yo can use -f to override if you don't need the contents in those 
disks.......

Use the force, Luke ;-)
As far as I know you can't include a UFS file system in a ZFS file system. If you want to use that disk you will have to erase it and start from scratch. 
Need to change secondary hard disk file system format first with command: 

1. format -e 
2. Select the disk. 
3. Select label and change it to EFI label. After that you will saw new 
partition(8) in partition table.
I tried with selecting 2 disks for ZFS file system at the time of 
installation itself. 

But when booting it showing the error "data corrupted" in 2nd disk.. 

bash# zpool status -x shows the status as degraded 
Thanks for your response. I changed the label to EFI. 
So it showing an error 

bash-3.00# zpool attach rpool c0t0d0 c0t1d0 
cannot label 'c0t1d0': EFI labeled devices are not supported on root pools. 

I tried format utility to change that back to SMI label. But it asking to 
use fdisk. 
  Even if i give without slices also it showing the same error 

invalid vdev specification 
use '-f' to override the following errors: 
/dev/dsk/c0t1d0s0 contains a ufs filesystem. 

How to erase the contents in secondary hard disk to make it as ZFS file 
system. 

Is it OK to use -f to override? Some of the document mentioned that 
"Manually correct the error without using -f option" 
hi, 

if you are SURE that that slice is not used by any FS, then you can use 
-f switch. 

BUT, **only** if you are sure. Please check all UFS settings. If you 
force its use (-f) then you can loose (important) data if that slice is 
part of UFS or used anyhow (like conf slice for SVM, raw Oracle slice etc). 

Be careful. Do double check. !!!!! 
Sorry, I shouldn't be so fast to suggest use of force, as others have 
suggested, make sure the UFS filesystem is not required before 
obliterating it. Also, if using the whole disk, make sure that no 
metadevices depend upon a metadb in another partition on that disk 

One note is that if you are going to use zfs mirroring for whole disks, 
you can normally remove the old partition tables by dd'ing zeros to the 
beginning of the disk:- 

dd if=/dev/zero of=/dev/rdsk/cXtYdZs2 bs=512 count=8192 

Then run format against the disk and delete all but slice 2. and add 
slice 0 with same geometry as slice 2 

Once this has been done, you should be able to add slice 0 to the mirror


0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM