Discussion:
relocating zfs pool to new machine - QUESTION
Erwin Panen
2011-06-09 08:21:46 UTC
Permalink
Hi,

Running EON cifs version.
I've relocated an existing zfs pool (universe/data)
In order to be able to connect to the cifs share on this pool, I have to issue:
"zfs set sharesmb=name=old_eon universe/data"

Now I have to issue this command after each system boot.
How do I go about to have sort of auto enable this relocated zpool?
I've tried running updimg.sh, but the change won't stick after reboot.

Thanks for your help!

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-06-09 13:34:11 UTC
Permalink
Hi Erwin,

That info should be stored as part of the on disk format and shouldn't require updimg.sh (AFAIK).

Can you do a zfs get all on the dataset the before issuing that command the next time you reboot?
--
This message posted from opensolaris.org
Andre Lue
2011-06-09 13:45:00 UTC
Permalink
Hi Erwin,

I think I know what's going on. Can you post "cat /etc/dfs/sharetab" before and after your command also?
--
This message posted from opensolaris.org
Erwin Panen
2011-06-11 09:56:44 UTC
Permalink
Andre, thanks for looking into this :-)
Here you are, see attached.

Erwin
--
This message posted from opensolaris.org
Erwin Panen
2011-06-11 09:58:09 UTC
Permalink
And the last file.. (limit of 5 attachments)
--
This message posted from opensolaris.org
Andre Lue
2011-06-11 17:31:20 UTC
Permalink
Hi Erwin,

Can you check if /mnt/eon0/.backup contains a "/etc/dfs/sharetab" entry?
--
This message posted from opensolaris.org
Erwin Panen
2011-06-12 16:50:15 UTC
Permalink
Hmmm,

Apparently not..
-------------------
miniserve:3:~#grep 'dfs' /mnt/eon0/.backup
/etc/dfs/dfstab
-------------------

Neither does my other EON based system:
-------------------
library:1:~#grep 'dfs' /mnt/eon0/.backup
/etc/dfs/dfstab
library:2:~#
-------------------

I also seem to have lost my binary kit somehow.. Unable to use nano..
/usr/local points to
lrwxrwxrwx 1 root root 16 Jun 11 01:39 local -> ../../nas1/local
which does not exist anymore;

I guess I have removed nas1 somehow during the relocation exercise.
Fyi: I'm working on the Asus AT4NM10-I mobo, and I'm really lacking sata ports. (the Supermicro AOC-SAT2-MV8 is not recognised on its PCI slot, whereas it is recognised on my AsRock ALiveNF7G-HDready, maybe something to do with voltages??)

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-06-12 23:21:36 UTC
Permalink
Hi Erwin,

Add a "/etc/dfs/sharetab" entry right below the "/etc/dfs/dfstab" line.

Edit /mnt/eon0/.exec and make sure the POOL name at the top of the file is defined correctly to the pool that stores /usr/local.

I'm not sure what may be going on with the AOC SAT2-MV8. One thing you might do as a test is boot with the original image, also try running devfsadm.
--
This message posted from opensolaris.org
Erwin Panen
2011-06-13 21:14:57 UTC
Permalink
Hi Andre,

Thanks for your help.
Upon reflection I think I just removed/unplugged the 2nd harddisk due to the Asus mobo only having 2 sata connections. So that's very probably the reason I lost my binary kit. I'll try to figure a way to connect this disk via usb.

Regarding the AOC SAT2-MV8, I'm fairly confident it must have something to do with voltages being indisposable on the low power Atom mobo. (3.3V <-> 5V) Not sure though.

The bad news is that adding the line /etc/dfs/sharetab does not resolve the problem of the smb share being available after rebooting...

Any other ideas?

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-06-13 22:11:04 UTC
Permalink
After adding the entries did you run updimg.sh and reboot ?
--
This message posted from opensolaris.org
Erwin Panen
2011-06-14 16:08:50 UTC
Permalink
I've rechecked and before running updimg.sh; /etc/dfs/sharetab was there allright;
Next ran updimg.sh & reboot
=> Still no old_eon smbshare...

