Version 1 (modified by aydan, 11 years ago)


ZFS Server Installation and Configuration

1. Install OpenSolaris?. OpenSolaris? will create a default zfs pool called rpool.

2. You must create the following ZFS hierarchy:

zfs create rpool/images zfs create rpool/images/orca zfs create rpool/images/orca/base --> will contain templates zfs create rpool/images/orca/clone --> will contain cloned fs images

3. You must enable nfs sharing over rpool/images/orca

zfs set sharenfs=rw=@,root=@ rpool/images/orca

This command enables mount (and root mount) from

4. Create a user sharp on the zfs server

to create the user:

useradd -d /export/home/sharp -m -s /bin/bash sharp

to set a password for the user

passwd sharp

5. Generate a keypair for user sharp and anable paswordless ssh login

Login as sharp and invoke:

ssh-keygen -b 1024 -t dsa

select the default location when prompted for key password press enter (no password)

cd ~/.ssh cat > authorized_keys

to test your setup:

ssh localhost

this command should succeed without requiring a password

6. Copy /root/.ssh/id_dsa* to your build machine

--- enable user sharp to invoke zfs

1. add this to ~sharp/.profile

export PATH=${PATH}:/usr/sbin/

2. as root install sudo:

wget wget wget wget

gunzip sudo-1.6.9p18-sol10-x86-local.gz gunzip libintl-3.4.0-sol10-x86-local.gz gunzip libiconv-1.11-sol10-x86-local.gz gunzip libgcc-3.3-sol10-intel-local.gz

pkgadd -d sudo-1.6.9p18-sol10-x86-local pkgadd -d libintl-3.4.0-sol10-x86-local pkgadd -d libiconv-1.11-sol10-x86-local pkgadd -d libgcc-3.3-sol10-intel-local

answer yes to all prompts during the installation

#create links ln -s -f /usr/local/bin/sudo /usr/bin/sudo ln -s -f /usr/local/etc/sudoers /etc/sudoers

invoking sudo should produce output similar to this one:

-sh-3.2$ sudo usage: sudo -K | -L | -V | -h | -k | -l | -v usage: sudo [-HPSb] [-p prompt] [-u username|#uid]

{ -e file [...] | -i | -s | <command> }

# make /etc/sudoers writable chmod u+w /etc/sudoers

#edit /etc/sudoers and add the following line

sharp ALL=NOPASSWD:/usr/sbin/zfs


chmod 0440 /etc/sudoers

login as sharp and test with the following command: sudo zfs list