Solved

How to set the swap and dump device using zfs ?

Posted on 2009-04-07
4
454 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
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…

717 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