dumpadm question

Thread Tools Search this Thread
Operating Systems Solaris dumpadm question
# 1  
Old 09-01-2009
dumpadm question


I am trying to invoke a crash dump on a running Solaris system so I can view the crash log

I'm running:
SunOS my_box 5.10 Generic_138888-02 sun4u sparc SUNW,Sun-Fire-V240

Here's some output to give a better look of my problem

# savecore -L
savecore: dedicated dump device required

# dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (swap)
Savecore directory: /var/crash/my_box Savecore enabled: yes

I only have 1 disk at the momment, but I heard there was ways to work around this?

I tried following the following URL but that does not work for me (I get the error below)

# dumpadm -c kernel -d /export/home/swap
dumpadm: cannot use /export/home/swap as dump device: Block device required

#3284: How to capture a live system core dump without having a dedicated

I don't know much about zfs, but I read I could mount a zfs block device

# mkfile 4096m /swap-file
# zpool create mypool /swap-file
# zfs create -V 2048m mypool/block
# dumpadm -c kernel -d /dev/zvol/dsk/mypool/block
dump is not supported on device '/dev/zvol/dsk/mypool/block': vdev type 'file' is not supported

Any pointers?

---------- Post updated at 04:59 PM ---------- Previous update was at 04:34 PM ----------

Just got it working!

I just needed to use S2 instead of S1

does anyone know why this works?

# dumpadm -c kernel -d /dev/dsk/c0t0d0s2
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s2 (dedicated)
Savecore directory: /var/crash/my_box Savecore enabled: yes

# savecore -L
dumping to /dev/dsk/c0t0d0s2, offset 65536, content: kernel
100% done: 64312 pages dumped, compression ratio 3.48, dump succeeded
System dump time: Sun Apr 19 16:55:53 2009
Constructing namelist /var/crash/my_box/unix.0
Constructing corefile /var/crash/my_box/vmcore.0
100% done: 64312 of 64312 pages saved

---------- Post updated at 05:16 PM ---------- Previous update was at 04:59 PM ----------

Maybe this should be added to another thread, but I thought this was related!

Well now that I have the crash dump, I want to view it!!

I know I can use the mdb command, but I was trying to go through that man page and I was getting lost!

Is there an alternative? Can anyone give me some simple dcmds so I can do SOMETHING wih the crash dumps?

Any advice is greatly appreciated!

Last edited by Keepcase; 09-01-2009 at 05:55 PM..
# 2  
Old 09-01-2009
Use s2 at your peril!

slice 2 is the whole disk, you risk wiping your operating system.

All you have to do is use a slice that is not a swapfs slice, e.g. /var/tmp or make a directory /export/home/dump.
# 3  
Old 09-01-2009
you should never use slice 2. btw, what was the size of your swap space assigned?
can you cat /etc/dumpadm.conf ?
# 4  
Old 09-01-2009
I hope you have an EFI label on that disk, or at least one with a non-standard Sun layout. Because the normal Sun partitioning scheme uses overlapping partitions where, as other have noted, slice 2 overlaps everything on the disk.

If you used slice 2 and the disk is partitioned something like this:

format> verify

Primary label contents:

Volume name = <        >
ascii name  = <DEFAULT cyl 4424 alt 2 hd 255 sec 63>
pcyl        = 4426
ncyl        = 4424
acyl        =    2
bcyl        =    0
nhead       =  255
nsect       =   63
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm    1047 - 4423       25.87GB    (3377/0/0) 54251505
  1       swap    wu       1 -  523        4.01GB    (523/0/0)   8401995
  2     backup    wm       0 - 4423       33.89GB    (4424/0/0) 71071560
  3 unassigned    wm     524 - 1046        4.01GB    (523/0/0)   8401995
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0


You may have just overwritten something important.

Check your partitions before you go any further. If you're lucky, you will have just wiped out some unused swap.
# 5  
Old 09-02-2009
Incredible here is my dumpadm.conf


I have now taken all of your advice and made slice3 my dump device


