Discussion:
migrate zfs storage pool - howto free zpool for export?
Erwin Panen
2011-04-18 16:36:46 UTC
Permalink
Hi,

I'd like to export zpool universe. (and import on a new box)
However I can't get zpool to export.
"cannot export 'universe': pool is busy"
Using zpool export -f universe throws the same message.

My first thought was to stop smb server, however this did not solve my problem.
Doing sharemgr show -vp:
eon:1:~#sharemgr show -vp
default nfs=()
users nfs=() smb=()
public=/universe/public1
zfs
zfs/universe/data smb=()
data=/universe/data
zfs/universe/public smb=()
universe_public=/universe/public smb=()

I think the public1 and universe_public parts are remnants from older trials I did during setup.
Could these be the culprit?
How can I 'correctly' remove these?

universe is mounted as follows:
universe 914G 460G 19G 97% /universe
universe/data 914G 432G 19G 96% /universe/data
universe/local 914G 161M 19G 1% /universe/local
universe/public 914G 22K 19G 1% /universe/public

Thanks for your help!

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-04-18 17:18:02 UTC
Permalink
Hi Lexje,

try using fuser to list any process that may be running out of it
fuser /zpool

try stopping nfs service via svcadm if you are running nfs or anything else out of the pool

You can try
sharemgr remove-share (-f) -s /sharepath
or zfs set sharesmb=off dataset
--
This message posted from opensolaris.org
Andre Lue
2011-04-18 17:18:16 UTC
Permalink
Hi Lexje,

try using fuser to list any process that may be running out of it
fuser /zpool

try stopping nfs service via svcadm if you are running nfs or anything else out of the pool

You can try
sharemgr remove-share (-f) -s /sharepath
or
zfs set sharesmb=off dataset
--
This message posted from opensolaris.org
Erwin Panen
2011-04-18 21:15:34 UTC
Permalink
Hmmm,

Andre, first of all thanks a lot for your help.
Unfortunately I don't seem to get any further.

1.
eon:74:/mnt/eon0#zpool status
pool: universe
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
universe ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0

errors: No known data errors

2.
eon:75:/mnt/eon0#sharemgr remove-share -s public=/universe/public1
Path is not valid: public=/universe/public1

3.
eon:76:/mnt/eon0#sharemgr remove-share -f -s public=/universe/public1
Path is not valid: public=/universe/public1

4.
eon:77:/mnt/eon0#fuser /universe
/universe:

5.
eon:64:/mnt/eon0#ps -ef | grep universe
root 909 0 0 17:22:24 ? 0:01 zpool-universe
root 1113 1008 0 21:57:37 pts/1 0:00 grep universe

6.
eon:65:/mnt/eon0#kill 909
eon:66:/mnt/eon0#ps -ef | grep universe
root 909 0 0 17:22:24 ? 0:01 zpool-universe
root 1115 1008 0 21:57:51 pts/1 0:00 grep universe
eon:67:/mnt/eon0#kill -KILL 909
eon:68:/mnt/eon0#ps -ef | grep universe
root 909 0 0 17:22:24 ? 0:01 zpool-universe
root 1117 1008 0 21:58:19 pts/1 0:00 grep universe

