Home
Man
Search
Today's Posts
Register

The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Bad disk, how to replace ?

Tags
solaris

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 06-12-2018
Bad disk, how to replace ?

Hello,

I see hard and transport errors on all disks under treso pool and looks like some data corruption too. I want to take backup before, I reboot and replace disk. As of now, there are no slots free on server, so one option is, to break mirror, remove second disk (I need two disks, because data is 400GB). I have two spare disks, will insert in those slots, mount and copy data.
Can somebody help me to understand, if below setup shows me that I can detach disks without disturbing data and mount ?
Code:
pool: treso
 state: DEGRADED
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: http://www.sun.com/msg/ZFS-8000-8A
 scrub: resilver completed after 0h42m with 0 errors on Thu Mar 24 12:11:13 2016
config:

        NAME        STATE     READ WRITE CKSUM
        zones2      DEGRADED    17     0     0
          raidz1    DEGRADED    17     0     0
            c1t4d0  ONLINE       0     0     0
            c1t5d0  DEGRADED    35     0     0  too many errors
            c1t6d0  ONLINE       0     0     0
            c1t8d0  FAULTED      2     0     0  too many errors

errors: 4 data errors, use '-v' for a list
#

Thanks
# 2  
Old 06-12-2018
In current configuration, you will can do little..
Reason being your configuration (RAIDZ1), allows one disk to fail (which it did).

Other being almost failed, pool is still accessible.
When the degraded disk fails (should happen soon enough), you will lose all the data in zpool.

The course of action should be :
  1. Take a backup using zfs send / receive or copy the data.
  2. zpool offline the FAILED disk from pool.
  3. Unconfigure the offlined disk using cfgadm
  4. Insert a new working drive in the same slot, and configure it using cfgadm
  5. Issue a zpool online / replace against the replaced disk.

https://docs.oracle.com/cd/E19253-01...cet/index.html

Regards
Peasant.

Last edited by rbatte1; 06-13-2018 at 07:14 AM.. Reason: Formatted numbered list with LIST=1 tags
The Following User Says Thank You to Peasant For This Useful Post:
rbatte1 (06-13-2018)
# 3  
Old 06-15-2018
I took the backup, destroyed pool, replace disks and created new pool - zones3
Now, instead of putting in raidz1, I just want to create mirror of zones3. With below configuration, if one disk fails, data will be lost. I have two new disks- c1t4d0 and c1t6d0
Code:
# zpool status zones3
  pool: zones3
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        zones3      ONLINE       0     0     0
          c1t9d0    ONLINE       0     0     0
          c1t10d0   ONLINE       0     0     0

errors: No known data errors
#

Is it correct command to run ?
Code:
zpool zones3 mirror c1t4d0 c1t6d0

# 4  
Old 06-15-2018
Take the following example, where i'm using files but it's the same with real devices.
This will tolerate 1 to 2 device failures.

If two devices fail from one top level vdev (mirror-N) you will lose data.

I would strongly suggest using odd number of disks and keeping one hot spare in pool.
In your configuration, get one more disk if you really love your data.

Code:
[root@gimmick ~]# ls -dl /zones/test/disk*
-rw------T   1 root     root     104857600 Jun 16 02:48 /zones/test/disk0
-rw------T   1 root     root     104857600 Jun 16 02:48 /zones/test/disk1
-rw------T   1 root     root     104857600 Jun 16 02:48 /zones/test/disk2
-rw------T   1 root     root     104857600 Jun 16 02:48 /zones/test/disk3
[root@gimmick ~]# 

[root@gimmick ~]# zpool status testpool

  pool: testpool
 state: ONLINE
  scan: none requested
config:

	NAME                 STATE     READ WRITE CKSUM
	testpool             ONLINE       0     0     0
	  /zones/test/disk1  ONLINE       0     0     0
	  /zones/test/disk0  ONLINE       0     0     0

errors: No known data errors
[root@gimmick ~]# zpool attach testpool /zones/test/disk0 /zones/test/disk2
[root@gimmick ~]# zpool attach testpool /zones/test/disk1 /zones/test/disk3
[root@gimmick ~]# zpool status testpool
  pool: testpool
 state: ONLINE
  scan: resilvered 49K in 0h0m with 0 errors on Sat Jun 16 02:48:41 2018
config:

	NAME                   STATE     READ WRITE CKSUM
	testpool               ONLINE       0     0     0
	  mirror-0             ONLINE       0     0     0
	    /zones/test/disk1  ONLINE       0     0     0
	    /zones/test/disk3  ONLINE       0     0     0
	  mirror-1             ONLINE       0     0     0
	    /zones/test/disk0  ONLINE       0     0     0
	    /zones/test/disk2  ONLINE       0     0     0

errors: No known data errors

[root@gimmick  ~]#

Hope that helps
Regards
Peasant.
# 5  
Old 06-16-2018
Going through your example, can I run below commands online, without interruption ?
PHP Code:
zpool attach zones c1t9d0 c1t4d0
zpool attach zones c1t10d0 c1t6d0 
# 6  
Old 06-16-2018
Yes.

Only thing that you should notice is increased read / write until resilvering is done.

Regards
Peasant.
The Following User Says Thank You to Peasant For This Useful Post:
solaris_1977 (06-17-2018)
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Replace zpool with another disk rrodgers Solaris 2 11-10-2017 05:29 PM
LVM: is possible to replace a disk? Linusolaradm1 HP-UX 6 02-11-2014 09:36 AM
Ubunutu 8.04.4 RAID 1 mirror replace disk jld Ubuntu 0 09-04-2011 10:14 AM
Cannot remove and replace failed disk LittleLebowski Solaris 3 06-22-2011 05:38 PM
Replace Disk jgt SCO 3 09-22-2010 03:00 PM
How to replace failed disk? suneelieg Solaris 9 12-23-2009 02:50 PM
how to replace disk in solaris 10? netxjman Solaris 2 10-23-2008 11:59 AM
Problem replace disk with RAID-5 volumes bonovox Filesystems, Disks and Memory 0 05-26-2008 10:02 AM
trying to replace a disk, that's all... mr.moralito UNIX for Dummies Questions & Answers 4 11-16-2006 04:03 PM
Replace a Failed Root Disk in AIX chinnu_mulakala AIX 1 08-14-2006 03:06 PM


All times are GMT -4. The time now is 10:02 AM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password