Next I've rerun the previous checks which you'll find attached.

What I strikes me as odd (but I can't judge) is when doing zfs get all,
I see this line standing out differently:
universe/data sharesmb name=old_eon local

In all the other lines the source = default instead of local???
What does this mean?
--
This message posted from opensolaris.org
Erwin Panen
2011-06-14 16:10:11 UTC
Permalink
And the last one.

Thanks for sticking with me!

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-06-15 03:15:39 UTC
Permalink
Hi Erwin,

default just means the property was never explicitly set
local means the property was set using "zfs set"

It does not look like /etc/dfs/sharetab is getting updated. Note sharetab_3 and sharetab_4 still differ by that same entry.

diff sharetab_3 sharetab_4
1a2
/universe/data - smb ""
Is there something else mounted as /mnt/eon0 or another USB key in the machine?
--
This message posted from opensolaris.org
Erwin Panen
2011-06-15 16:33:12 UTC
Permalink
Hi Andre,

No other usb sticks.
Here's a listing of mount:
-------------------
miniserve:1:~#mount
/ on /devices/ramdisk:a read/write/setuid/devices/intr/largefiles/xattr/onerror=panic/dev=1180001 on Wed Jun 15 09:10:57 2011
/devices on /devices read/write/setuid/devices/dev=4b40000 on Wed Jun 15 09:10:53 2011
/dev on /dev read/write/setuid/devices/dev=4b80000 on Wed Jun 15 09:10:53 2011
/system/contract on ctfs read/write/setuid/devices/dev=4c00001 on Wed Jun 15 09:10:53 2011
/proc on proc read/write/setuid/devices/dev=4bc0000 on Wed Jun 15 09:10:53 2011
/etc/mnttab on mnttab read/write/setuid/devices/dev=4c40001 on Wed Jun 15 09:10:53 2011
/etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4c80001 on Wed Jun 15 09:10:53 2011
/system/object on objfs read/write/setuid/devices/dev=4cc0001 on Wed Jun 15 09:10:53 2011
/etc/dfs/sharetab on sharefs read/write/setuid/devices/dev=4d00001 on Wed Jun 15 09:10:53 2011
/lib/libc.so.1 on /usr/lib/libc/libc_hwcap1.so.1 read/write/setuid/devices/dev=1180001 on Wed Jun 15 09:10:56 2011
/dev/fd on fd read/write/setuid/devices/dev=4e40001 on Wed Jun 15 09:10:57 2011
/mnt/eon0 on /dev/dsk/c0t0d0s0 read/write/setuid/devices/intr/largefiles/xattr/noatime/onerror=panic/dev=6c0000 on Wed Jun 15 09:11:00 2011
/tmp on swap read/write/setuid/devices/xattr/dev=4c80002 on Wed Jun 15 09:11:01 2011
/var/run on swap read/write/setuid/devices/xattr/dev=4c80003 on Wed Jun 15 09:11:01 2011
/pool1 on pool1 read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90002 on Wed Jun 15 09:11:18 2011
/pool1/audio on pool1/audio read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90003 on Wed Jun 15 09:11:18 2011
/pool1/edu_video on pool1/edu_video read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90004 on Wed Jun 15 09:11:18 2011
/universe on universe read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90005 on Wed Jun 15 09:11:21 2011
/universe/data on universe/data read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90006 on Wed Jun 15 09:11:21 2011
/universe/local on universe/local read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90007 on Wed Jun 15 09:11:21 2011
/universe/public on universe/public read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90008 on Wed Jun 15 09:11:21 2011
---------------------------------------

This is a listing of:
---------------------------------------
miniserve:2:~#echo | format -e
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0t0d0 <DEFAULT cyl 3817 alt 2 hd 128 sec 32>
/***@0,0/pci1043,***@1d,7/***@1/***@0,0
1. c1t0d0 <ATA-SAMSUNG HD204UI-0001-1.82TB>
/***@0,0/pci1043,***@1f,2/***@0,0
2. c1t1d0 <ATA-SAMSUNG HD103SI-1113-931.51GB>
/***@0,0/pci1043,***@1f,2/***@1,0
Specify disk (enter its number): Specify disk (enter its number):
----------------------------------------
c0t0d0 = usb EON boot stick
the other 2 is pool1 and universe

I'll check later on the diffs.

Thank you,

Erwin
--
This message posted from opensolaris.org
Erwin Panen
2011-06-27 17:54:32 UTC
Permalink
Hi Andre,

Sorry to bug you :-)
Do you have any more suggestions to solve this issue, or would it be best to just create a new EON-stick?

Thanks a lot!

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-07-02 21:55:48 UTC
Permalink
Hi Erwin,

No bug at all. You will need 2 ssh sessions to your EON server.

If you don't have ssh you can follow method 2 in this post (http://eonstorage.blogspot.com/2009/02/adding-your-own-drivers-to-eon.html) if you plan to run it from the EON console.

1 edit /usr/bin/updimg.sh and insert the echo line below before undo_mnt_lofs

echo -n "Press enter to continue after adding drivers " ; read x
undo_mnt_lofs

2 save and run updimg.sh, when you see the "Press enter ... message, use the 2nd ssh session and
cd /mnt/upd/etc/dfs

3 paste the contents of
cat /etc/dfs/sharetab

It should look like this.
/pool1/audio - smb ""
/universe/data - smb ""
/pool1/edu_video - smb ""
--
This message posted from opensolaris.org
Erwin Panen
2011-07-17 10:47:33 UTC
Permalink
Hi Andre,

Thx for your post; I didn't notice before, hence my unresponsiveness..
I've tried to do what you suggested:
- ssh session 1: modify updimg.sh -> run updimg.sh, let it wait at the prompt
- ssh session 2: cd /mnt/upd

Unfortunately this yields: "No such file or directory"

For sanity's sake I tried the same on my 2nd eon based server (library).
With the same results.

However, when I let updimg.sh pursue, it states:
unmounting ... /mnt/upd in its messages

So I have the impression upd doesn't get mounted in the first place..

I've attached some screenshots..
Wonder what's going on..
Thanks for your continuing support.

Erwin
--
This message posted from opensolaris.org
Erwin Panen
2011-07-17 11:23:20 UTC
Permalink
Please disregard my previous post. (I've not deleted it for completeness sake)

I went throught the updimg.sh file and understood I had inserted the 'wait' line in the wrong place. (multiple unod_mnt_lofs)
I corrected and repeated, this time it worked as expected.
Here's a paste:

login as: admin
Using keyboard-interactive authentication.
Password:
Last login: Sun Jul 17 04:16:24 2011 from 192.168.80.107
Sun Microsystems Inc. SunOS 5.11 snv_130 November 2008
miniserve:1:~>cd /mnt/upd/etc/dfs/
miniserve:2:/mnt/upd/etc/dfs>cat sharetab
/pool1/audio - smb ""
/pool1/video - smb ""
/pool1/edu_video - smb ""
miniserve:3:/mnt/upd/etc/dfs>

As you can see the "universe/data" is missing..
(fyi I rebooted miniserve so it would be in 'virgin' after boot state before doing the paste)

Looking forward to continuing to solve this issue.
Erwin



Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-07-20 18:13:20 UTC
Permalink
Hi Erwin,

Based on what you reported it does not seem like /etc/dfs/sharetab is getting preserved even though you have it .backup

Using the process I gave u with the pause, copy the updated one manually and let the update continue. Then report back if that fixes the problem.

also kindly double check the .backup /etc/dfs/sharetab entry.
--
This message posted from opensolaris.org
Erwin Panen
2011-07-20 23:41:48 UTC
Permalink
Hi Andre,

I'm not sure I fully understand.
To recap:

1. fresh boot
2. ssh session 1 into EON / miniserve
3. run updimg.sh with pause prompt

4. ssh session 2 into EON / miniserve
5. copy [[/universe/data - smb "" ]] into /etc/dfs/sharetab

6. on ssh session 1 - press enter to continue
7. check smb availabiltiy

Thanks for confirming / checkint,

Erwin
--
This message posted from opensolaris.org
Andre Lue
2011-07-21 13:34:29 UTC
Permalink
Hi Erwin,

No need to reboot. The system should be up and running with your last reported correct state of /etc/dfs/sharetab being:
/pool1/audio - smb ""
/universe/data - smb ""
/pool1/edu_video - smb ""

Now manually copy this correct /etc/dfs/sharetab into the preserved image at the updimg.sh pause, as it doesn't seem like its getting updated.
cp /etc/dfs/sharetab /mnt/upd/etc/dfs/sharetab
and verify it after the copy or report any errors. Complete the image update and reboot with that new image.

When the new image boots it should have the correct /etc/dfs/sharetab and report what happens.
--
This message posted from opensolaris.org
Erwin Panen
2011-07-22 18:52:11 UTC
Permalink
Hi Andre,

Thanks for clarifying. Believe it or not, but it does not work...
I opened up 2 ssh sessions, here is a listing of what I did on console 2:
----------------------------------------------------------
miniserve:3:~#zfs set sharesmb=name=old_eon universe/data
miniserve:4:~#cat /mnt/upd/etc/dfs/sharetab
cat: cannot open /mnt/upd/etc/dfs/sharetab: No such file or directory
miniserve:5:~#cat /etc/dfs/sharetab
/pool1/audio    -       smb     ""
/universe/data  -       smb     ""
/pool1/video    -       smb     ""
/pool1/edu_video        -       smb     ""
miniserve:6:~#cat /mnt/upd/etc/dfs/sharetab
/pool1/audio    -       smb     ""
/universe/data  -       smb     ""
/pool1/video    -       smb     ""
/pool1/edu_video        -       smb     ""
miniserve:7:~#cp /etc/dfs/sharetab /mnt/upd/etc/dfs/sharetab
miniserve:8:~#cat /mnt/upd/etc/dfs/sharetab
/pool1/audio    -       smb     ""
/universe/data  -       smb     ""
/pool1/video    -       smb     ""
/pool1/edu_video        -       smb     ""
----------------------------------------------------------------------
So as you can clearly see the /mnt/upd/etc/dfs/sharetab file DOES contain the extra /universe/data line.
However after booting, the share is just not there....

I doublechecked the .backup /etc/dfs/sharetab entry, it's there allright..

As far as I understand the mountpoint of a pool is contained in a dataset's metadata. Also owner and group is stored to a pool if I'm correct.

Could it not be that some of these metadata don't comply with the current machine the pool is mounted on?

Erwin
--
This message posted from opensolaris.org
nnc tlb
2011-07-20 02:59:57 UTC
Permalink
hello,

I had a similar problem even without relocacting a pool to a new machine.
(running 0.600 b130 cifs min x64)

I changed something on "tank9x2" via zpool-command and strangely a zfs-share on "tank_xm" was no longer available for the windows-clients.
even it shows up under sharemgr show -vp and the zfs property is on
T5600:1:~#sharemgr show -vp
default nfs=()
zfs
zfs/tank9x2/consumer smb=()
S16=/tank9x2/consumer
zfs/tank_xm/consumer smb=()
S3=/tank_xm/consumer

T5600:2:~#zfs get sharesmb tank_xm/consumer
NAME PROPERTY VALUE SOURCE
tank_xm/consumer sharesmb name=S3 local

even after adding "/etc/dfs/sharetab" to /mnt/eon0/.backup and editing "sharetab" during modified updimg.sh-run, the second entry is missing after reboot (it was there during paused updimg and second ssh)
T5600:3:~#more /etc/dfs/sharetab
/tank9x2/consumer - smb ""

I still have to manually do a:
T5600:4:~#zfs share -a

then the share is available and listed in sharetab

T5600:5:~#more /etc/dfs/sharetab
/tank9x2/consumer - smb ""
/tank_xm/consumer - smb ""

or I can unset and set the zfs-property again, does also the trick.
(zfs set sharesmb=off tank_xm/consumer
zfs set sharesmb=name=S3 tank_xm/consumer)

current workaround for me, adding:

/usr/sbin/zfs share -a
to /mnt/eon0/.exec
--
This message posted from opensolaris.org
Loading...