?
Solved

How to set the swap and dump device using zfs ?

Posted on 2009-04-07
4
Medium Priority
?
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
blu earned 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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 have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

770 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