LinuxQuestions.org
Visit Jeremy's Blog.
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 07-27-2012, 12:30 PM   #1
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 613

Rep: Reputation: 34
dd command gets stuck


Hi, I just installed an Oracle RAC and once I did a reboot none of the services would came up. In oracle forum I found below command and when I ran this all services stated abut the command would get stuck and I have to pres ctl+c to end the process

dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

Can some one tell me what this command would do and why this is getting stuck

OS if Redhat 6.2 (64)

Thanks and Regards
 
Old 07-27-2012, 12:40 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
That command will run indefinately, the /var/tmp/.oracale/nphasd is constantly being written to by RAC and as such it will keep the dd command running as it can never fully copy all of the data. The of=/dev/null is just redirecting the content to your bit bucket, this is basically a black hole that accepts data via stdin but does nothing with it.

You will see /dev/null used to redirect data that is not needed.
 
Old 07-29-2012, 12:52 AM   #3
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 613

Original Poster
Rep: Reputation: 34
Hi Kustom42, thanks for the reply, any idea why the RAC will start up as soon as I do above command and hit ctrl+c?

Regards
 
Old 07-30-2012, 11:37 AM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
I'm not an oracle DBA so not sure, but a quick thought would be if your /var/ partition is getting full it would prevent RAC from starting.
 
Old 07-30-2012, 12:46 PM   #5
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 613

Original Poster
Rep: Reputation: 34
Hi, Kustom42 there is ample space in /var not at all getting filled up
 
Old 07-30-2012, 10:05 PM   #6
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
Dear all, I also got questions related to dd command. So I would like to append here.

Apart from clone/exact copy of harddisk dd can do. Can dd do the resize as well?

What I mean was: If I got 100GB OLD harddisk dd to 200GB NEW harddisk,
I will have 100GB + 100GB free space in the NEW harddisk.


Can dd do the resize as well?

Last edited by fhleung; 07-30-2012 at 10:10 PM.
 
Old 08-01-2012, 11:41 AM   #7
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
dd is not a resizing application, you can copy your data with dd, then use the correct tools such as resize2fs to resize your filesystem.
 
Old 08-01-2012, 01:12 PM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,164

Rep: Reputation: 944Reputation: 944Reputation: 944Reputation: 944Reputation: 944Reputation: 944Reputation: 944Reputation: 944
Try this thread: http://www.linuxquestions.org/questi...ommand-362506/

I think the syadmin here is working on it right now, so wait a few hours.
 
Old 08-01-2012, 09:36 PM   #9
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
Quote:
Originally Posted by Kustom42 View Post
dd is not a resizing application, you can copy your data with dd, then use the correct tools such as resize2fs to resize your filesystem.
You think gparted GUI can do the resize ?
 
Old 08-06-2012, 11:15 PM   #10
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
Also one thing, if I dd from a larger size harddisk to a smaller size harddisk. Anything I need to care?

For example, dd 200GB harddisk to 100GB harddisk

Last edited by fhleung; 08-06-2012 at 11:23 PM.
 
Old 08-07-2012, 02:28 AM   #11
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
You are trying to fit 200Gb of data into 100Gb disk. That won't work
 
Old 08-07-2012, 04:52 AM   #12
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
I should tell more details.

if I dd from a larger size harddisk to a smaller size harddisk. Anything I need to care?

For example, dd 200GB harddisk to 100GB harddisk, the 200GB harddisk got 2 partitions: 100GB and 100 free space.

What I do only fit 100GB data(OS, boot partition, system reserved) into 100GB, anything I need to care?

Last edited by fhleung; 08-07-2012 at 04:55 AM.
 
Old 08-07-2012, 06:37 AM   #13
themanwhowas
Member
 
Registered: Nov 2005
Distribution: CentOS 5, Fedora 23
Posts: 216

Rep: Reputation: 29
as long as you dd the partition and not the entire disk then i don't see why you couldn't do that. ie, dd if=/dev/sda3 instead of /dev/sda
 
Old 08-07-2012, 07:15 AM   #14
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432

Rep: Reputation: 30
Thank you for the help.

The problem I having was I need to dd two partitions (system reserved + OS)

How can I dd twice and so both partitionS are stick/append together?
 
Old 08-08-2012, 11:09 AM   #15
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 613

Original Poster
Rep: Reputation: 34
Hi fhleung, your last question I dont think you can merge (if that's what you are trying to do) two partitions gatherer with dd, dd is just a disk dump tool which will aids you in having a dump, bite for bit, disregard of source content.

To merge you need to create a partition that can accommodate both of your source partitions and do something like rsync across disks, I think

Best Regards

Last edited by procfs; 08-08-2012 at 11:11 AM.
 
  


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
can ps command get stuck? yinonby Linux - Kernel 6 01-19-2012 07:37 AM
Stuck on a command LeonK Linux - Newbie 15 12-05-2006 04:54 PM
Stuck in Command Line dfego Slackware - Installation 6 07-05-2006 03:14 AM
Stuck on Command Prompt hkhiroya Debian 9 03-16-2006 12:21 PM
I'm stuck at a command prompt logiplex Linux - Software 2 09-08-2004 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:50 PM.

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