LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cloning a hard drive using LabVIEW

Solved!
Go to solution

I am trying to clone my 476 GB laptop HDD to a 450 GB SSD.  The data on the laptop HDD is about 350 GB in total, so there should be room.  Every commercial app I have tried has failed to clone for one reason or another.

 

So I thought, "Hey, I have a development environment, I shall make my own cloning software in LabVIEW!"  I appreciate that copying data sector by sector is extremely low-level but is there any way to do this in LabVIEW?  My search drew a blank.

 

Thanks

 

Malcolm

Certified LabVIEW Architect and LabVIEW Champion specialising in Noise, Vibration and Harshness
0 Kudos
Message 1 of 12
(3,971 Views)

If the pros fail, I doubt there's anything you can do in LV which will work. Note that the fact there is room isn't necessarily relevant when cloning. I think you need to start by shrinking the existing volume and then you can clone it once it's smaller. I believe at least some of the cloning programs can do the analysis and clone from a larger drive with less data to a smaller drive. I know I did this recently, although I don't remember what I did exactly.


___________________
Try to take over the world!
Message 2 of 12
(3,944 Views)

Do you actually need to clone it?

 

Why not do a straight copy of files from one to the other.  It's been awhile since I've run DOS commands, but XCOPY still exists and works, doesn't it?

0 Kudos
Message 3 of 12
(3,929 Views)

@RavensFan wrote:

It's been awhile since I've run DOS commands, but XCOPY still exists and works, doesn't it?


It does and is part of Windows, but I prefer robocopy.  It has a lot more options like retry options for inconsistent networks, ignore new files, or ignore files that exist but are different, mirror trees, and more.

 

That being said if you need to clone drives LabVIEW really isn't the right tool.  You say you've tried other applications and had issues, what have you tried?  In the past I've used several non-free tools like Acronis which work very well.  DriveImage XML is free but I don't think you can restore a drive that is smaller.  The fall back for me has always been Ghost 8.  Very old but it is a single EXE that just works without requiring a license.  But doesn't Windows come with backup utilities now?  Or is that just for the OS?

Message 4 of 12
(3,921 Views)
Solution
Accepted by topic author Malcolm_Myers

Yeah, unfortunately you've got almost 0 chance of being able to do this using LabVIEW (except by trying to hook into an application that does it) as LabVIEW is a high-level language too high - all file system operations go through and get managed by the OS.

 

As others have said, you normally need to shrink the partition first before you can move the disk - many of the better cloning tools can do this for you. Unfortunately I can't remember the name of the tool I used to do it on my work laptop but I've definitely heard of the Acronis software before. Doing a file copy within the OS won't work because it won't copy things like the boot sector information.

 

There are also some caveats/pitfalls around moving from a HDD to an SSD (mostly around things like sector sizes) - it's worth having a read around this before you start.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 5 of 12
(3,912 Views)

I mean... you could use LabVIEW like any other language and make calls to the Windows API.  I personally hate doing that in LabVIEW and avoid it when possible, but that is personal preference.

Message 6 of 12
(3,886 Views)

Most SSDs and even HDD manufacturers offer a migration tool to move your current bootable hard drive to their new drive.

 

I upgraded my laptop to a Samsung 850 Pro SSD with almost no effort using a download from their site. In my case:

 

http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/whitepaper/whitepaper1...

 

The only thing I needed was a SATA to USB adapter in order to connect the new drive to the system to be upgraded.

 

I bought a SATA-USB enclosure and after migrating the HDD, installed the SSD in the laptop, then reformatted the HDD as a portable drive.

 

http://www.amazon.com/gp/product/B00FCLG65U?psc=1&redirect=true&ref_=oh_aui_detailpage_o08_s00

 

Check your SSD manufacturer's web site for a migration tool.

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 7 of 12
(3,861 Views)

@PhillipBrooks wrote:

Most SSDs and even HDD manufacturers offer a migration tool to move your current bootable hard drive to their new drive.

 

I upgraded my laptop to a Samsung 850 Pro SSD with almost no effort using a download from their site. In my case:

 

http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/whitepaper/whitepaper1...

 

The only thing I needed was a SATA to USB adapter in order to connect the new drive to the system to be upgraded.

 

I bought a SATA-USB enclosure and after migrating the HDD, installed the SSD in the laptop, then reformatted the HDD as a portable drive.

 

http://www.amazon.com/gp/product/B00FCLG65U?psc=1&redirect=true&ref_=oh_aui_detailpage_o08_s00

 

Check your SSD manufacturer's web site for a migration tool.

 


I'm curious - why couldn't you just stick the SSD on the SATA bus directly?

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 12
(3,814 Views)

@billko wrote:

@PhillipBrooks wrote:

Most SSDs and even HDD manufacturers offer a migration tool to move your current bootable hard drive to their new drive.

 

I upgraded my laptop to a Samsung 850 Pro SSD with almost no effort using a download from their site. In my case:

 

http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/whitepaper/whitepaper1...

 

The only thing I needed was a SATA to USB adapter in order to connect the new drive to the system to be upgraded.

 

I bought a SATA-USB enclosure and after migrating the HDD, installed the SSD in the laptop, then reformatted the HDD as a portable drive.

 

http://www.amazon.com/gp/product/B00FCLG65U?psc=1&redirect=true&ref_=oh_aui_detailpage_o08_s00

 

Check your SSD manufacturer's web site for a migration tool.

 


I'm curious - why couldn't you just stick the SSD on the SATA bus directly?

 


My and the OPs computers are laptops. I don't have an e-sata port on mine.


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 9 of 12
(3,790 Views)

@PhillipBrooks wrote:

@billko wrote:

@PhillipBrooks wrote:

Most SSDs and even HDD manufacturers offer a migration tool to move your current bootable hard drive to their new drive.

 

I upgraded my laptop to a Samsung 850 Pro SSD with almost no effort using a download from their site. In my case:

 

http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/whitepaper/whitepaper1...

 

The only thing I needed was a SATA to USB adapter in order to connect the new drive to the system to be upgraded.

 

I bought a SATA-USB enclosure and after migrating the HDD, installed the SSD in the laptop, then reformatted the HDD as a portable drive.

 

http://www.amazon.com/gp/product/B00FCLG65U?psc=1&redirect=true&ref_=oh_aui_detailpage_o08_s00

 

Check your SSD manufacturer's web site for a migration tool.

 


I'm curious - why couldn't you just stick the SSD on the SATA bus directly?

 


My and the OPs computers are laptops. I don't have an e-sata port on mine.


I guess what threw me is that you said you then installed it into your computer.  Now I see that you uninstalled your other one and put it in an external drive enclosure.  Makes complete sense now!  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 12
(3,771 Views)