5

I'm running Windows Server 2008 R2 and converted physical disks to dynamic disks and combined them to a spanned volume. Yesterday, one disk started throwing S.M.A.R.T Errors, so I decided to get a new disk to replace it.

Now, I installed it to my system, converted it to a dynamic disk and made it part of the spanned volume. My Question is: How can I remove the old disk from the spanned volume, without losing data?

Kuckucksei
  • 53
  • 1
  • 1
  • 3
  • 2
    I hate to say it but this would have been a great time to ask what a spanned volume did *before* configuring the new disk as part of one. – Rob Moir Mar 23 '11 at 11:48
  • You mean, if the disk just fails from one to another second? I'd then say, all data on that disk is lost. You have to add a new disk to the spanned volume and restore the backup. I never tested it, but that would be my scenario in that case. – Kuckucksei Mar 23 '11 at 12:43
  • 1
    Seriously, you need to stop and go and read up on what a spanned volume is. You clearly didn't understand it when you chose that option and you clearly don't understand it now. A spanned volume is a partition that has been "stretched" across two disks. If either one of those disks fails then ALL data on the partition, that is data from the spanned volume regardless of what disk they are on, is lost... – Rob Moir Mar 23 '11 at 13:53
  • ... When you chose to add the new disk as a spanned volume, you chose a disk configuration that is a) incompatible with your goals, and b) irreversible without backing the data up, deleting the partition, re-creating it using just one disk, and restoring a backup – Rob Moir Mar 23 '11 at 13:53
  • Ah OK... I never experienced a disk failure. So I can't say what would happen. It's a file server with network shares, and I back it up twice a day to a storage. I feel pretty comfortable with that. – Kuckucksei Mar 23 '11 at 14:03
  • With your comment in mind (data stretched across the disks). The process: "safely remove a disk from a spanning volume" becomes a lot more complicated. – Kuckucksei Mar 23 '11 at 14:11
  • 4
    There is nothing safe about a spanned volume. You use it because you're desperate to extend space on a disk any way you possibly can and to hell with the consequences (or you're doing something **very** clever with hardware RAID and even then I'd frankly still be reluctant), not because its a great idea. – Rob Moir Mar 23 '11 at 14:18
  • 2
    I think the problem here is a fundamental misunderstanding of how a spanned volume works. When you span volumes in Windows, you're simply combining hard drives' space to make one big storage area. Bits A, B, and C are on HD1, and bits D, E, and F are on HD2. If you remove HD1, then bits A-C are simply gone. There is no redundancy built in, and HD2 has no way to magically recognize that you're missing bits A-C. – Hyppy Mar 23 '11 at 14:38
  • I do it because it's a bit easier to manage. It appears as just one partition, and it doesn't care about disk sizes, it just uses all available space of the installed disks... It's an old server with old (archived) data. Unlike my Boss, I personally think it would be even enough to back it up once a week. – Kuckucksei Mar 23 '11 at 14:47
  • Sorry Kuckucksei, I couldn't come back to you until now. The issue here is that you've spread your data across disks, losing one disk in this configuration kills ALL your data, this is a bad, bad thing and no sysadmin would ever do this, ever. The main reason is that it exponentially increases the risk of data loss for every added disk but another very valid reason is the one you're facing - replacing failing disks means a full data move/backup, move-back/restore cycle. I hope this helps. – Chopper3 Mar 23 '11 at 14:49
  • Firstly: It's worth noting that a Spanned array is NOT Raid 0, and has nowhere near the same risks. It is simply a way of making multiple drives / partitions show as one drive. I use spanned drives all the time on VMs that have increasing disk demands. I create a single 1TB disk on a SAN and attach it to the server. As space requirements increase, I create a new disk and attach that and span the two, and so on. However, the lack of an "elegant" way to remove a disk from this span is frustrating. You do have to defrag, shrink and remove the last disk only... – Robin Day Jan 18 '15 at 21:24

3 Answers3

7

So it's just a plain old spanned, non-RAID-protected, volume right?

If, well you'll have to backup the entire volume, replace the disk, rebuild a blank new spanned volume and restore your data.

Essentially you have no easy way to do this, consider using some from RAID other than spanning's effectively R0 setup.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • I could restore the latest backup, but it's not really elegant. I mean the process for safely removing a disk can't be very complicated. It has just to move all files from the old disk to the other disks in the volume... – Kuckucksei Mar 23 '11 at 12:37
  • 1
    What's not elegant? Restoring the latest backup? Why does it need to be elegant? I don't expect my backups and restores to be elegant, but I do expect them to work and I test them to verify that they do. – joeqwerty Mar 23 '11 at 12:54
  • I just thought there is an elegant way to do it. Because the process doesn't seem to be complicated. Don't get me wrong: It's OK for me to just restore the backup. – Kuckucksei Mar 23 '11 at 13:05
  • Using the backups is the elegant solution. Why would you want to risk corrupt data from a disk that is failing? – JamesRyan Apr 24 '14 at 11:06
5

I've tested this on Windows Server 2012 R2. I had a 3TB spanned volume over three 1TB disks.

I just shrinked the 3TB spanned volume to 2TB in Disk management. This made all the space on the last disk unallocated. After this I was able to remove the disk without losing any data.

Unfortunately this solution will not work if you want to remove the first disk from the spanned volume.

RoelVB
  • 151
  • 1
  • 2
4

Actually, for those interested in an answer besides "don't": I found this: http://richardbenson.co.uk/2008/10/removing-a-drive-from-a-spanne/

This seems to be the general method:

  • Make sure there is enough free space to be able to remove one of the disks.
  • Defrag the disk using jkdefrag to move all data to the start of the volume.
  • Remove any crap that the defragging didn't, manually.
  • Use the disk manager to "shrink" the spanned volume.
  • Rebuild the partition table on the disk that has been shrunk out.
noio
  • 141
  • 2