0

I have 2 VHDs which are members of a RAID-0 to create a 3 TB volume. We deleted a lot of the data from this RAID and I need to free up some space the VHDs are taking, about 1.5 TB. I tried using the Hyper-V manager to resize them but it won't give me any option to do this.

This is how the system is setup.

  • Server 2008 R2
  • 1.5TB each VHD
  • Both VHD are raid 0 to make 3TB
  • Fixed VHD's

I tried almost everything to shrink this VHDs. There is no space on Hyper-V to create new VHD to transfer the files.

UPDATE:

  • I try using Hyper v to edit disk which didnt work. Then try to compac the disk which again didnt work.
  • I also shrink disk within the server but that didnt made any difference.
  • I also try vhd resizer program but that did shrink the vhd but when you login to system you see same size.
Daniel
  • 6,940
  • 6
  • 33
  • 64
maj
  • 5
  • 1
  • 8
  • What did you try? – Daniel Jan 26 '16 at 14:31
  • The main problem that causes your particular issue is that you created a RAID-0 with your VHD file. You don't do that. Instead, you create a RAID with the underlying physical disks. – Daniel Jan 26 '16 at 15:55
  • What kind of data is on that VHD? Operating System? Simple files? – Daniel Jan 26 '16 at 15:56
  • no OS just data, including SQL Database – maj Jan 27 '16 at 06:40
  • The reason we do Raid 0 for these VHD is that max VHD file size is 2TB where we needed 3TB – maj Jan 27 '16 at 06:41
  • Sorry, my bad. I wasn't aware of the limitations. – Daniel Jan 27 '16 at 07:19
  • 1
    Well, there is no limitation. SQL Server can split a database into multiple files - and then you can put them onto multiple discs WITHOUT doing a Raid 0 on the VHD level. – TomTom Jan 27 '16 at 07:35
  • The problem was not having a mutiple disk it was the space. orginally the disk was used for data but then we install database. sql database is not that big its other files which are around 1.2 TB now – maj Jan 27 '16 at 08:18

1 Answers1

1

As far as I know you cannot safely separate the member-disks of a RAID. So your only chance will be to transfer the files to an external disk to achieve your goal.

  1. Attach an external drive. (If none present, buy one. It's definitely cheaper than the pain trying to restore the database from a backup).
  2. Stop the SQL service.
  3. Move the database on the external drive.
  4. Delete both VHDs.
  5. Create a new VHD with 1.5 TB in size (Expanding is always easier than shrinking).
  6. Move the database back on the disk.
  7. Start the SQL service.
Daniel
  • 6,940
  • 6
  • 33
  • 64
  • I through it will be this case. I through they might be other option where I dont have to transfer files to external disk. Thank you for your help – maj Jan 27 '16 at 08:14