How can I create a new swap location in ZFS?

Tags
solaris, swap, zfs

 
Thread Tools Search this Thread
# 1  
Old 01-15-2009
How can I create a new swap location in ZFS?

I am running OpenSolaris v5.11

During installation, the installation created default ZFS filesystems, like the dump and swap locations.

I want to change the blocksize of the /dump and /swap locations and make them ZFS volumes.

The ZFS system is on a zpool called rpool

I was able to do a zfs destroy on /rpool/dump and then create another dump location with the proper options:
zfs create -b 131072 -V 1024m rpool/dump

I cannot destroy /rpool/swap though. It tells me that the ...dataset is busy. I did some investigating and found that I have to do a dumpadm but that doesn't work either:


>dumpadm -d swap
dumpadm: no swap devices could be configured as the dump device

>swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,1 8 16775160 16775160


How can I destroy the /rpool/swap directory and then create another swap directory and make it a volume with a particular blocksize? Do I rename the swap location to something else?

Thanx.
# 2  
Old 01-16-2009
Quote:
Originally Posted by sqa777
I am running OpenSolaris v5.11

During installation, the installation created default ZFS filesystems, like the dump and swap locations.
I want to change the blocksize of the /dump and /swap locations
Why ? What do you expect with changing the dump and swap blocksizes ?
Quote:
and make them ZFS volumes.
They are already ZFS volumes, not filesystems.
Quote:
I was able to do a zfs destroy on /rpool/dump and then create another dump location with the proper options:
zfs create -b 131072 -V 1024m rpool/dump
I bet it was initially created with the same options. What says
"zpool history -il | grep dump" ?
Quote:
I cannot destroy /rpool/swap though. It tells me that the ...dataset is busy. I did some investigating and found that I have to do a dumpadm
Your investigation failed, dumpadm has no relationship with the swap, especially when on ZFS.
Quote:
but that doesn't work either:


>dumpadm -d swap
dumpadm: no swap devices could be configured as the dump device

>swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 182,1 8 16775160 16775160


How can I destroy the /rpool/swap directory and then create another swap directory and make it a volume with a particular blocksize? Do I rename the swap location to something else?
You don't remove swap with the dumpadm command but with the swap one:
Code:
swap -d /dev/zvol/dsk/rpool/swap

# 3  
Old 01-16-2009
ZFS Swap

Quote:
Originally Posted by jlliagre
Why ? What do you expect with changing the dump and swap blocksizes ?

Quote:
Originally Posted by sqa777
I am running OpenSolaris v5.11

During installation, the installation created default ZFS filesystems, like the dump and swap locations.
I want to change the blocksize of the /dump and /swap locations
I want to change the volume size so I can recreate a customer environment.

Quote:
Originally Posted by jlliagre
I bet it was initially created with the same options. What says
"zpool history -il | grep dump" ?
zpool history -il | grep dump
2009-01-07.01:20:03 zfs create -b 131072 -V 8191m rpool/dump [user root on opensolaris:global]
2009-01-15.17:00:19 zfs destroy rpool/dump [user root on opensolaris:global]
2009-01-15.17:00:36 zfs create -b 131072 -V 1024m rpool/dump [user root on opensolaris:global]


The original dump location was a bit bigger than what I set it to.


Quote:
Originally Posted by jlliagre
Your investigation failed, dumpadm has no relationship with the swap, especially when on ZFS.
Sorry about my bad investigation, I was going by this info:

ZFS Troubleshooting Guide - Siwiki


Quote:
Originally Posted by jlliagre
You don't remove swap with the dumpadm command but with the swap one:
Code:
swap -d /dev/zvol/dsk/rpool/swap


Thanx, I'll try it.
# 4  
Old 01-16-2009
Question

Quote:
Originally Posted by jlliagre
You don't remove swap with the dumpadm command but with the swap one:
Code:
swap -d /dev/zvol/dsk/rpool/swap

Jilliagre,

I tried the swap -d command above and it didn't work:

swap -d /dev/zvol/dsk/rpool/swap
/dev/zvol/dsk/rpool/swap was dump device --
invoking dumpadm(1M) -d swap to select new dump device
dumpadm: no swap devices are available


Do I have to set up another swap device before deleting the original one?
# 5  
Old 01-17-2009
You cannot use a swap device as a dump device on ZFS. Is "/dev/zvol/dsk/rpool/swap was dump device --" really a message you got from running the swap command ?

How much RAM is installed ? Reducing the dump device size from 8 to 1 GB might prevent a crash dump to complete.

If your swap is in use and no other swap area can pick the stored pages, you cannot remove a swap area.

What exactly are you trying to reproduce with your settings ? kernel panics ?

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
How do I add extra ZFS swap in Solaris 11.3? feroccimx Solaris 5 1 Week Ago 11:36 PM
Trying to create ZFS slice on rpool kebabbert Solaris 8 01-16-2018 10:58 AM
ZFS flash install "Unable to create Filesystem error" sc0rpie Solaris 8 09-24-2014 08:37 AM
How to find a existing file location and directory location in Solaris box? buzzme Shell Programming and Scripting 1 01-10-2013 09:13 PM
Unable to create zfs zpool in FreeBSD 8.2: no such pool or dataset bstring BSD 3 09-21-2012 06:24 PM
Create files to introduce with ZFS herbich1985 Solaris 9 06-04-2012 12:12 PM
Firefox create new profile in non default location cokedude UNIX and Linux Applications 2 01-10-2012 01:52 PM
File created in a different location instead of desired location on using crontab archana.n Shell Programming and Scripting 1 10-20-2011 04:47 AM
increase SWAP on ZFS file system osmanux Solaris 4 10-05-2011 09:05 AM
Create a list of commands in a central location, and then run them all remotely through a ssh here DeCoTwc Shell Programming and Scripting 0 09-22-2010 11:51 AM
Swap device file and swap sapce lamoul HP-UX 6 03-04-2010 09:14 AM
Shell Script for Copy files from one location to another location allways4u21 Shell Programming and Scripting 2 01-21-2010 04:26 PM