format> verify
Primary label contents:
Volume name = < >
ascii name = <FUJITSU-MAW3073NCSUN72G-1703 cyl 14087 alt 2 hd 24 sec 424>
pcyl = 14089
ncyl = 14087
acyl = 2
nhead = 24
nsect = 424
Part Tag Flag Cylinders Size Blocks
0 root wm 413 - 14075 66.30GB (13663/0/0) 139034688
1 swap wu 0 - 412 2.00GB (413/0/0) 4202688
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 0 - 412 2.00GB (413/0/0) 4202688
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 14076 - 14086 54.66MB (11/0/0) 111936
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0

Thanks for the help guys

So if there was more going on in my system, the crash dump could have potentially exceeded my physical memory and swap space which would then start to overwrite data on S2 (which is everything, so technically anything after my swap?)

1 swap wu 0 - 412 2.00GB (413/0/0) 4202688

so any data after cylinder 412 would start to be overwritten by the crash dump?

is this the reason using slice2 is not recommended?

Last edited by Keepcase; 09-02-2009 at 11:09 AM..
# 6  
Old 09-02-2009
Slice 3 is using the same disk space as the swap partition.

Your may have got away with the dump going to slice 2 because the whole disk starts with 2GB of swap space so as long as the dump was less than 2GBytes then actual OS would be left untouched but as you say if the dump went beyond slice 412 there would be corruption.

This article:
The Linux and Unix Menagerie: How Avoid Solaris Panics When Using Savecore With Veritas Volume Manager
says that Sun recommends using the swap device as your dump device so s1 itself should be okay?
# 7  
Old 09-02-2009
Thanks for the link Tony,

your post helped me understand it

the link was interesting as well ^^
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ls -l question

Hi, When doing ls -l, is it right to assume that all files with the date and time on it are files that are created/modified on the current year? Is there any way to display the creation/modified date of a file that are not created/modified in the current year? (4 Replies)
Discussion started by: newbie_01
4 Replies

2. Shell Programming and Scripting

A question

Hi, I'm new to unix and got struck here.Can any one help me out.My question is .. is the command if ; then echo "do some stuff" fi correct? Thanks in advance abhijeet (18 Replies)
Discussion started by: Abhijeet_Atti
18 Replies

3. Programming

C++ little question

Hi, I am doing a C++ self-study and I got stuck with this problem. I want to have a code that asks the suer to enter two numbers and then it lists the numbers between these two numbers. It has also to print a message if these two numbers are equal. Here is what I wrote: #include <iostream>... (11 Replies)
Discussion started by: faizlo
11 Replies

4. UNIX for Dummies Questions & Answers

Help me these Question??

1. How the Unix system identify the Other User to access for file permission? 2. What command we use to convert the extension of a file name? 3. What command use to convert other editing file to Unix based text file? Please answer of these Question???Its necessary for me?? (3 Replies)
Discussion started by: pradipta_pks
3 Replies

5. UNIX for Dummies Questions & Answers

Vi Question

Hi Guys I have a quick question I have a file that is approx 1.5 million lines long of which most of the lines start with INFO: some info INFO: some more info INFO: etc I want to remove these lines I was thinking along the lines of :%s/INFO*//g but this does not work None... (6 Replies)
Discussion started by: grahambo2005
6 Replies

6. UNIX for Dummies Questions & Answers


I need to write a script file that will tell me the largest number in a group of numbers. ANy help is greatly appreciated (2 Replies)
Discussion started by: twan
2 Replies

7. Shell Programming and Scripting

vi question

hello! i am very new to this, so please bear with me. i used red hat linux to creat a little two page website for school, which was really just an exercise in absolute and relative paths. so, now, its all done, and i want to play with it some more, but i think there may be a problem with vi. i... (3 Replies)
Discussion started by: jojodancer
3 Replies

8. Shell Programming and Scripting


how do i write a script that'll open what i entered and scan it for a certain line of text. for example, i enter a filename (that exists) and in that file i want to scan a certain word that'll show how much of that word appears throughout the file. (2 Replies)
Discussion started by: mrhenry
2 Replies

9. UNIX for Dummies Questions & Answers

Next Question:

what is the function of swap in linux why i have to create apsolutely a particion for the swap when i install (i installed lnx4win mandrake and made an automat. disk particion and the install program one of my disk partitions that was 3gb devidet in 4 one native 700mb swap 600mb and the others i... (1 Reply)
Discussion started by: user666
1 Replies
Login or Register to Ask a Question