Solved

How to set the swap and dump device using zfs ?

Posted on 2009-04-07
4
448 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks blu :-)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now