Jump to content

Unraid - replacing disk

Go to solution Solved by mechanicalfluff,
On 6/2/2017 at 8:19 AM, porina said:

Coincidentally I was looking at similar yesterday. I did come up with some command line stuff to move files from one drive to another through a search but I'm not sure if I can find it again quickly.

 

If you can run without redundancy for some time, you can simply remove the old drive, put in the new and let it rebuild data on the new. You still have the failing drive as a backup in case it does go wrong.

 

I assume you're already aware, but the parity drive(s) must be same or bigger than data drives. This could end up being a complicated multi-disk shuffle depending on what you already have in there. I kinda got around it in my build by using only one size drive (3TB as best capacity per cost at time), and two parity disks so if I ever need to do something it gives an extra layer of redundancy.

Got it to work - used MC - it's super easy. 

Just ssh in or directly manipulate it.

 

For example, this was my process:

Once in MC (for others looking to do this, just type mc and it'll bring up the 'gui')

Go to mnt/ disk 1 on the left, mnt/ disk3 on the right

From there it'll list your shares on both sides - 

 

Click on a share name on the left (disk1) and click copy on the bottom. If there is already duplicated data on disk 3, it will ask you if you want to overwrite, there is an additional option so you can overwrite only if disk1 has a larger file. Particularly helpful with my steam library.

 

After going through all your shares copying them over and overwriting if necessary, spin down the drives and power off.

Remove the drive(s) that you don't want anymore.

Start up the system again, it'll show missing disks. 

Go to tools, new config - agree and apply. 

Go back to Main, re-assign the drives you want to use - start array. 

Worked immediately :)

 

Finally done building my media server, but one of my old drives that I stuck in there is throwing errors.

 

Is there a way to remove the contents of the drive to a new, larger drive? (Set up in shares, high water.)

 

Basically want to go from disk 1 to disk 3. Maybe a plugin that prepares a drive to be removed?

 

Failing drive is 2tb, new drive is 8tb - Btrfs

 

Later, once those cheap usb 8tb enclosures goes on sale again, i'll get another for another 8tb parity.

 

I don't have any important information. Just a RIDICULOUS amount of it :P too much to just start over with.

From what I've searched, I found a TON of information from unraid 5, but nothing really from 6. I'm fine with cmd line, but I just don't want to risk overwriting what I already have on disk3 or leaving the 'contents' of disk 1 inaccessible.

Link to comment
Share on other sites

Link to post
Share on other sites

Coincidentally I was looking at similar yesterday. I did come up with some command line stuff to move files from one drive to another through a search but I'm not sure if I can find it again quickly.

 

If you can run without redundancy for some time, you can simply remove the old drive, put in the new and let it rebuild data on the new. You still have the failing drive as a backup in case it does go wrong.

 

I assume you're already aware, but the parity drive(s) must be same or bigger than data drives. This could end up being a complicated multi-disk shuffle depending on what you already have in there. I kinda got around it in my build by using only one size drive (3TB as best capacity per cost at time), and two parity disks so if I ever need to do something it gives an extra layer of redundancy.

Main system: i9-7980XE, Asus X299 TUF mark 2, Noctua D15, Corsair Vengeance Pro 3200 3x 16GB 2R, RTX 3070, NZXT E850, GameMax Abyss, Samsung 980 Pro 2TB, Acer Predator XB241YU 24" 1440p 144Hz G-Sync + HP LP2475w 24" 1200p 60Hz wide gamut
Gaming laptop: Lenovo Legion 5, 5800H, RTX 3070, Kingston DDR4 3200C22 2x16GB 2Rx8, Kingston Fury Renegade 1TB + Crucial P1 1TB SSD, 165 Hz IPS 1080p G-Sync Compatible

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, porina said:

Coincidentally I was looking at similar yesterday. I did come up with some command line stuff to move files from one drive to another through a search but I'm not sure if I can find it again quickly.

 

If you can run without redundancy for some time, you can simply remove the old drive, put in the new and let it rebuild data on the new. You still have the failing drive as a backup in case it does go wrong.

 

I assume you're already aware, but the parity drive(s) must be same or bigger than data drives. This could end up being a complicated multi-disk shuffle depending on what you already have in there. I kinda got around it in my build by using only one size drive (3TB as best capacity per cost at time), and two parity disks so if I ever need to do something it gives an extra layer of redundancy.

 

