LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-04-2010, 01:31 PM   #1
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
ZFS not mounting iSCSI array on reboot


I'm making my first foray into ZFS with a spare iSCSI array. I have it all configured and working, but the filesystem is not being mounted on boot. Manually mounting (with zfs mount) works. I thought I had read that ZFS mounts things automatically and that I don't need to add a line to vfstab or anything. Is that right?

I don't see any errors in /var/adm/messages, where would ZFS log to?

I have a suspicion that iSCSI isn't up when ZFS starts, and that's why it's failing. If that's the case, how can I reorder startup / make ZFS depend on iscsi?
Code:
$ svcs -a | egrep "(zfs|iscsi)"
online         11:59:37 svc:/network/shares/group:zfs
online         11:59:42 svc:/network/iscsi/initiator:default

$ uname -a
SunOS a2 5.10 Generic_142900-03 sun4u sparc SUNW,Sun-Fire-V440

$ sudo zpool  list 
NAME           SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tek2510array   680G   219K   680G     0%  ONLINE  -

Last edited by AlucardZero; 02-04-2010 at 01:51 PM.
 
Old 02-05-2010, 06:07 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,760

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
What says
Code:
zpool status
?
 
Old 02-05-2010, 06:31 AM   #3
dev_dks
LQ Newbie
 
Registered: Jul 2006
Location: INDIA
Distribution: RHEL/SOLARIS 10/UBUNTU/CENTOS
Posts: 13

Rep: Reputation: 1
Hi,

I would suggest you First check the iscsi logs in

/var/svc/log/network-iscsi-initiator:default.log

/var/svc/log/system-iscsitgt:default.log

and try to find the exact reason, why the problem is occurring..

and check zpool status....
 
Old 02-05-2010, 10:56 AM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
$ /usr/sbin/zpool status
  pool: tek2510array
 state: ONLINE
 scrub: none requested
config:

        NAME                                       STATE     READ WRITE CKSUM
        tek2510array                               ONLINE       0     0     0
          raidz1                                   ONLINE       0     0     0
            c3t600A0B80004934C0000001B64B6AB47Ed0  ONLINE       0     0     0
            c3t600A0B80004934C0000001B84B6AB498d0  ONLINE       0     0     0
            c3t600A0B80004934C0000001BA4B6AB51Cd0  ONLINE       0     0     0
            c3t600A0B80004934C0000001BC4B6AB534d0  ONLINE       0     0     0
            c3t600A0B80004934C0000001BE4B6AB548d0  ONLINE       0     0     0

errors: No known data errors
$ /usr/sbin/zpool  list 
NAME           SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tek2510array   680G   110G   570G    16%  ONLINE  -
The array is fine, I can manually mount and use it, I just want it to mount on boot.

/var/svc/log/network-iscsi-initiator:default.log:
Code:
[ Feb  4 11:59:40 Executing start method ("/lib/svc/method/iscsid") ]
[ Feb  4 11:59:42 Method "start" exited with status 0 ]
/var/svc/log/system-iscsitgt:default.log doesn't exist.
 
Old 02-06-2010, 12:31 AM   #5
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,194

Rep: Reputation: 105Reputation: 105
What is the rest of your hardware setup? Is this direct connected or going through a switch? I'm not sure where to poke to see what your system is doing, but I have a similar setup that works, and the zpool and zfs come up at startup. I posted a rather long summary on the sunmanagers list of how I ended up setting it up. You might or might not find a clue by comparing it with your own notes -- http://www.sunmanagers.org/pipermail...er/008875.html
 
Old 02-06-2010, 09:48 AM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Oh? Yes, I used that post extensively, so thanks for it!

The array is connected directly to the host. Twice, even, as currently I have both controllers going to the same host.

I could always run "zfs mount -a" in rc.local (or equivalent startup script that runs late), but that's kind of hacky...

Last edited by AlucardZero; 02-06-2010 at 09:51 AM.
 
Old 02-06-2010, 04:01 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,760

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
Can you post "zpool status" output after a reboot ?
 
Old 02-08-2010, 11:08 AM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
$ uptime
 11:07am  up 26 min(s),  1 user,  load average: 0.01, 0.02, 0.05
$ sudo zpool list

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
NAME           SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tek2510array   680G   179G   501G    26%  ONLINE  -
$ sudo zpool status
  pool: tek2510array
 state: ONLINE
 scrub: none requested
config:

        NAME                                       STATE     READ WRITE CKSUM
        tek2510array                               ONLINE       0     0     0
          raidz1                                   ONLINE       0     0     0
            c3t600A0B80004934C0000001B64B6AB47Ed0  ONLINE       0     0     0
            c3t600A0B80004934C0000001B84B6AB498d0  ONLINE       0     0     0
            c3t600A0B80004934C0000001BA4B6AB51Cd0  ONLINE       0     0     0
            c3t600A0B80004934C0000001BC4B6AB534d0  ONLINE       0     0     0
            c3t600A0B80004934C0000001BE4B6AB548d0  ONLINE       0     0     0

errors: No known data errors
$ ls /tek2510array/
$ mount | grep tek2510
$
 
Old 02-08-2010, 03:49 PM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,760

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
Okay, so the pool is automatically imported. What command do you use to mount its associated filesystem ? After that, what says "zfs get all tek2510array" ?

Side question: Why are you using sudo instead of OpenSolaris pfexec ?
 
