VMware Cloud Community
VMwareESXi35
Contributor
Contributor
Jump to solution

Help to move my datastore on external USB drive in order to reformat with correct block size

Hi,

I am using a Dell PowerEdge 2650 with a 550 GB disk array configured in RAID 5 with ESX 3.5i

When I installed ESX I did not pay attention to the block size. It is the default 1 MB and so I have reached the maximum extends. Which means I can only avail 260 GB of my 550 GB.

I need to change the parameter to a block size of 4 MB in order to access the entire array.

But in order to do this I need to move my existing datastore which contains a lot of important files for me.

I do not have any server currenty with 260/300 GB of free space.

I am trying the following:

1. plug in a USB External Drive. I have ssh up and running but I am having difficulties mounting it. I have searched for info but I am still struggling.

2. if possible I would like to compress via gzip the large disks in my datastore before moving it. Can you advise on the location of the files in the system and if it is possible to do?

Thanks

chris

0 Kudos
1 Solution

Accepted Solutions
arturka
Expert
Expert
Jump to solution

it's clear now,

in that case if your VM has 250GB single VMDK file you have buy harddrive big enough to copy there whole virtual machine configuration, do not zip it or compress it, you can screw whole data on drive

i have one idea, depends how much data you have on your virtual hard drive you can use VMware converter 4.0.1 and clone your VM with thin provision disks, Vmware converter will "zipp" your VMDK file to exact size of your data without risk that you would lost all your data.

1. use vmware converter to clone your VM with thin provisioned disks

2. down source VM

3. start "new" VM and check if it works well

4. if 4 is OK, stop "new" VM

5. copy new VM to your USB drive (attach USB drive you your workstation and you winscp to copy virtual machine

6. remove VMFS datastore

7. create new VMFS datastore

8. upload VM to new datastore

9. create new VM based on VMDK file

10. start VM

cheers

visit my blog

www.vmwaremine.com

if my answer it's useful click some stars Smiley Happy

VCDX77 My blog - http://vmwaremine.com

View solution in original post

0 Kudos
14 Replies
a_p_
Leadership
Leadership
Jump to solution

Which means I can only avail 260 GB of my 550 GB

Not exactly, you can use the whole 550 GB of the datastore, only the size of a single vmdk files is limited to 256 GB - 512 Bytes (or 254 GB if you want to be able to create snapshots)

If you need to export the VM's to an USB drive, I recommend to attach the USB HDD to your Windows client and use WinSCP or Veeam's FastSCP to download the VMs from the datastore. Another option is to open the datastore browser and download the files/folders from the GUI.

Make sure you are connected to the ESX host with GBit , otherwise this will take some time.

André

Narkis
Enthusiast
Enthusiast
Jump to solution

Please don't gzip your VMDK file, it may lead to VMDK file crash. Best thing add USB drive on your VC and browse datastore then to import/export VMDK. Cheers!

VMwareESXi35
Contributor
Contributor
Jump to solution

I have the USB drive mounted and ready to go now.

Problem is I have no disk bigger than 250 GB available to me. And I have to move 260 GB....

So I was planning to do a tar/gzip or cpio of the content of the datastore on the USB Drive.

Also, thanks for Andre for his feedback.

just one question if I create another disk in the datastore with the remaining space 550 GB - 260 GB, what does that do for me? Like adding a new disk to the Guest OS?

chris

0 Kudos
arturka
Expert
Expert
Jump to solution

hi

Also, thanks for Andre for his feedback.

just one question if I create another disk in the datastore with the remaining space 550 GB - 260 GB, what does that do for me? Like adding a new disk to the Guest OS?

depend what you wanna do, if you change your VMFS block size to 8MB (change block size to max it will save you a lot of problems in the future) then you can either extend current VMDK file to size which you need or you can create new VMDK file and add to virtual machine (in this case you don't have to change block size on your VMFS datastore)

visit my blog

www.vmwaremine.com

if my answer it's useful click some stars Smiley Happy

VCDX77 My blog - http://vmwaremine.com
0 Kudos
VMwareESXi35
Contributor
Contributor
Jump to solution

Arturka,

Are you sure you don't loose all the vmdk if you change the block size? I recall it did say something hence having to move the datastore temporary.

Cheers

chris

0 Kudos
arturka
Expert
Expert
Jump to solution

hi Chris,

so,

1. first you have to copy (make a backup) all Virtual machines from datastore which you wanna change block size

2. delete VMFS datastore

3. create new datastore with new block size

4. restore/copy VM's back to new datastore

visit my blog

www.vmwaremine.com

if my answer it's useful click some stars Smiley Happy

VCDX77 My blog - http://vmwaremine.com
0 Kudos
VMwareESXi35
Contributor
Contributor
Jump to solution

my problem is the step 1 arturka.

I cannot manage to get this done easily.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

just one question if I create another disk in the datastore with the remaining space 550 GB - 260 GB, what does that do for me? Like adding a new disk to the Guest OS?

You could either use it to add another virtual disk to a VM or create another VM.

André

0 Kudos
arturka
Expert
Expert
Jump to solution

write me how your VM is configured, how many disks it has, how big are disks, do you have other VMFS datastores where you can backup VM ?

visit my blog

www.vmwaremine.com

if my answer it's useful click some stars Smiley Happy

VCDX77 My blog - http://vmwaremine.com
0 Kudos
VMwareESXi35
Contributor
Contributor
Jump to solution

That's screenshot of the current datastore.

fdisk -l show the external USB Drive now but I am not able to either mount it or select in order to create a new datastore so that I can move my files across:

~ # fdisk -l

Disk /dev/disks/vmhba1:0:0:0: 587.1 GB, 587195482112 bytes

64 heads, 32 sectors/track, 559993 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System

/dev/disks/vmhba1:0:0:1 5 750 763904 5 Extended

/dev/disks/vmhba1:0:0:2 751 4845 4193280 6 FAT16

/dev/disks/vmhba1:0:0:3 4846 559994 568471808 fb VMFS

/dev/disks/vmhba1:0:0:4 * 1 4 4080 4 FAT16 <32M

/dev/disks/vmhba1:0:0:5 5 52 49136 6 FAT16

/dev/disks/vmhba1:0:0:6 53 100 49136 6 FAT16

/dev/disks/vmhba1:0:0:7 101 210 112624 fc VMKcore

/dev/disks/vmhba1:0:0:8 211 750 552944 6 FAT16

Partition table entries are not in disk order

Disk /dev/disks/vmhba32:0:0:0: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/disks/vmhba32:0:0:1 1 30401 244196001 83 Linux

0 Kudos
arturka
Expert
Expert
Jump to solution

i see that your VMFS has currently 542GB and 291GB free

now show mw virtual machine disk configuration and write me what is an operating system, please

visit my blog

www.vmwaremine.com

if my answer it's useful click some stars Smiley Happy

VCDX77 My blog - http://vmwaremine.com
0 Kudos
VMwareESXi35
Contributor
Contributor
Jump to solution

In theory yes there is 290 GB free BUT as the original block size was set to 1 MB and there is hard coded limit of 256 Max Extend, I can only avail 256 GB.

This is my issue. I should have formatted with a large Block size to avail the entire 550 GB on the Raid 5 system

So before going to the storage advance properties to change this block size, I need to copy my vmdk files somewhere else.

but I don't have 260 GB available anywhere. only 230 GB on an external hard drive.

You can see this hard drive liste by fdisk:

Disk /dev/disks/vmhba32:0:0:0: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/disks/vmhba32:0:0:1 1 30401 244196001 83 Linux

I cannot make the mount to work so that I can copy my files into it. Lack of knowledge of ESX Environment righ

0 Kudos
arturka
Expert
Expert
Jump to solution

it's clear now,

in that case if your VM has 250GB single VMDK file you have buy harddrive big enough to copy there whole virtual machine configuration, do not zip it or compress it, you can screw whole data on drive

i have one idea, depends how much data you have on your virtual hard drive you can use VMware converter 4.0.1 and clone your VM with thin provision disks, Vmware converter will "zipp" your VMDK file to exact size of your data without risk that you would lost all your data.

1. use vmware converter to clone your VM with thin provisioned disks

2. down source VM

3. start "new" VM and check if it works well

4. if 4 is OK, stop "new" VM

5. copy new VM to your USB drive (attach USB drive you your workstation and you winscp to copy virtual machine

6. remove VMFS datastore

7. create new VMFS datastore

8. upload VM to new datastore

9. create new VM based on VMDK file

10. start VM

cheers

visit my blog

www.vmwaremine.com

if my answer it's useful click some stars Smiley Happy

VCDX77 My blog - http://vmwaremine.com
0 Kudos
VMwareESXi35
Contributor
Contributor
Jump to solution

Finally the easiest (in terms of time for me this week, but not what I would have liked) was:

1. start Guest OS, login and split data in two folders.

2. bring two external USB on two workstations, shared them to make them available to Guest OS

3. move all data on the two external drive overnight

then, very much like you said Arturka, the Converter is a Great Tool to restructure disk/partition sizes.

4. converted into an ESX 4.0 server by minimizing disk requirement

5. delete datastore on the ESX 3.5

6. recreate a datastore !!! Well my friends it sounds like easy but if one uses the default options one can end up in the loop of hell like me poor sod by reinstalling ESX still having the bloody 1MB block size, or when deleting and trying to create with a different block size...I got the error "failed to update disk partion...." blahblha..search for this error and there is plenty of threads.

Answer is: when creating the new datastore DO NOT tick the option to maximise space !!! It might scream a little bit, you might loose a little bit of MB BUT it works.

7. I am now reconvertering the other way around from 4.0 to the 3.5 ....I will recopy the data from external drives later

Thanks to all answers/help

Useful learning curve I supose/expect.

Chris

0 Kudos