LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-11-2013, 04:02 AM   #1
leader1201
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Rep: Reputation: Disabled
DD command input/output error


Hi,

I have a one instance(ubuntu 12.10) and volume in amazon account. I have attached volume with same instance using ec2-attach-volume command using /dev/sdp as a device name. After attaching in amazon ubuntu instance one more xvdp file is created in /proc/partitions file.

cat /proc/partitions
xvda1
xvdp


After i have executed follwoing command.

mkfs -t ext4 /dev/xvdp
mkdir /mnt/xvdp (Its a simple directory in /mnt/ directory)
mount /dev/xvdp /mnt/xvdp (mounted xvdp file system on mounted directory)
chmod 777 /mnt/xvdp

I have uploaded one ubuntu 11.10 image in /mnt/xvdp location using rsync command.
now i have image.raw file in the /mnt/xvdp location. now i want transfer the .raw file into /dev/xvdp through follwoing command.

dd if=/mnt/xvdp of=/dev/xvdp bs=10M

This is throwing input/output error.

The big problem is files which is there in /mnt/xvdp location is completely disappeared. Again i have to upload and doing the procedure.
Please help me out.

Thanks in advance.

Regards,
Prasad.

Last edited by leader1201; 03-11-2013 at 04:04 AM.
 
Old 03-11-2013, 04:21 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,929

Rep: Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306Reputation: 1306
What is your goal? the command: dd if=/mnt/xvdp of=/dev/xvdp is completely useless, it cannot work.
/mnt/xvdp and /dev/xvdp are the same device, the only difference is: /dev/xvdp is a raw device, you can write an image onto it. /mnt/xvdp is a filesystem (using the same device, same disk), just it uses this device as a filesystem. Therefore you can have a file named image.raw on it. Writing the raw device directly will destroy the filesystem, so your dd command will obviously fail.
You need another filesystem to store the image file.
 
Old 03-11-2013, 04:40 AM   #3
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 808
Blog Entries: 2

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by leader1201 View Post
i have image.raw file in the /mnt/xvdp location. now i want transfer the .raw file into /dev/xvdp through follwoing command.

dd if=/mnt/xvdp of=/dev/xvdp bs=10M

This is throwing input/output error.
Why are you doing that dd ? Are you following some guide that said to do that? I think you're missing something about using the image.raw as a loopback file. see http://www.idevelopment.info/data/AW...t/AWS_10.shtml

What you're doing with dd is damaging the filesystem where you have stored the file.
 
Old 03-11-2013, 05:20 AM   #4
leader1201
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
can i get the same kind of link specific to ubuntu machines?
 
Old 03-11-2013, 06:03 AM   #5
leader1201
LQ Newbie
 
Registered: Feb 2013
Posts: 22

Original Poster
Rep: Reputation: Disabled
hi linosaurusroot,

i have a one more doubt while uploading using ec2-api-tools(ec2-upload-image command) , can we upload more than 10 gb image?

Thanks in advance.

regards,
prasad.
 
Old 03-11-2013, 06:09 AM   #6
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 808
Blog Entries: 2

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by leader1201 View Post
can i get the same kind of link specific to ubuntu machines?
As what I did was google for "ec2 image.raw linux" I suppose you'll know what to do to find such links.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cp command failing for large files - Input/Output error googs Linux - General 5 08-09-2012 12:28 PM
Redirecting command output to input of another command mightymouse2045 Linux - Newbie 3 07-02-2011 12:28 PM
[SOLVED] mt command Every one I issue gets input/output error davide123 Linux - Hardware 4 12-06-2010 03:07 PM
Giving output of a command as the input to another whirlpool Programming 5 09-07-2010 03:31 PM
how to use the output of a file for input of a command sneak Linux - General 2 05-12-2004 09:21 AM


All times are GMT -5. The time now is 11:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration