LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2010, 02:23 PM   #1
amol28kulkarni
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Rep: Reputation: 0
Exclamation dd command issue


dd if=/dev/zero of=/var/images/abc.img bs=1M count=0 seek=2097152
dd: truncating at 2199023255552 bytes in output file `/var/images/abc.img': File too large


The dd commad fails here saying its truncating if I try same command with less value for seek it works
dd if=/dev/zero of=/var/images/abc.img bs=1M count=0 seek=2088960
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.1e-05 seconds, 0.0 kB/s

Whats the reason behind this and how can this be solved ?
Note that there is 3.9T available on disk for the above commands to execute.
 
Old 03-22-2010, 02:29 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
dd if=/dev/zero of=/var/images/abc.img bs=1M count=0 seek=2097152
dd: truncating at 2199023255552 bytes in output file `/var/images/abc.img': File too large


The dd commad fails here saying its truncating if I try same command with less value for seek it works
dd if=/dev/zero of=/var/images/abc.img bs=1M count=0 seek=2088960
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.1e-05 seconds, 0.0 kB/s

Whats the reason behind this and how can this be solved ?
Note that there is 3.9T available on disk for the above commands to execute.
Well ... you're limiting it to a size 0 (0 * 1M), and skipping 2M on
that would be impossible, eh?


I admit the error message is misleading, though.


Cheers,
Tink

Last edited by Tinkster; 03-22-2010 at 02:31 PM.
 
Old 03-22-2010, 02:53 PM   #3
amol28kulkarni
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Some more details plz

@Tink,
Thanks for reply,just want to fill the img with sparse space of zeros. Also how does the second command not terminate without any error message.
Can you plz explain in detail
 
Old 03-22-2010, 05:19 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,621

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
I would suggest you work out what 2TiB is - exactly.
Then check you filesystem limitations - ext3 by any chance ?.

Last edited by syg00; 03-22-2010 at 05:21 PM.
 
Old 03-22-2010, 11:41 PM   #5
amol28kulkarni
LQ Newbie
 
Registered: Jan 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for noting that out the file system is ext3 which has a limit of 2T
storage that is 1024*1024*1024*1024*2=219902355552
But another thing i see is (seek value in the command)
2097152*1024*1024=219902355552 So this must be just the range to fit for
2T.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] issue with the cp command!!! kingston Linux - Newbie 3 03-09-2010 05:19 AM
mail command issue? your_shadow03 Linux - Newbie 2 11-26-2009 05:01 AM
Postfix issue ; Must issue a STARTTLS command first after forcing TLS sarajevo Linux - Server 3 05-14-2009 08:28 AM
mv command issue Freestone Linux - Newbie 13 05-07-2006 03:47 PM
mail command issue ...!!! balavignesh Linux - Newbie 2 12-27-2005 08:19 AM


All times are GMT -5. The time now is 08:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration