Restoring with ntfsclone fails: ftruncate failed: file too large

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Restoring with ntfsclone fails: ftruncate failed: file too large

Chris Wilson-24
Hi all,

I used ntfsclone to created an image of a 250 GB partition. When I try to
restore that image, using the following command:

   lzopcat sda2.ntfsclone.img | ntfsclone -r --overwrite /dev/sda2 -

I get this error message:

   ERROR(27): ftruncate failed for file '/dev/sda2': File too large

Has anyone else seen this error? Why is it trying to truncate a device
file anyway? Is it possible to avoid the error and restore the image?

Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Linux-NTFS-Dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linux-ntfs-dev
Reply | Threaded
Open this post in threaded view
|

Re: Restoring with ntfsclone fails: ftruncate failed: file too large

Anton Altaparmakov-2
Hi,

On 26 Aug 2011, at 15:20, Chris Wilson wrote:

> Hi all,
>
> I used ntfsclone to created an image of a 250 GB partition. When I try to
> restore that image, using the following command:
>
>   lzopcat sda2.ntfsclone.img | ntfsclone -r --overwrite /dev/sda2 -
>
> I get this error message:
>
>   ERROR(27): ftruncate failed for file '/dev/sda2': File too large
>
> Has anyone else seen this error? Why is it trying to truncate a device
> file anyway? Is it possible to avoid the error and restore the image?


Because you asked it to by saying "--overwrite", that's why…

You will find that using "-o" instead will work fine.

Best regards,

        Anton
--
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Senior Kernel Developer, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer, http://www.linux-ntfs.org/


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Linux-NTFS-Dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linux-ntfs-dev
Reply | Threaded
Open this post in threaded view
|

Re: Restoring with ntfsclone fails: ftruncate failed: file too large

Anton Altaparmakov-2
Hi,

On 26 Aug 2011, at 21:38, Anton Altaparmakov wrote:

> On 26 Aug 2011, at 15:20, Chris Wilson wrote:
>> Hi all,
>>
>> I used ntfsclone to created an image of a 250 GB partition. When I try to
>> restore that image, using the following command:
>>
>>  lzopcat sda2.ntfsclone.img | ntfsclone -r --overwrite /dev/sda2 -
>>
>> I get this error message:
>>
>>  ERROR(27): ftruncate failed for file '/dev/sda2': File too large
>>
>> Has anyone else seen this error? Why is it trying to truncate a device
>> file anyway? Is it possible to avoid the error and restore the image?
>
> Because you asked it to by saying "--overwrite", that's why…
>
> You will find that using "-o" instead will work fine.


I have to correct myself.  The man page says to use "--overwrite".  Now I am confused…

Which version of ntfsclone are you using?  And where did it come from?

And is /dev/sda2 really a block device?  What does "ls -l /dev/sda2" return?

Also is /dev/sda2 big enough for the 250GB volume to fit onto it?  What does "fdisk -ul /dev/sda" return?

Best regards,

        Anton
--
Anton Altaparmakov <anton at tuxera.com> (replace at with @)
Senior Kernel Developer, Tuxera Inc., http://www.tuxera.com/
Linux NTFS maintainer, http://www.linux-ntfs.org/


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Linux-NTFS-Dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linux-ntfs-dev