Here's a list of my (still) running svc's:
eon:78:/mnt/eon0#svcs -a
STATE STIME FMRI
legacy_run 17:22:19 lrc:/etc/rcS_d/S50yukonx
legacy_run 17:22:22 lrc:/etc/rc2_d/S20sysetup
legacy_run 17:22:22 lrc:/etc/rc2_d/S73cachefs_daemon
legacy_run 17:22:22 lrc:/etc/rc2_d/S89PRESERVE
legacy_run 17:22:22 lrc:/etc/rc2_d/S98deallocate
legacy_run 17:22:31 lrc:/etc/rc3_d/S99local
disabled 17:22:04 svc:/network/physical:nwam
disabled 17:22:04 svc:/system/metainit:default
disabled 17:22:04 svc:/system/svc/global:default
disabled 17:22:05 svc:/system/console-login:vt2
disabled 17:22:05 svc:/system/console-login:vt3
disabled 17:22:05 svc:/system/console-login:vt4
disabled 17:22:05 svc:/system/console-login:vt5
disabled 17:22:05 svc:/system/console-login:vt6
disabled 17:22:05 svc:/network/inetd-upgrade:default
disabled 21:35:20 svc:/network/shares/group:zfs
disabled 21:37:04 svc:/network/shares/group:users
disabled 21:37:28 svc:/network/shares/group:default
disabled 21:39:23 svc:/network/smb/server:default
disabled 21:40:06 svc:/network/smb/client:default
disabled 21:43:12 svc:/network/iscsi/target:default
disabled 21:45:20 svc:/network/http:apache22
online 17:22:03 svc:/system/svc/restarter:default
online 17:22:04 svc:/network/loopback:default
online 17:22:04 svc:/network/datalink-management:default
online 17:22:04 svc:/system/filesystem/root:default
online 17:22:05 svc:/system/boot-archive:default
online 17:22:05 svc:/milestone/name-services:default
online 17:22:06 svc:/system/filesystem/usr:default
online 17:22:11 svc:/system/device/local:default
online 17:22:11 svc:/milestone/devices:default
online 17:22:11 svc:/system/filesystem/minimal:default
online 17:22:11 svc:/system/manifest-import:default
online 17:22:11 svc:/system/sysevent:default
online 17:22:11 svc:/system/cryptosvc:default
online 17:22:11 svc:/system/idmap:default
online 17:22:14 svc:/network/physical:default
online 17:22:14 svc:/system/identity:domain
online 17:22:14 svc:/system/identity:node
online 17:22:19 svc:/network/ipfilter:default
online 17:22:19 svc:/milestone/network:default
online 17:22:19 svc:/network/initial:default
online 17:22:19 svc:/milestone/single-user:default
online 17:22:20 svc:/system/filesystem/local:default
online 17:22:20 svc:/network/service:default
online 17:22:20 svc:/system/cron:default
online 17:22:20 svc:/system/stmf:default
online 17:22:21 svc:/system/sysidtool:net
online 17:22:21 svc:/system/sysidtool:system
online 17:22:21 svc:/milestone/sysconfig:default
online 17:22:22 svc:/system/utmp:default
online 17:22:22 svc:/system/console-login:default
online 17:22:22 svc:/system/system-log:default
online 17:22:22 svc:/network/ssh:default
online 17:22:22 svc:/milestone/multi-user:default
online 17:22:31 svc:/milestone/multi-user-server:default

Thanks for helping out,

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-04-18 21:24:08 UTC
Permalink
fuser says nothing running

make sure you are not in /universe when you go to export it
cd /

Try this and attach the output file out
truss -fae -vall -o /tmp/out -f zpool export universe
--
This message posted from opensolaris.org
Erwin Panen
2011-04-18 21:44:10 UTC
Permalink
No go,

First off, the zpool isn't mounted anymore.
1.
eon:118:/#df -h
Filesystem size used avail capacity Mounted on
/devices/ramdisk:a 326M 202M 92M 69% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 3.3G 328K 3.3G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
326M 202M 92M 69% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0t0d0s0 3.7G 350M 3.3G 10% /mnt/eon0
swap 3.3G 0K 3.3G 0% /tmp
swap 3.3G 56K 3.3G 1% /var/run

2.
eon:115:/mnt/eon0#zfs set sharesmb=off /universe/public
cannot open '/universe/public': invalid dataset name

3.
eon:119:/#truss -fae -vall -o /tmp/out -f zpool export universe
cannot export 'universe': pool is busy

4.
ps -ef | grep universe
eon:122:/#ps -ef | grep universe
root 909 0 0 17:22:24 ? 0:01 zpool-universe
root 1281 1008 0 22:44:04 pts/1 0:00 grep universe

Why can't I kill this pid 909?

Erwin
--
This message posted from opensolaris.org
Erwin Panen
2011-04-18 21:47:40 UTC
Permalink
At least I got rid of /universe/public1

eon:125:/#sharemgr show -vp
default nfs=()
users nfs=() smb=()
zfs

Erwin
--
This message posted from opensolaris.org
Erwin Panen
2011-04-18 21:55:49 UTC
Permalink
Sorry misinterpreted your post;
Here goes

Erwin
--
This message posted from opensolaris.org
Erwin Panen
2011-04-19 20:24:20 UTC
Permalink
Hi Andre,

Have you been able to spot something in the 'out' attachment?

Thanks a lot,

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-04-20 13:13:14 UTC
Permalink
Hi lexje,

I was unable to come up with anything from the truss output. The zpool-poolname (zpool-universe) is a system spawned process, not sure it's possible to kill it.

Maybe, you could drop to single user mode and try the export.
--
This message posted from opensolaris.org
Erwin Panen
2011-04-20 20:04:35 UTC
Permalink
Hi,

I bit the bulet and just moved the hd to the new system & did a zpool import -f universe.
Worked a charm, it seemed to even autodiscover my shares (of the old system)
I don't think I fully grasp the link between hostname and zpool yet.

One of the things a stumble across is differences in user id between new and old.
What would be the 'preferred' and 'easiest' way to keep user id's and groups in sync accross machines?
Mind I'm in a fairly secure private home network, so don't like to overcomplicate.

Things I had in mind:
- run low power
- no specific need for a 'domain' ; a well defined workgroup may suffice
- on the other hand if it wouldn't take too much configuration I might run a ldap server on a NSLU2 with a usb stick??

Open to your suggestions!

Erwin
--
This message posted from opensolaris.org
Loading...