Jump to content











Photo
* * * * * 4 votes

CloneDisk


  • Please log in to reply
595 replies to this topic

#276 rocketero

rocketero

    Frequent Member

  • Advanced user
  • 155 posts
  •  
    United States

Posted 23 January 2011 - 11:15 PM

I keep receiving the window message:

Lock and/or Dismount Failed!! Abort ??

Yes / No

I replay yes and kaput terminate,
I replay No and starts backup.

Any reason for that window ?

#277 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 24 January 2011 - 07:19 AM

I keep receiving the window message:

Lock and/or Dismount Failed!! Abort ??

Yes / No

I replay yes and kaput terminate,
I replay No and starts backup.

Any reason for that window ?


Means clonedidks did not manage to lock the device, probably because another process with a higher privilege already locked it.
You can still perform your backup but you cannot guarantee that the other process will not modify your source during backuping this maybe leading to potential image inconsistencies.

Regards,
Erwan.

#278 rocketero

rocketero

    Frequent Member

  • Advanced user
  • 155 posts
  •  
    United States

Posted 24 January 2011 - 03:19 PM

Means clonedidks did not manage to lock the device, probably because another process with a higher privilege already locked it.
You can still perform your backup but you cannot guarantee that the other process will not modify your source during backuping this maybe leading to potential image inconsistencies.

Regards,
Erwan.


Ok, I did that backup anyways, the .IMG file opens with PowerISO, but what I don't understand is why the .img created has the full size of the C: partition (296 GB), when the actually data/programs in that partition is only around 76 GB (Poweriso says also that the .img file once I see properties of the .img file openned that is 76 GB). So why does clonedisk take the empty space in drive C: and added to the .img image. That is huge in case of trying to save space for other backups I do with R-Drive_Backup app.

#279 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 24 January 2011 - 08:04 PM

Ok, I did that backup anyways, the .IMG file opens with PowerISO, but what I don't understand is why the .img created has the full size of the C: partition (296 GB), when the actually data/programs in that partition is only around 76 GB (Poweriso says also that the .img file once I see properties of the .img file openned that is 76 GB). So why does clonedisk take the empty space in drive C: and added to the .img image. That is huge in case of trying to save space for other backups I do with R-Drive_Backup app.


Then you should go for "used clusters" option but in that case the image wont be able to be opened in poweriso or any other iso tool.

You cant have both :thumbsup: At least, as far as I know.

/Erwan

#280 rocketero

rocketero

    Frequent Member

  • Advanced user
  • 155 posts
  •  
    United States

Posted 24 January 2011 - 08:21 PM

Then you should go for "used clusters" option but in that case the image wont be able to be opened in poweriso or any other iso tool.

You cant have both :thumbsup: At least, as far as I know.

/Erwan

When I select 'used clusters' and try to backup i get a window that says: "Invalid_Handle_Value for \\.\C:" and after clicking OK on that window it does nothing. (.vol)

#281 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14825 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 January 2011 - 10:57 AM

@erwan.l
Maybe an alternative compression format (fully streamable):
http://tukaani.org/xz/format.html
If ut actually delivers 20% reduced archive when compared to gzip, it is probably worth the effort to check it and - if working as expected - "adopt" it.:
http://tukaani.org/xz/

:cheers:
Wonko

#282 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 344 posts

Posted 08 March 2011 - 03:14 PM

Hi Erwan,

I'm trying to use Clonedisk to reduce the size of a raw disk image (IMG, or fixed size VHD, not too different).
More precisely, I have installed XP to a disk image which is 1.2G because that's what XP setup needs to be happy, but obviously after setup only 600 Mb is used (even less if you remove all the unwanted stuff). So I have this 1.2 Gb image which I would like to skrink to about 650 Mb.

In order to do so, I've been experimenting a bit with the "negative growth" capability of Clonedisk. Unfortunately I can't really get it to do what I want, and for now I am a little bit confused by the interface, as I don't understand what it all really means:

Posted Image

It makes perfect sense that 1408576 bytes is the same as 1 Mb or 2048 sectors.
But what does the second line means ? What is the difference between "grow" and "extend" ?
Please could you take me through simple steps to achieve what I want ? (if that is possible !)
Many thanks in advance !

#283 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 08 March 2011 - 08:16 PM

Hi Erwan,

