Solved

How to set the swap and dump device using zfs ?

Posted on 2009-04-07
4
453 Views
Last Modified: 2013-12-27
I created a pool using zpool, now i would like to give some dedicated space to swap and dumpadm device. How to proceed to create and configure dumpdevice and swap using zfs ?
0
Comment
Question by:beer9
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
blu earned 500 total points
ID: 24096115
What OS rev are you using? Are you running with a root pool, rpool? If so, then you probably already have swap
and dump on the rpool. If you are using Solaris 10 and do not have a root pool, then you need to create two
zvols in your pool, one for swap and one for dump.

This is really simple, but it is slightly different on sparc vs. x86. For x86, run this command:

zfs create -V 2G -b 4k poolname/swap

on sparc use this:

zfs create -V 2G -b 8k poolname/swap

For the dump device, run this command on either arch:

zfs create -V 2G -b 128k poolname/dump

All of the above commands create zvols that are 2GB in size. You should adjust the size as you require. One
cool thing about zvols, is that you can resize them later.

Once the zvols are done, just modify the /etc/vfstab file to point the swap entry to the newly created swap zvol.
The device name for this zvol is /dev/zvol/dsk/poolname/swap.

Then use the dumpadm command to set the dump device to /dev/zvol/dsk/poolname/dump.

One thing to be careful of, if you have a crash, you will need to run savecore manually. There is a bug that
prevents savecore from running automatically with a zvol as the dump device.

0
 

Author Comment

by:beer9
ID: 24096234
Thanks for the detailed explanation blu, could you please let me know why we are giving specific block like 4k and 8k? and 128k for dump device.. Thanks!
0
 
LVL 22

Expert Comment

by:blu
ID: 24096516
For the swap, the correct blocksize is required. I am not so sure about the dumpdevice, but that is the blocksize
in the examples I found.
0
 

Author Closing Comment

by:beer9
ID: 31567849
Thanks blu :-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question