My old set up (before the new 8tb drive) was 4- 2tb drives - all have data written to them. I used the 8tb as an additional storage measure. Currently it's 2-2-2-2-8 no parity.

Right now I'm looking to go to 2-2-2-8, then, as i get my hands on drives, (and if i can get transferring figured out to begin with) end with 8-8/8-8 in parity.

 

What it looks like is maybe i'll have to hold out on the error-ing drive until I get 2 more 8tb drives and immediately put it in parity to preserve the data and pull out all 4- 2tb drives.

 

Small world that you're doing the same thing :P  if you're looking for other drives I got a seagate usb backup drive to harvest the 8tb drive from it - was only 179 on amazon, couldn't beat it.

Link to comment
Share on other sites

Link to post
Share on other sites

"ddrescue" can be used to copy one drive to another, including every single bit on the device, such as the partition table. ddrescue is a variant of dd that is designed for cloning potentially damaged drives/filesystems. But be careful - I don't know what "dd" actually stands for, but it is colloquially known as "data destroyer". It will happily do exactly what you tell it to do - meaning that if you put the wrong destination (output) device, it will start writing data on that device without any further confirmation.

 

I recommend this procedure:

-get a Live CD ISO, like Ubuntu, and make a bootable USB drive, or burn to a disc (a Live CD or Live DVD means that it isn't just used for installing, you can actually boot directly off of it)

-turn off your computer and unplug every drive except the source (failing 2TB) and destination (8TB). Boot from the prepared media.

-open a terminal and use gparted, fdisk, lsblk, whatever you need to in order to determine which device (e.g. /dev/sdb) is the 2TB drive and which is the 8TB. It should be easy due to the size difference. CAREFULLY WRITE THESE DOWN

-Follow the ddrescue instructions (not the dd ones) at this page: https://wiki.archlinux.org/index.php/Disk_cloning replacing sdX with the source (input) disk and the sdY with the destination (output). I am not responsible if you swap these and erase your 2TB drive. Input first then output.

-You can now shut down the Live CD (do a proper shutdown from the terminal or GUI, in case there is any data cached in memory that needs to be flushed) and disconnect the 2TB drive. If you leave both drives connected at the same time, there will be a conflict because they now will have the same IDs which are supposed to be unique (they will still have different serial numbers, but the dd will bring over all the filesystem headers exactly). You can now reconnect the other 2TB drives and boot up the system. It should recognize the 8TB drive as being exactly the same as the old 2TB drive. 

-once you are certain that the 8TB drive has all the data from the 2TB drive, and is accepted by your system without issue, you can start thinking about expanding it to use the remaining space. Do not try to do anything to the partition table, like try to expand partitions using gparted or other tools, until you know it is working.

-if the 8TB drive is not accepted as an exact copy of the 2TB drive, we will need to know mor einformation. You will still be able to shut down the system, and swap the 8TB drive with the dying 2TB drive, and boot back up to be exactly where you were at the start.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 6/2/2017 at 8:19 AM, porina said:

Coincidentally I was looking at similar yesterday. I did come up with some command line stuff to move files from one drive to another through a search but I'm not sure if I can find it again quickly.

 

If you can run without redundancy for some time, you can simply remove the old drive, put in the new and let it rebuild data on the new. You still have the failing drive as a backup in case it does go wrong.

 

I assume you're already aware, but the parity drive(s) must be same or bigger than data drives. This could end up being a complicated multi-disk shuffle depending on what you already have in there. I kinda got around it in my build by using only one size drive (3TB as best capacity per cost at time), and two parity disks so if I ever need to do something it gives an extra layer of redundancy.

Got it to work - used MC - it's super easy. 

Just ssh in or directly manipulate it.

 

For example, this was my process:

Once in MC (for others looking to do this, just type mc and it'll bring up the 'gui')

Go to mnt/ disk 1 on the left, mnt/ disk3 on the right

From there it'll list your shares on both sides - 

 

Click on a share name on the left (disk1) and click copy on the bottom. If there is already duplicated data on disk 3, it will ask you if you want to overwrite, there is an additional option so you can overwrite only if disk1 has a larger file. Particularly helpful with my steam library.

 

After going through all your shares copying them over and overwriting if necessary, spin down the drives and power off.

Remove the drive(s) that you don't want anymore.

Start up the system again, it'll show missing disks. 

Go to tools, new config - agree and apply. 

Go back to Main, re-assign the drives you want to use - start array. 

Worked immediately :)

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×