I'm trying to use Clonedisk to reduce the size of a raw disk image (IMG, or fixed size VHD, not too different).
More precisely, I have installed XP to a disk image which is 1.2G because that's what XP setup needs to be happy, but obviously after setup only 600 Mb is used (even less if you remove all the unwanted stuff). So I have this 1.2 Gb image which I would like to skrink to about 650 Mb.

In order to do so, I've been experimenting a bit with the "negative growth" capability of Clonedisk. Unfortunately I can't really get it to do what I want, and for now I am a little bit confused by the interface, as I don't understand what it all really means:

Posted Image

It makes perfect sense that 1408576 bytes is the same as 1 Mb or 2048 sectors.
But what does the second line means ? What is the difference between "grow" and "extend" ?
Please could you take me through simple steps to achieve what I want ? (if that is possible !)
Many thanks in advance !


Hi Doodoo,
I must confess this screen is still quite obscure and that I need to polish it...
Basically in windows world, you need to grow a partition (at the disk level) but also to extend the volume (located on that partition, at the windows level).

In API words : you need to call IOCTL_DISK_GROW_PARTITION then FSCTL_EXTEND_VOLUME.
If you dont do an extend, windows will not completely be "aware" of the new size.

More here : http://msdn.microsof...1(v=vs.85).aspx (Enlarges the specified partition)
and here : http://msdn.microsof...4(v=vs.85).aspx (increase the size of a monted volume)

First line you need to input by how much you want to increase (or decrease).
Second line you need to input the new size (in sectors) of the volume.
On the second line, clonedisk tries to calculate for you the new sector size but you should always double check (dont trust me!).
In the future version, this complexity will be hidden into a friendly interface.

Side note : when decreasing, beware that your clusters are scattered everywhere on your partition and that you should defragment / move all clusters to the begining of the partition first.

Regards,
Erwan.

#284 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 344 posts

Posted 09 March 2011 - 05:45 PM

I must confess this screen is still quite obscure and that I need to polish it...

Hi Erwan,
No need to apologise... Your app is very useful, and very nice indeed !
Many thanks for all the info you provided . That makes perfect sense now. :dubbio: However I don't manage to do what I want. Am I doing anything wrong ?

OK here is the disk I want to resize (it's a raw IMG, mounted with VSS):
Posted Image

It's got 2522141 sectors, but is only about half full. I have defragmented it and all the free sectors are at the end.
Say I want to reduce it by 1187840 sectors.
In bytes, that is 1187840 * 512 = 608174080 (580 Mb). So that's what I put in the "bytes to grow" box (with a negative sign)

Posted Image

Note by the way that there seem to be a slight problem here (or I am making a simple mistake), because the disk number of sectors is reported as 2522140 instead of 2522141 (second line, second box).
So, the new total size in sectors is 2522141 - 1187840 = 1334301. Again that's what I put in the second line, first box. But no matter what I do, Clonedisk doesn't seem to populate the last box on the second line (where I would expect -1187840 to appear, i.e. the same value as on the first line in the box immediately above).

At this stage, I'm able to "grow" the partition (disk manager effectively reports a new size of 651 Mb), but it won't let me "extend" the volume:
Posted Image

Am I doing anything wrong ? Or just trying to do something that is not supported ? (I would expect my raw IMG to be of a new, but smaller, size of 651 Mb).
Or do I need to use a combination of "take offline / online / dismount" too ?

#285 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 09 March 2011 - 07:21 PM

Hi Erwan,
No need to apologise... Your app is very useful, and very nice indeed !
Many thanks for all the info you provided . That makes perfect sense now. :dubbio: However I don't manage to do what I want. Am I doing anything wrong ?

OK here is the disk I want to resize (it's a raw IMG, mounted with VSS):
Posted Image

It's got 2522141 sectors, but is only about half full. I have defragmented it and all the free sectors are at the end.
Say I want to reduce it by 1187840 sectors.
In bytes, that is 1187840 * 512 = 608174080 (580 Mb). So that's what I put in the "bytes to grow" box (with a negative sign)

Posted Image

Note by the way that there seem to be a slight problem here (or I am making a simple mistake), because the disk number of sectors is reported as 2522140 instead of 2522141 (second line, second box).
So, the new total size in sectors is 2522141 - 1187840 = 1334301. Again that's what I put in the second line, first box. But no matter what I do, Clonedisk doesn't seem to populate the last box on the second line (where I would expect -1187840 to appear, i.e. the same value as on the first line in the box immediately above).

At this stage, I'm able to "grow" the partition (disk manager effectively reports a new size of 651 Mb), but it won't let me "extend" the volume:
Posted Image

Am I doing anything wrong ? Or just trying to do something that is not supported ? (I would expect my raw IMG to be of a new, but smaller, size of 651 Mb).
Or do I need to use a combination of "take offline / online / dismount" too ?


See below :
First step : i have added 200000000 bytes (190mb) to my drive (390625 sectors).
Second step : i have extended my volume by giving the new total sectors : 1969625 which clonedisk indicates as being 1579000 sectors (before extending) + 390625 (the sectors I have added in previous step).
Note that this describes an increase. I need to write the steps for a decrease.

I realise this is not very friendly compared to what windows 7 or friendly software such as partition magic can do...
Will work this out by merging both steps into one like windows 7 does.

Regards,
Erwan.

Attached Thumbnails

  • clonedisk.png


#286 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14825 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 March 2011 - 07:44 PM

Just for the record (since I am not sure if it actually applies to the issue at hand) a partition formatted with NTFS is "peculiar".

The filesystem applied to it (the actual "volume", "drive" or however the *whatever* gets a drive letter) will always be 1 sector less than the partition size.

This happens because the exceeding sector (inside the partition but outside the filesystem) is used to hold a copy of the first sector of the NTFS bootsector.

In the given example, the filesystem size is (Total clusters x Sectors per cluster) 630,535 x 4 = 2,522,140 (data in the bootsector), while the actual partition containing it will be 1 sector more, i.e. 2,522,141 (TotalSectors)

:cheers:
Wonko

#287 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 09 March 2011 - 08:53 PM

about that
"Am I doing anything wrong ? Or just trying to do something that is not supported ? (I would expect my raw IMG to be of a new, but smaller, size of 651 Mb).
Or do I need to use a combination of "take offline / online / dismount" too ?"

No your image wont be shorter at the end : only the partition in there will.
You'll need to truncate the file yourself or to clone (clonedisk should be able to do it).

No you dont need to use take offline / online / dismount : another confusing item from the developer :cheers:

Regards,
Erwan.

#288 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 09 March 2011 - 09:37 PM

About the extend MS API, re reading MSDN, I read this "This control code cannot be used to reduce the size of a volume.".
So dead end here : increasing works ok, but decreasing needs more work.
I could use FSCTL_SHRINK_VOLUME but it works on vista and up and I wanted to stick to XP compatibility.
Whatsmore when i use the grow api to decrease a ntfs partition, it turns into a raw volume thus losing datas. (linked to wonko's remark about last sector?).
Expertise welcome here.

/Erwan

#289 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 09 March 2011 - 11:13 PM

Hi Doodoo,

I have added a shrink function which I was able to test successfully on a few of my ntfs volumes.

Increase works as is :
-grow (by a positive number of bytes) then extend (with a new total sectors number)

Decrease works as is:
-shink (with a new total sectors number) then grow (by a negative number of bytes)
This one will work only on a vista and up

Note that in one case you grow then extend volume, in the other you shrink volume then (un)grow .

You need to download latest 1.8.4 version.

Regards,
Erwan.

#290 Doodoo

Doodoo

    Frequent Member

  • Advanced user
  • 344 posts

Posted 10 March 2011 - 09:08 AM

Many thanks Erwan, the least I can say is that you are not long to come up with updates :cheers:
I'll download the new version and give it a good go. Unfortuantely I don't have any Vista or W7 system for now, i'm still sticking to XP. But I have learnt something (thanks Wonko, for explaining the 1 sector discrepancy between the partition and the volume size).
For now it looks like the best way to shrink an IMG is to create a new one of the target size, possibly fix the signature to be same as the original IMG, and then copy all the files... Clonedisk is still very useful to that end !!! (if I may add one more request, it would be great to have a dedicated tab to manage signatures, read and write, from mounted disks (physical or virtual), or directly from IMG, VHD)
Thanks again !!

#291 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 10 March 2011 - 10:59 AM

Many thanks Erwan, the least I can say is that you are not long to come up with updates :cheers:
I'll download the new version and give it a good go. Unfortuantely I don't have any Vista or W7 system for now, i'm still sticking to XP. But I have learnt something (thanks Wonko, for explaining the 1 sector discrepancy between the partition and the volume size).
For now it looks like the best way to shrink an IMG is to create a new one of the target size, possibly fix the signature to be same as the original IMG, and then copy all the files... Clonedisk is still very useful to that end !!! (if I may add one more request, it would be great to have a dedicated tab to manage signatures, read and write, from mounted disks (physical or virtual), or directly from IMG, VHD)
Thanks again !!


Indeed, on XP, I am clueless how to shrink a partition for now.
Using only the grow fonction with a negative number does not seem the proper way.
Modifying the values in the mbr and bs is maybe another way but I did not explore this way.

At least on vista and up, the shrink API will tell you if the new size is safe or not and will tell the system not to write anymore beyond the new shrunken size.

In the information tab, you can read the mbr and bs from file.
In the mbr tab, you can modify the mbr (disk id, etc) from a file (select from file in the drop down list).
Same thing in the partition table editor where you can read from a file.

#292 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 10 March 2011 - 06:06 PM

About extend or shrink, screen has been simplified greatly.

One button only, size in Mbytes.
Not more complex calculations between bytes, mbytes, sectors, etc...

/Erwan

#293 fuwi

fuwi

    Frequent Member

  • Expert
  • 135 posts
  • Location:Switzerland
  •  
    Switzerland

Posted 28 April 2011 - 12:28 PM

Hi Erwan

My PE Boot-CD is always nearly full, so clonedisk.exe v.1.8.9 with a filesize of 2010 KB
is a bit too large for my CD. I have compressed the clonedisk.exe with UPX
(U)ltimate (P)acker for e(X)ecutables, http://upx.sourceforge.net/
now clonedisk.exe has a filesize of 806 KB, works flawlessly and fits to my CD ;)

fuwi

#294 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14825 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 17 August 2011 - 09:35 AM

erwan,
please check this:
http://www.911cd.net...ic=24353&st=197
(evident problem in CHS values)

:cheers:
Wonko

#295 RasterBurn

RasterBurn

    Newbie

  • Members
  • 17 posts
  • Location:Guwahati, Assam
  •  
    India

Posted 18 August 2011 - 01:29 AM

please upload clonedisk latest version to the reboot download portal...

#296 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 18 August 2011 - 06:04 AM

please upload clonedisk latest version to the reboot download portal...


Done !

#297 RasterBurn

RasterBurn

    Newbie

  • Members
  • 17 posts
  • Location:Guwahati, Assam
  •  
    India

Posted 18 August 2011 - 09:39 AM


Done !


Thanks

#298 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14825 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 02 September 2011 - 10:18 AM

@erwan.l
At the risk of seeming more grumpy than I usually am :w00t::
Do you actually TEST your app after a new compile or just ASSUME that it works allright? :dubbio:

The current (1.9.4) version of clonedisk (tools->Partition Table editor) DOES NOT save the "Starting C.H.S. Fields"! :ph34r: :ranting2:
Seriously, if you need to develop a "testing procedure" for your app, I am in to try and help you but you should be VERY careful in NOT introducing this kind of "regression code bugs", as they seriously UNDERMINE the "reliability rating" of your app (which is about everything it has).

See here:
http://www.911cd.net...showtopic=24501

:cheers:
Wonko

#299 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2735 posts
  • Location:Nantes - France
  •  
    France

Posted 02 September 2011 - 10:56 AM

Hi Wonko,

I do test it and rather thouroughly but I have limited means (a few computers, a few drives, etc).
On top of that I am only one individual whose main job is not developing like most of us overhere so time is limited too.
Regarding writing the CHS, I did test it but will of course have a deeeper look at it.

So I do my best to share and contribute but indeed I am not without flaws.

Regards,
Erwan

edit 1 : "DOES NOT save the CHS", the code is there so it does something I can tell you and up to today I believed it was doing the right thing.
I am currently checking this second part but would gladly take some more details/feedback.

edit 2 : found the bug, was picking up the wrong text fields when writing the starting CHS. Fixed and uploaded again to the download sections.
Thanks for the feedback.

#300 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14825 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 02 September 2011 - 12:28 PM

So I do my best to share and contribute but indeed I am not without flaws.


Sure :) I do understand that :worship:, that's why I suggested you to implement some kind of "standard tests" for the app.

The current version (1.9.5) DOES NOT as well work. :w00t:

Now FIRST partition entry "Starting CHS" is updated :thumbsup: but SECOND one it is NOT :ph34r:(I havent tested 3rd and 4th).

Noone is after you, you have all the time you need, but since this is a "delicate" tool it has to be IMHO "double checked" before being made downloadable. :dubbio:

:cheers:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users