Old 02-08-2010, 03:55 PM   #10
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
What command do you use to mount its associated filesystem ? After that, what says "zfs get all tek2510array" ?
'zfs mount tek2510array' or 'zfs mount -a'.

Code:
$ sudo zfs get all tek2510array
Password:
NAME          PROPERTY              VALUE                  SOURCE
tek2510array  type                  filesystem             -
tek2510array  creation              Thu Feb  4 11:53 2010  -
tek2510array  used                  143G                   -
tek2510array  available             391G                   -
tek2510array  referenced            143G                   -
tek2510array  compressratio         1.59x                  -
tek2510array  mounted               yes                    -
tek2510array  quota                 none                   default
tek2510array  reservation           none                   default
tek2510array  recordsize            128K                   default
tek2510array  mountpoint            /tek2510array          default
tek2510array  sharenfs              off                    default
tek2510array  checksum              on                     default
tek2510array  compression           on                     local
tek2510array  atime                 on                     default
tek2510array  devices               on                     default
tek2510array  exec                  on                     default
tek2510array  setuid                on                     default
tek2510array  readonly              off                    default
tek2510array  zoned                 off                    default
tek2510array  snapdir               hidden                 default
tek2510array  aclmode               groupmask              default
tek2510array  aclinherit            restricted             default
tek2510array  canmount              on                     default
tek2510array  shareiscsi            off                    default
tek2510array  xattr                 on                     default
tek2510array  copies                1                      default
tek2510array  version               4                      -
tek2510array  utf8only              off                    -
tek2510array  normalization         none                   -
tek2510array  casesensitivity       sensitive              -
tek2510array  vscan                 off                    default
tek2510array  nbmand                off                    default
tek2510array  sharesmb              off                    default
tek2510array  refquota              none                   default
tek2510array  refreservation        none                   default
tek2510array  primarycache          all                    default
tek2510array  secondarycache        all                    default
tek2510array  usedbysnapshots       0                      -
tek2510array  usedbydataset         143G                   -
tek2510array  usedbychildren        4.85M                  -
tek2510array  usedbyrefreservation  0                      -
Quote:
Side question: Why are you using sudo instead of OpenSolaris pfexec ?
Because it's never come up before, I am used to typing sudo, and I manage systems of most flavors of Unix, all of which have sudo and only some of which have pfexec
 
Old 02-09-2010, 08:04 AM   #11
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,194

Rep: Reputation: 105Reputation: 105
x86 or SPARC? GigE?

I'm still not sure where to look. I'm going to be setting up and configuring some smf services at work today, and I will take a look at how the zfs and iscsi related services interact. I had a case once before where something didn't come up quite right every reboot. I changed the service dependencies in the xml file, re-imported it, and haven't had a problem since. Don't know if that might be related to your issues, but jlliagre might have a comment.
 
Old 02-09-2010, 09:02 AM   #12
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
SPARC and Gigabit, yes. If you could point me at where the xml files are and the command to reimport it, I'd like to look.
 
Old 02-10-2010, 08:57 AM   #13
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,194

Rep: Reputation: 105Reputation: 105
/var/svc/manifest/

You can prowl your way around a bit in the xml to see how it is structured. I've built a few new ones by starting with an existing one and copying it. There will be method sections that point to where the scripts are for stopping and starting things. Typically, that would be /lib/svc/method, though I've put my own in /usr/local.

man smf

and, of course, svcs and svcadm, and svccfg

It is svccfg which has the import option taking the xml file as its argument.

However, a quick look at my system didn't turn up any obvious tweak that you could do there. svcs shows zfs sharing services, but not zfs itself.
 
Old 02-10-2010, 09:46 AM   #14
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
I made ZFS depend on iSCSI with the following process from the SMF FAQ, and it seems to have worked (came back after a reboot).

Code:
$ sudo svccfg
Password:
svc:> select zfs
svc:/network/shares/group:zfs> addpg zfs-iscsi dependency
svc:/network/shares/group:zfs> setprop zfs-iscsi/grouping = astring: "require_all"
svc:/network/shares/group:zfs> setprop zfs-iscsi/restart_on = astring: "none"
svc:/network/shares/group:zfs> setprop zfs-iscsi/type = astring: "service"
svc:/network/shares/group:zfs> setprop zfs-iscsi/entities = fmri: "svc:/network/iscsi/initiator"
svc:/network/shares/group:zfs> exit
$ sudo svcadm refresh zfs


$ svcs -d zfs
STATE          STIME    FMRI
online         Feb_08   svc:/milestone/network:default
online         Feb_08   svc:/system/filesystem/local:default
online         Feb_08   svc:/network/iscsi/initiator:default
 
Old 02-11-2010, 11:55 AM   #15
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Original Poster
Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
scratch that, I was looking at the wrong mount.

I ended up making /etc/rc3.d/S99local which contained "/sbin/zfs mount -v -a".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changes on other iscsi nodes attached to an ext3 iscsi target not being seen sldahlin Linux - Server 1 06-07-2008 03:02 AM
ZFS Root / Boot into ZFS from a usb flash drive Kataku Solaris / OpenSolaris 1 07-15-2006 05:13 AM
software Firewire 800 RAID array loses formatting on reboot monty Linux - Hardware 3 11-30-2004 12:14 AM
RAID array not work after reboot smartsupport Linux - Hardware 0 11-19-2003 06:02 PM
Mounting a SCSI Array scottpioso Linux - Hardware 5 06-03-2003 09:02 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 10:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration