Vivek Joshi's Weblog

Monday Mar 10, 2008

Making NAS out of Solaris (Part 1)

It's quite simple to create a NAS box from Open Solaris (Build 79+) ...

I tried following test on my laptop where I have a few GBs available i.e. no partition on it. I created a Solaris2 partition on it using 'fdisk' ... It was marked at partition 4 (p4). I run following commands to create CIFS share,

(a) Create a zpool
bash-3.2# zpool create tank /dev/dsk/c2t0d0p4
bash-3.2# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.28G 111K 2.28G 0% ONLINE -

(b) Create zfs shares ...
bash-3.2# zfs create tank/music
bash-3.2# zfs create tank/movies
bash-3.2# zfs create tank/pics
bash-3.2# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.28G 220K 2.28G 0% ONLINE -
bash-3.2# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 184K 2.25G 22K /tank
tank/movies 18K 2.25G 18K /tank/movies
tank/music 18K 2.25G 18K /tank/music
tank/pics 18K 2.25G 18K /tank/pics

(c) Create CIFS shares ...
bash-3.2# sharemgr create -P smb vbj
bash-3.2# sharemgr add-share -r music-for-win -s /tank/music vbj
bash-3.2# sharemgr show vbj
vbj
/tank/music
bash-3.2#

From Windows, you can connect to \\Solaris-host\music-for-win ...

But what to do next? Create a mapping policy before you connect from Windows box. That'll be in next blog entry. Look at idmap (1M) manual page for details about the mapping.

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers