Tuesday, February 9, 2010

ZFS Raid10

Creating a Mirrored Storage Pool

To create a mirrored pool, use the mirror keyword, followed by any number
of storage devices that will comprise the mirror. Multiple mirrors can be
specified by repeating the mirror keyword on the command line. The
following command creates a pool with two, two-way mirrors:

# zpool create tank mirror c1d0 c2d0 mirror c3d0 c4d0

The second mirror keyword indicates that a new top-level virtual device is
being specified. Data is dynamically striped across both mirrors, with data
being replicated between each disk appropriately.

Saturday, February 6, 2010

ZFS snapshot

machine0$ zfs snapshot mypool/myfs@now
machine0$ zfs send mypool/myfs@now > myfile
machine1$ zfs receive anotherpool/anotherfs@anothersnap < myfile

machine0$ zfs send mypool/myfs@now | ssh machine1 zfs receive anotherpool/anotherfs@anothersnap

Remove snapshot
zfs list -H -t snapshot
zfs destroy extra/backup@now

Tuesday, December 29, 2009

Windows recognised iscsi drive as RAW (no longer as NTFS)

After connecting my iscsi F-drive from one pc to another it was no longer recognised being formatted as NTFS so Windows asked if I wanted to format the F-drive (strange because I did not touch the data ...)
I went to the command prompt and did:
D:\> CONVERT F: /fs:ntfs
Where F: is a name of the drive you want to convert. It reported back that the drive was already NTFS.
I than ran: chkdsk F: /F which fixed it. After that it was immediately accessible as a normal Drive including all the data.

Monday, December 28, 2009

realtime monitoring your zfs pool

I use the following command to see real time transaction per 5 sec on my pool extra:
# zpool iostat -v extra 5
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
extra       8.87G  28.4G    134      0  9.47M      0
  c7d0      8.87G  28.4G    134      0  9.47M      0
----------  -----  -----  -----  -----  -----  -----
(note: this was during a file copy over 100Mb/s LAN, reaching the max throughput of such a LAN)

To check local disk performance on my zpool I used:
# time (mkfile 2g /extra/foo)
real    2m7.349s
user    0m0.017s
sys     0m1.247s
(this creates a random file foo of 2GB  in my zpool extra and shows the time to complete)

Sunday, December 27, 2009

package manager failed with update from snv_129 to snv_130

I had my pkg publishers as followed:
dev                   http://pkg.opensolaris.org/dev/   
opensolaris.org  http://pkg.opensolaris.org/release/

But this just results in pkg refresh failing:
-To correct the repository origin, execute the following command as a privileged user:

pkg set-publisher -O opensolaris-dev

To add a new publisher using this publisher's repository origin, execute the following command as a privileged user:

pkg set-publisher -O http://pkg.opensolaris.org/dev/

After the new publisher has been added, this one should be removed by executing the following command as a privileged user:

pkg unset-publisher opensolaris-dev


I tried to follow the suggestions but to no avail.
Then I read it was mentioned to have only 1 publisher opensolaris.org as Preferred and delete dev resulting in the following pkg publisher:
opensolaris.org   http://pkg.opensolaris.org/dev/ 

But still the package manager failed to upgrade to 130 as did pkg refresh
In the forum (http://www.pubbs.net/opensolaris/200912/32545/) it was mentioned to use "pkg image-update -f"  due to errors related to release snv-128 and 129 (Option -f bypasses SUNWipkg)

Update succeeded to 130.

Friday, December 18, 2009

3com 3C200-T Gigabit network card (tcge)

I was not happy with the throughput using the onboard NIC so I installed the 3com Gigabit NIC which supports jumbo frames. NIC is not recognized by OS as standard so you have to get the driver from Asustek:
http://dlsvr01.asus.com/pub/ASUS/lan/3com/3c940/046_Solaris.zip

Just follow the instructions provided and your NIC will be recognized and fully functional.

Thursday, December 17, 2009

iscsi performance

Besides the settings mentioned in the iSCSI uguide from Microsoft: Setting TcpAckFrequency =1

Someone mentioned lack of performance was solved by disabling the "receive Windows auto tuning". See: http://support.microsoft.com/kb/947239