How to change mirror setting and remove 1 HDD drive

Status
Not open for further replies.

ukjeyaraj

Dabbler
Joined
Apr 18, 2012
Messages
10
Hi All,

I have configured 2 1TB HDD with RAID1 and mirror. Attached the storage setting image here

hddconfig.png


I am going to make some changes in the freenas box. I would like to remove one of this HDD. How to do this without loosing data. I want to continue accessing the data from the remaining 1TB HDD of freenas.

Pliz help.
 

StephenFry

Contributor
Joined
Apr 9, 2012
Messages
171
Since it's a mirror, you could offline the drive and your data should still be available.
(zpool offline king_media ada0)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
You can also do that from the GUI by going to Storage->Volumes->View Volumes and click on the "Volume Status" Icon next to your pool, and then clicking the Offline icon next to one of your disks.
 

ukjeyaraj

Dabbler
Joined
Apr 18, 2012
Messages
10
Thanks for the response. I am at office. After reaching home, I will try and then give the result here.
 

ukjeyaraj

Dabbler
Joined
Apr 18, 2012
Messages
10
There is no volume status in GUI. But I could do what I want through command zpool offline.

I did check after rebooting the box and found the data intact and accessible. Thanks for the help.
 

ukjeyaraj

Dabbler
Joined
Apr 18, 2012
Messages
10
I am trying to detach one of the disks from mirror, using the same command(zpool offline <entertainment ada1> which i used earlier as mentioned in earlier posts of this thread. However it does not work now. It fails with an error message "cannot offline ada1 no such device in pool". I am attaching screen shots of the volume so that it will be easy to guide me with suitable method to remove one disk from the mirror.

13222503.png


13222511.png
 

ukjeyaraj

Dabbler
Joined
Apr 18, 2012
Messages
10
Now I could do it. I changed the command from #zpool offline entertainment ada1 to #zpool offline entertainment ada1p2. This did it. Now I want to remove the disk which war originally ada1 and connect it to another linux box where I have enough storage to copy the contents into the hard disk of the Linux Box. This linux box runs on RHEL 5.4. Will RHEL 5.4 detect this hdd and mount it by default? If not, how to mount the data so that I can copy it to local HDD.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Now I could do it. I changed the command from #zpool offline entertainment ada1 to #zpool offline entertainment ada1p2. This did it. Now I want to remove the disk which war originally ada1 and connect it to another linux box where I have enough storage to copy the contents into the hard disk of the Linux Box. This linux box runs on RHEL 5.4. Will RHEL 5.4 detect this hdd and mount it by default? If not, how to mount the data so that I can copy it to local HDD.

ZFS on Linux is kinda sorta stable. It may or may not import your FreeNAS zpool but will require you to properly install the ZFS on Linux project. Your question is beyond the scope of this forum and is likely better answered in a Red Hat forum.
 

ukjeyaraj

Dabbler
Joined
Apr 18, 2012
Messages
10
Thanks for the response. I will look around for solution.

To give the exact picture. My DIY NAS box started crashing frequently in last 2 weeks. I dont have enough storage at home to copy the contents from my NAS Box. I remove one of the mirror disk and took it to office so that I can backup the content. That is the reason why I want to mount it in a Linux Box.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403

Arun Kumar

Cadet
Joined
Oct 24, 2017
Messages
9
Code:
root@freenas:~ # zpool status
  pool: dev_vol_01
 state: ONLINE
  scan: none requested
config:

		NAME											STATE	 READ WRITE CKSUM
		dev_vol_01									  ONLINE	   0	 0	 0
		  mirror-0									  ONLINE	   0	 0	 0
			gptid/23a620e1-bed6-11e7-b705-080027c50e90  ONLINE	   0	 0	 0
			gptid/2492525a-bed6-11e7-b705-080027c50e90  ONLINE	   0	 0	 0


In my case listing device like below worked , was getting error while mention device directly ( like /dev/ada1p2)

Code:
zpool detach dev_vol_01 /dev/gptid/23a620e1-bed6-11e7-b705-080027c50e90
 
Status
Not open for further replies.
Top