Saturday, December 1, 2012

Openelec on ASRock VisionX

Install

Installed openelec 3.0 beta 1 with two USB thumb drives - one primed with the installer, the other blank, plugged in after booting the installer, and installed onto.

Network

Setting up wifi (system -> openelec -> network) was fairly straightforward, the main pain point was that changing the options in the menu had no immediate effect. Once I realized that it is necessary to reboot after every change to network configuration things got sensible and was up and running with wifi (using device wlan0) in no time. SSH access: on first boot, after plugging in an ethernet cable, I was able to ping, ssh, and guess the username and password. However the settings for "run ssh server" weren't checked, so I checked "run ssh server" and "disable password authentication". However after doing this, any attempt to ssh in was met with "Permission denied (publickey,keyboard-interactive)." so I unchecked "disable password authentication" and after a reboot I was able to connect again.

Unicode

Next problem: lack of unicode. In 2012, anything that ships without support for international languages should be considered broken. Perhaps there is a reason for this situation (font licensing costs?) but it's a bit embarrassing at this point that it hasn't been sorted out. In fact, even people looking for support in the forums were coming up emptyhanded! The post at http://openelec.tv/forum/72-xbmc/27400-unicode-support gave me an idea of where to start.
root ~ # mkdir /storage/.xbmc/userdata/fonts root ~ # cp Arial\ Unicode.ttf /storage/.xbmc/userdata/fonts/arialuni.ttf root ~ # ls -l /storage/.xbmc/userdata/fonts/arialuni.ttf -rwxr-xr-x 1 root root 23278008 Nov 28 22:13 /storage/.xbmc/userdata/fonts/arialuni.ttf
Under the Confluence skin settings I changed Fonts to "Arial based". After this, unicode characters started to be displayed! I actually have no idea whether copying the old standby arial unicode was even necessary. It is a significantly larger filesize than the arial font included with openelec, so there is a good chance it includes more characters. It worked fine until I rebooted. After rebooting, all my labels were blank! I had to use screenshots from the xbmc wiki to navigate the text-free settings menus and change the font back to skin default! Cycling through the fonts, the default and no-caps-default both worked, but selecting "arial-based" causes the labels to go blank. Before reboot:
root ~ # ls -l /usr/share/xbmc/media/Fonts/// total 5048 -rw-r--r-- 1 root root 633604 Nov 25 15:09 DejaVuSans.ttf -rw-r--r-- 1 root root 123096 Nov 25 15:09 Trebuchet MS Bold.ttf -rw-r--r-- 1 root root 83980 Nov 25 15:09 YanoneKaffeesatz-Bold.ttf -rw-r--r-- 1 root root 4221580 Nov 25 15:09 arial.ttf -rw-r--r-- 1 root root 105344 Nov 25 15:09 teletext.ttf
After reboot:
root ~ # ls -l /usr/share/xbmc/media/Fonts/ total 22736 -rwxr-xr-x 1 root root 23278008 Nov 28 22:13 arialuni.ttf
It seems that the folder I created, /storage/.xbmc/userdata/fonts, was pulled into the readonly filesystem at reboot and overwrote the full collection of fonts! The missing fonts seem to be gone for good:
root ~ # find / | grep ttf /storage/Arial Unicode.ttf /storage/.xbmc/userdata/fonts/arialuni.ttf /usr/share/fonts/liberation/LiberationMono-Bold.ttf /usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf /usr/share/fonts/liberation/LiberationMono-Italic.ttf /usr/share/fonts/liberation/LiberationMono-Regular.ttf /usr/share/fonts/liberation/LiberationSans-Bold.ttf /usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf /usr/share/fonts/liberation/LiberationSans-Italic.ttf /usr/share/fonts/liberation/LiberationSans-Regular.ttf /usr/share/fonts/liberation/LiberationSerif-Bold.ttf /usr/share/fonts/liberation/LiberationSerif-BoldItalic.ttf /usr/share/fonts/liberation/LiberationSerif-Italic.ttf /usr/share/fonts/liberation/LiberationSerif-Regular.ttf /usr/share/xbmc/addons/skin.confluence/fonts/Roboto-Bold.ttf /usr/share/xbmc/addons/skin.confluence/fonts/Roboto-Regular.ttf /usr/share/xbmc/media/Fonts/arialuni.ttf
This also suggests that

  1. My previous attempt to install arialuni had no effect
  2. The arial font included has pretty good support for foreign characters, so for most users simply selecting "arial-based" as the skin font should be sufficient
  3. By naming any unicode font to arial.ttf we can cause it to overwrite the original and thereby use any font we desire
  4. Some things on openelec require a reboot, some don't, it is hard to know which is which, and if you are trouble-shooting you may be better off rebooting every step of the way to ensure you're actually observing the effects of any change you made.

So, one more try:
root ~ # mv /storage/.xbmc/userdata/fonts/arialuni.ttf /storage/.xbmc/userdata/fonts/arial.ttf
and reboot, Settings -> Appearance -> Skin -> Fonts -> Arial based

It works, after 2 seconds the menu redraws with Arial, and browsing my international content all the extended characters show up. The other fonts seem to be lost for good, but it hasn't hurt my experience yet. If you find the need to install a custom font, I would start by copying everything from /usr/share/xbmc/media/Fonts/ into /storage/.xbmc/userdata/fonts/ so that you don't lose any of them. Just in case they turn out to be useful someday.

Confirming that the old standby ultra-complete unicode font I added is being used:
root ~ # ls -l /usr/share/xbmc/media/Fonts/ total 22736 -rwxr-xr-x 1 root root 23278008 Nov 28 22:13 arial.ttf

Adding network shares

System -> File manager -> Add source -> Browse -> SMB -> browse for net shares, select desired folder, edit name, etc

However after the above, they still did not appear as media sources. So next up was

Videos -> Files -> Add videos... -> Browse -> as above

Attempting to set the media type, I opted to browse the available scrapers, and trying to cancel that I backed out (probably by ESC) and found that the folder had been added with whatever default settings it had. Adding NFS sources was similar, except that I had to type in the locations, e.g.

Add Video Source -> Browse -> Add network location... -> "nfs://10.0.1.50/mediapool/media"

after which it shows up as a source when I Browse, and I could browse within that hierarchy and select the folders I wanted to add with various names.

Audio

Audio didn't work. Actually, it did seem to work via the analog out that was set up by default, but I preferred to send it over HDMI.

Settings -> System -> Audio output -> Audio output -> HDMI Audio output device -> HDA ATI,
HDMI Passthrough output device -> HDA ATI, HDMI

Blu-ray images

System seems to have no problem playing e.g. 1080p mkv files, but playing blu-ray files results in about 2fps performance. All available hardware decoding options are checked. Software vs. hardware decoding yields same results.

http://forum.xbmc.org/showthread.php?tid=129509&page=2 - many people are reporting that choppy/slow blu-ray playback is due to the new audio engine in XBMC. According to their advice, selecting AC3 rather the HD audio did improve playback to mostly smooth with some painful slowdowns now and then. Still not at the point where I can actually watch a BD image, but getting closer.

At some point after trying out different settings even normal DVD were stuttering.

After upgrading to openelec 3.0 beta 2 and taking the advice at http://forum.xbmc.org/showthread.php?tid=145277&pid=1239524#pid1239524 to enable all advanced format options (WASAPI is not relevant so I left output HDMI) and check video settings, everything seems to play smoothly. It does sometimes pause for buffering, I assume this is due to the high bandwidth I'm trying to push over wifi and should go away if I switch to a cable.

TBD

Doesn't auto-play video folders

My files are organized thusly:

Movies/Genre/Title - Director - Year - Misc/VIDEO_TS
Movies/Genre/Title - Director - Year - Misc/movie.iso

I should be able to click on a folder to play the movie within. Currently I have to click on the .iso file, or on the VIDEO_TS file and then on the correct IFO file within! Absolutely, a VIDEO_TS folder should be considered a target. And if a folder contains only a single video target (and perhaps a few image or .nfo files) that folder should play when clicked on. There is a similar problem at XBMC toplevel - I have to select video, then files, before I can even start browsing. I would like to have my video sources and audio sources listed right at the toplevel. Overall it take me perhaps 8 clicks to play something when it should only take 4. Playing things from "library" rather than "files" context might help this. Enabling "stack" option might help this. Enabling stacking helps somewhat, but also introduces new problems. For instance, if I have a few .iso files laying around in a high-level directory full of folders with different movie collections, stacking treats that high-level folder as a target and plays when I click on it. So I either have to turn off stacking, or audit my filesystem for loose .iso and VIDEO_TS instances and put them all inside their own folders. Default stacking doesn't seem to be quite smart enough to behave properly in a typical real-word disorganized collection.

Browsing a certain folder causes XBMC to hang

Will debug by splitting the difference until I figure out what in that folder is causing the problem. TBD TBD

Saturday, March 5, 2011

EON NAS ZFS troubleshooting log

Sometimes it will not boot - stuck at "verifying DMI pool" - this is a sign that boot device is not found/working. Check bios - sometimes TRANSCEND (CF card) loses its place in the boot priority list. May require reseating CF card.


NOTED: mar 5 2011 - one drive was offline. c0t1d0 ?? after replugging cables, it came back online. however if this keeps happening, drive might be dodgy

aug 2 2011 - drive / pool access was hanging, even after reboot. opened case and wiggled sata cables to make sure they were tight. pool back online after bootup. c3t4d0 needed resilvering


Dec 10 2011 - Volume was dropped (2 drives lost?) while copying data off of it.

Boot log:

Mem test
Detecting IDE drives ...
Detecting IDE drives ...



Serial ATA AHCI BIOS etc
Please wait...
Controller Bus#00, Device #1F (??)
Port-00: Hitachi
Port-01: ST32etc...
Port-02: Hitachi
Port-03: ST32
Port-04: ST32
Port-05: No device detected
AHCI BIOS installed


GIGABYTE Technology Corp. PCIE-to-SATAII/IDE RAID Controller
HD00: Hitachi
HD01: ST32

Sil 0600 ATA/133 Controller BIOS
Drive number: B TRANSCEND



Boot completes. zpool status shows:

DEGRADED
status: one of more devices has experienced an error resulting in data corruption.
action: Restore the file in question if possible. Otherwise restore the entire pool from backup
config:
mediapool DEGRADED
raidz2-0 DEGRADED
c0t0d0 ONLINE
c0t1d0 ONLINE
081420 FAULTED was /dev/dsk/c2t2d0s0
203842 FAULTED was /dev/dsk/c2t3d0s0
c2t0d0 ONLINE
c2t1d0 ONLINE
c2t2d0 ONLINE
c2t3d0 ONLINE
c2t4d0 ONLINE

errors: 1 data errors, use -v for list



zpool status -v:

/mediapool/media/etc/etc/Dragonzakura - ep09 (704x396) [RAW].avi

The good news is that the pool seems to be (barely!) safe, and the one file in question is clearly indicated (maybe I was deleting offloaded files when disks dropped offline??)

Shutdown, open case. Clearly, all the builtin-ports are working, both by the numbers and drive types. Not surprisingly, the missing drives are on the Addonics 3rd-party PCI card (which has two hitachis attached). In the past I reseated, but that shouldn't really be necessary.

Poking around in BIOS, there is no way to list PCI devices that I see, but hard drive boot order included the TRANSCEND CF card device (a PCI expansion) but lists only the 7 SATA drives above - no sign of the missing two drives on Addonics expansion card.

Reseated PCI card, booted - all drives back online, resilvered, no known data errors (presumably that means the one video file was checked against restored parity bytes and found to be correct?)

Resolved: need to replace card, or better yet find a drop-in replacement for motherboard with more SATA ports.


Problem: Windows mount of EON system has permissions to write new files, but certain existing folders can't be written to, and certain folder can't be moved. Windows' "file properties" shows "read-only" checked but greyed out. I can uncheck it, but next time I open it the box is re-checked. I used to have that old problem with the old system that had complex ACLs. I would solve it by re-applying the complex ACL from my notes from the original install. Now with the new simpler ACLs I am still seeing it. 

Workaround: re-apply the original ACLs

chmod -R A+owner@:full_set:fd:allow,everyone@:read_set/execute:fd:allow /mediapool/media
 

Thursday, August 12, 2010

Backup from EON ZFS NAS to hard drive

EON NAS is my primary data archive. However I'm trying to have two copies of every single file. So, as I add files to EON NAS, they get put into an "incoming" holding tank until I can make a second copy. Once second copy is made, they get filed. The plan is to occassionally make a full backup of all the sorted data, at which point the time-based offloads will be redundant and can be reused.

Don't have/want a second complete NAS system, so for now I'm backup up to hard drives. So what is the best way to get data onto an HD?

* could format NTFS, plug into windows, and drag-n-drop over network
** those backup drives could be read by any system which is convenient
** slooooow (100GB takes 3 hours, 2TB takes several days)
* could format ZFS, plug into NAS, blast data over esata
** drive only readable by OpenSolaris
** nice and fast to make backup
* format NTFS, plug into NAS, write via esata?
** does EON support NTFS write?

Ultimate decision: backup over network to windows box with NTFS filesystem - ability to easily access backups trumps everything else. If speed is demanded, set up Gb Ethernet between windows box and NAS.

Back up to disk attached to EON:


media:1:~#zpool status
  pool: mediapool
 state: DEGRADED
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-2Q
  scan: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        mediapool                 DEGRADED     0     0     0
          raidz2-0                DEGRADED     0     0     0
            14963257236115845187  UNAVAIL      0     0     0  was /dev/dsk/c0t0d0s0
            c0t1d0                ONLINE       0     0     0
            c4t2d0                ONLINE       0     0     0
            c4t3d0                ONLINE       0     0     0
            c5t0d0                ONLINE       0     0     0
            c5t1d0                ONLINE       0     0     0
            c5t2d0                ONLINE       0     0     0
            c5t3d0                ONLINE       0     0     0
            c5t4d0                ONLINE       0     0     0

errors: No known data errors
media:2:~#format
Searching for disks...done

c5t5d0: configured with capacity of 1862.95GB


AVAILABLE DISK SELECTIONS:
       0. c0t1d0
          /pci@0,0/pci8086,3a46@1c,3/pci1458,b000@0/disk@1,0
       1. c3d0
          /pci@0,0/pci8086,244e@1e/pci-ide@0/ide@0/cmdk@0,0
       2. c4t2d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@2,0
       3. c4t3d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@3,0
       4. c5t0d0
          /pci@0,0/pci1458,b005@1f,2/disk@0,0
       5. c5t1d0
          /pci@0,0/pci1458,b005@1f,2/disk@1,0
       6. c5t2d0
          /pci@0,0/pci1458,b005@1f,2/disk@2,0
       7. c5t3d0
          /pci@0,0/pci1458,b005@1f,2/disk@3,0
       8. c5t4d0
          /pci@0,0/pci1458,b005@1f,2/disk@4,0
       9. c5t5d0
          /pci@0,0/pci1458,b005@1f,2/disk@5,0
Specify disk (enter its number): 9
selecting c5t5d0
[disk formatted]
No Solaris fdisk partition found.


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> current
Current Disk = c5t5d0

/pci@0,0/pci1458,b005@1f,2/disk@5,0

format> format
The protection information is not enabled
The disk will be formatted with protection type 0
Ready to format.  Formatting cannot be interrupted.
Continue? y
Beginning format. The current time is Fri Feb 22 03:21:16 2013

Formatting...
Format failed

Retry of formatting operation without any of the standard
mode selects and ignoring disk's Grown Defects list.  The
disk may be able to be reformatted this way if an earlier
formatting operation was interrupted by a power failure or
SCSI bus reset.  The Grown Defects list will be recreated
by format verification and surface analysis.

Retry format without mode selects and Grown Defects list? y
Formatting...
Illegal request during format: block 0 (0x0) (0/0/0)
ASC: 0x20   ASCQ: 0x0
Illegal request during format: block 0 (0x0) (0/0/0)
ASC: 0x20   ASCQ: 0x0
failed
format> partition
WARNING - This disk may be in use by an application that has
          modified the fdisk table. Ensure that this disk is
          not currently in use before proceeding to use fdisk.
format> quit
media:3:~#format /dev/rd
rdiskette   rdiskette0  rdsk/    
media:3:~#format /dev/rdsk/c5t5d0
No disks found!

media:4:~#format
Searching for disks...done

c5t5d0: configured with capacity of 1862.95GB


AVAILABLE DISK SELECTIONS:
       0. c0t1d0
          /pci@0,0/pci8086,3a46@1c,3/pci1458,b000@0/disk@1,0
       1. c3d0
          /pci@0,0/pci8086,244e@1e/pci-ide@0/ide@0/cmdk@0,0
       2. c4t2d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@2,0
       3. c4t3d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@3,0
       4. c5t0d0
          /pci@0,0/pci1458,b005@1f,2/disk@0,0
       5. c5t1d0
          /pci@0,0/pci1458,b005@1f,2/disk@1,0
       6. c5t2d0
          /pci@0,0/pci1458,b005@1f,2/disk@2,0
       7. c5t3d0
          /pci@0,0/pci1458,b005@1f,2/disk@3,0
       8. c5t4d0
          /pci@0,0/pci1458,b005@1f,2/disk@4,0
       9. c5t5d0
          /pci@0,0/pci1458,b005@1f,2/disk@5,0
Specify disk (enter its number): 9
selecting c5t5d0
[disk formatted]
No Solaris fdisk partition found.


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> partition
WARNING - This disk may be in use by an application that has
          modified the fdisk table. Ensure that this disk is
          not currently in use before proceeding to use fdisk.
format> fdisk

             Total disk size is 60800 cylinders
             Cylinder size is 64260 (512 byte) blocks

                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1                 Solaris2          1  60799    60799    100




SELECT ONE OF THE FOLLOWING:
   1. Create a partition
   2. Specify the active partition
   3. Delete a partition
   4. Change between Solaris and Solaris2 Partition IDs
   5. Edit/View extended partitions
   6. Exit (update disk configuration and exit)
   7. Cancel (exit without updating disk configuration)
Enter Selection: 6


format> label
Ready to label disk, continue? y

format> quit
media:5:~#newfs /dev/rdsk/c5t5d0
newfs: /dev/rdsk/c5t5d0: No such file or directory
media:6:~#newfs /dev/rdsk/c5t5d0s0
/dev/rdsk/c5t5d0s0: I/O error
media:7:~#newfs /dev/rdsk/c5t5d0s1
/dev/rdsk/c5t5d0s1: I/O error
media:8:~#format                
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t1d0
          /pci@0,0/pci8086,3a46@1c,3/pci1458,b000@0/disk@1,0
       1. c3d0
          /pci@0,0/pci8086,244e@1e/pci-ide@0/ide@0/cmdk@0,0
       2. c4t2d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@2,0
       3. c4t3d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@3,0
       4. c5t0d0
          /pci@0,0/pci1458,b005@1f,2/disk@0,0
       5. c5t1d0
          /pci@0,0/pci1458,b005@1f,2/disk@1,0
       6. c5t2d0
          /pci@0,0/pci1458,b005@1f,2/disk@2,0
       7. c5t3d0
          /pci@0,0/pci1458,b005@1f,2/disk@3,0
       8. c5t4d0
          /pci@0,0/pci1458,b005@1f,2/disk@4,0
       9. c5t5d0
          /pci@0,0/pci1458,b005@1f,2/disk@5,0
Specify disk (enter its number): 9
selecting c5t5d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> partition


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        ! - execute , then return
        quit
partition> print
Current partition table (original):
Total disk cylinders available: 60797 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)              0
  1 unassigned    wm       0                0         (0/0/0)              0
  2     backup    wu       0 - 60796        1.82TB    (60797/0/0) 3906815220
  3 unassigned    wm       0                0         (0/0/0)              0
  4 unassigned    wm       0                0         (0/0/0)              0
  5 unassigned    wm       0                0         (0/0/0)              0
  6 unassigned    wm       0                0         (0/0/0)              0
  7 unassigned    wm       0                0         (0/0/0)              0
  8       boot    wu       0 -     0       31.38MB    (1/0/0)          64260
  9 unassigned    wm       0                0         (0/0/0)              0

partition> quit


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> quit
media:9:~#newfs /dev/rdsk/c5t5d0s2
newfs: construct a new file system /dev/rdsk/c5t5d0s2: (y/n)? y
mkfs: bad value for ntrack: -1 must be between 1 and 2147483647
mkfs: ntrack reset to default 16
Warning: 3280 sector(s) in last cylinder unallocated
/dev/rdsk/c5t5d0s2:     3906815216 sectors in 968953 cylinders of 16 tracks, 252 sectors
        1907624.6MB in 6375 cyl groups (152 c/g, 299.25MB/g, 320 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 613152, 1226272, 1839392, 2452512, 3065632, 3678752, 4291872, 4904992,
 5518112,
Initializing cylinder groups:
...............................................................................
................................................
super-block backups for last 10 cylinder groups at:
 3900882720, 3901495840, 3902108960, 3902717984, 3903331104, 3903944224,
 3904557344, 3905170464, 3905783584, 3906396704
media:10:~#
media:10:~#
media:10:~#mount
/ on /devices/ramdisk:a read/write/setuid/devices/intr/largefiles/xattr/onerror=panic/dev=15c0001 on Fri Feb 22 03:10:45 2013
/devices on /devices read/write/setuid/devices/dev=8080000 on Fri Feb 22 03:10:41 2013
/dev on /dev read/write/setuid/devices/dev=80c0000 on Fri Feb 22 03:10:41 2013
/system/contract on ctfs read/write/setuid/devices/dev=8140001 on Fri Feb 22 03:10:41 2013
/proc on proc read/write/setuid/devices/dev=8100000 on Fri Feb 22 03:10:41 2013
/etc/mnttab on mnttab read/write/setuid/devices/dev=8180001 on Fri Feb 22 03:10:41 2013
/etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=81c0001 on Fri Feb 22 03:10:41 2013
/system/object on objfs read/write/setuid/devices/dev=8200001 on Fri Feb 22 03:10:41 2013
/etc/dfs/sharetab on sharefs read/write/setuid/devices/dev=8240001 on Fri Feb 22 03:10:41 2013
/lib/libc.so.1 on /usr/lib/libc/libc_hwcap1.so.1 read/write/setuid/devices/dev=15c0001 on Fri Feb 22 03:10:44 2013
/dev/fd on fd read/write/setuid/devices/dev=8380001 on Fri Feb 22 03:10:45 2013
/mnt/eon0 on /dev/dsk/c3d0s0 read/write/setuid/devices/intr/largefiles/xattr/noatime/onerror=panic/dev=23c0000 on Fri Feb 22 03:10:48 2013
/tmp on swap read/write/setuid/devices/xattr/dev=81c0002 on Fri Feb 22 03:10:53 2013
/var/run on swap read/write/setuid/devices/xattr/dev=81c0003 on Fri Feb 22 03:10:53 2013
/mediapool on mediapool read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=17d0002 on Fri Feb 22 03:11:04 2013
/mediapool/media on mediapool/media read/write/setuid/devices/nbmand/exec/xattr/atime/dev=17d0003 on Fri Feb 22 03:11:04 2013
media:11:~#fsck -y /dev/rdsk/c5t5d0s2
** /dev/rdsk/c5t5d0s2
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
2 files, 2 used, 244131309 free (0 frags, 244131309 blocks, 0.0% fragmentation)
media:12:~#mount /dev/rdsk/c5t5d0s2 /backup
mount: Mount point /backup does not exist.
media:13:~#mkdir /backup
media:14:~#mount /dev/rdsk/c5t5d0s2 /backup
mount: /dev/rdsk/c5t5d0s2 not a block device
media:15:~#mount /dev/rdsk/c5t5d0 /backup
mount: /dev/rdsk/c5t5d0 or /backup, no such file or directory
media:16:~#mount /dev/rdsk/c5t5d0 /backup
c5t5d0p0   c5t5d0p2   c5t5d0p4   c5t5d0s1   c5t5d0s11  c5t5d0s13  c5t5d0s15  c5t5d0s3   c5t5d0s5   c5t5d0s7   c5t5d0s9
c5t5d0p1   c5t5d0p3   c5t5d0s0   c5t5d0s10  c5t5d0s12  c5t5d0s14  c5t5d0s2   c5t5d0s4   c5t5d0s6   c5t5d0s8
media:16:~#mount /dev/rdsk/c5t5d0p0 /backup
mount: /dev/rdsk/c5t5d0p0 not a block device
media:17:~#
media:17:~#
media:17:~#
media:17:~#
media:17:~#format /dev/rdsk/c5t5d0
No disks found!

media:18:~#format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t1d0
          /pci@0,0/pci8086,3a46@1c,3/pci1458,b000@0/disk@1,0
       1. c3d0
          /pci@0,0/pci8086,244e@1e/pci-ide@0/ide@0/cmdk@0,0
       2. c4t2d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@2,0
       3. c4t3d0
          /pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@3,0
       4. c5t0d0
          /pci@0,0/pci1458,b005@1f,2/disk@0,0
       5. c5t1d0
          /pci@0,0/pci1458,b005@1f,2/disk@1,0
       6. c5t2d0
          /pci@0,0/pci1458,b005@1f,2/disk@2,0
       7. c5t3d0
          /pci@0,0/pci1458,b005@1f,2/disk@3,0
       8. c5t4d0
          /pci@0,0/pci1458,b005@1f,2/disk@4,0
       9. c5t5d0
          /pci@0,0/pci1458,b005@1f,2/disk@5,0
Specify disk (enter its number): 9
selecting c5t5d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> quit      
media:19:~#mount /dev/dsk/c5t5d0s2 /backup





Here is formatting a brand new 4TB drive (probably don't need to touch the partition table at all actually)



media:4:~#format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       9. c5t5d0
          /pci@0,0/pci1458,b005@1f,2/disk@5,0
Specify disk (enter its number): 9
selecting c5t5d0
[disk formatted]

format> current
Current Disk = c5t5d0

/pci@0,0/pci1458,b005@1f,2/disk@5,0

format> fdisk

             Total disk size is 60800 cylinders
             Total disk size is 60800 cylinders
             Total disk size is 60800 cylinders
             Cylinder size is 128520 (512 byte) blocks

                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1                 EFI               0  60799    60800    100




SELECT ONE OF THE FOLLOWING:
   1. Create a partition
   2. Specify the active partition
   3. Delete a partition
   4. Change between Solaris and Solaris2 Partition IDs
   5. Edit/View extended partitions
   6. Exit (update disk configuration and exit)
   7. Cancel (exit without updating disk configuration)

[deleted partition 1, then recreated as EFI - probably pointless step]

fdisk>6

format> quit
media:5:~#
media:5:~#
media:5:~#
media:5:~#format
Searching for disks...done

c5t5d0: configured with capacity of 3726.02GB


AVAILABLE DISK SELECTIONS:
       9. c5t5d0
          /pci@0,0/pci1458,b005@1f,2/disk@5,0
Specify disk (enter its number): 9
selecting c5t5d0
[disk formatted]
No Solaris fdisk partition found.

format> label
Ready to label disk, continue? y
format> quit

media:7:~#newfs /dev/dsk/c5t5d0s0
newfs: construct a new file system /dev/rdsk/c5t5d0s0: (y/n)? y
Warning: 4512 sector(s) in last cylinder unallocated
/dev/rdsk/c5t5d0s0:     7814020704 sectors in 1271814 cylinders of 48 tracks, 128 sectors
        3815439.8MB in 8894 cyl groups (143 c/g, 429.00MB/g, 448 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 878752, 1757472, 2636192, 3514912, 4393632, 5272352, 6151072, 7029792,
 7908512,
Initializing cylinder groups:
...............................................................................
...............................................................................
...................
super-block backups for last 10 cylinder groups at:
 7805418016, 7806296736, 7807175456, 7808054176, 7808932896, 7809811616,
 7810690336, 7811569056, 7812447776, 7813326496


media:8:~#mkdir /backup
media:9:~#mount /dev/dsk/c5t5d0s0 /backup
media:10:~#df -k
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c5t5d0s0      3.6T   256M   3.6T     1%    /backup




Sunday, July 18, 2010

The BIG LIE of Japanese language learning.

Kanji don't have readings.

"Of course they do. My kanji flash cards have lists of readings for each kanji."

But that misrepresents the history and structure of Japanese.

Japanese began as a spoken language. For most of its history, there was no way to write down Japanese. Words were combinations of sounds, and certain sounds were used over and over to express the same concept in different words.

Then someone was hanging out in China and noticed they had a way of scribbling on bark to represent words. Certain characters related to concepts, and groups of characters represented words of the Chinese language. "Holy crap!" he thought. "That's the most useful things I've seen in my life." So he spent a while collecting a huge list of words - meanings and how they were written in Chinese characters.

He brought this big list of words back to Japan, and started assigning spoken Japanese words to written Chinese ones. For each Japanese word he'd try to find the best matching written Chinese word, and for each written Chinese word he'd try to find the best matching spoken Japanese word. Sometimes there would be several written Chinese words that mapped onto the same spoken Japanese word, sometimes several spoken Japanese words mapped onto a single written Chinese word.

So, back before written language, there was one Japanese word for "hot". Well, not really, there were all sorts of Japanese words for different levels of temperature in different contexts. But the sound "ATSUI" was widely used to mean "high temperature". Along come the big list of written Chinese words, which also had a variety of expressions for "hot". And the written Chinese word for "hot" as in "hot to the touch" and the written Chinese word for "hot" as in "it is hot outside" were both mapped onto the spoken Japanese word "ATSUI".

I've heard it explained that "Japanese has two different words for 'hot', they are written differently but pronounced the same" as if it were coincidence that two closely related words happened to be homophones. Bull. The correct way to express this is "The Japanese word 'ATSUI' means 'hot'. When you're speaking or writing a children's book in kana, that's all you need to know. But when you start reading and writing kanji, it gets more complicated, because there are several ways to write 'ATSUI'. If you mean 'hot to the touch' you write it one way, if you mean 'it is hot outside' you write it another. You'll have to remember which is which."

In languages with phonetic alphabets, words are related by CONCEPT <-> PRONUNCIATION <-> WRITING. This holds pretty well even for Chinese, which uses an ideographic alphabet - because the written and spoken language came from the same culture, the sounds that were reused to represent the same concept in various words simply became written ideograms reused to represent the same concept in various words. Thus, when you see a written word, you have a pretty good idea how it will be pronounced.

But because Japanese imported someone else's written language wholesale and grafted onto their spoken language, it is much messier. For Japanese words, CONCEPT -> PRONUNCIATION and CONCEPT -> WRITING. PRONUNCIATION and WRITING are only consistent to the degree that (spoken) Japanese and Chinese happened to have similar degrees of meaning, and reuse the same word-units in different words. For simple concepts and compounds, this happens a lot... in fact, it is surprising how well so much of the language lines up, considering that the alignment is basically coincidental. But the most basic kanji are also the ones used in the most different words, which is why 'fire' and 'water' have about a thousand readings each.

Bulk learning the readings of each kanji is a big waste of time - kanji don't have readings. Kanji represent words, and words have pronunciations.

Japanese starts to make a lot more sense when you realize this.

First off, the craziness of "kanji readings" makes sense when you realize there is really no such thing. Imagine there is a certain species of tree. In Chinese, this type of tree is called "Mountain Tree" for the location where it is found. However the Japanese gave it the spoken name "Green Tree" for its verdant color. When the kanji were imported to Japan, this species was identified, and so also it is spoken with sounds that mean "Green Tree", it is written with kanji that mean "Mountain Tree." So the kanji for "mountain" is pronounced "green" in the case of this species of tree - not because "it has that reading" but simply because the two cultures found different ways to describe that particular tree, and the written name was imported long after the spoken name was established. TODO: actual examples

You may even encounter AB vs BA - e.g. Chinese use the term "fireball" but Japanese use the term "ballfire" - so for that particular word the kanji "fire" is pronounced "ball", and vice-versa. TODO: actual examples

On the flipside, many words that seem unrelated when you look at the kanji, divulge their relationships if you use your ears. If you encounter two Japanese words that have a syllable in common, and there is some overlap in the meaning of the words, those words are probably etymologically related, even if the kanji used to write them are completely different. TODO: actual examples

For instance, there are a bunch of spoken sounds and written characters that mean "large" "big" "high" "great". Japanese might use the same sound for "tall" and "high priced", but "high speed" uses a different sound. Chinese uses the same character for "tall" as for "high speed". So Japanese has a handful of sounds for big/tall/great/high and Chinese has a handful of characters for the same... each has their own connotations, but there are so many words and compounds which make use of the general concept that it would be ridiculous to expect the Japanese and Chinese to have happened to pick the exact same variant for every single word. Instead, pretty much every combination of sound and writing occurs.

Specifically:

Chinese character 高 means high/tall. Used in Japanese word 高い たかい TAKAI meaning tall/high. This character is also used in a metric ton of Chinese words: 高原 highland, 高速 high speed, 高校 high school, 高価 high-priced. However in each of those cases, the Japanese spoken sound こう KOU is used for the concept of "bigness"... the pronunciations are こうげん KOUGEN, こうそく KOUSOKU, こうこう KOUKOU, こうか KOUKA respectively. Once we recognize こう KOU as a sound that Japanese uses for the concept of "bigness", we find other words that map this sound onto various kanji: "洪水 こうずい flood" obviously means "high water", the KOU in words such as "後期 こうき latter period" and "後半 こうはん second half" could well be related. Of course not all KOU sounds mean "high", there are various clusters of meaning including "travel", "school", and "public" that use the KOU sound.

In fact, rather than memorizing KANJI -> READINGS a much better use of your time would be to memorize SOUNDS -> CONCEPTS at a syllable/word fragment/concept level, eg

KOU -> high, etc
SHA -> car/carriage/vehicle, person, etc
SEI -> government, etc

Then when you hear an unknown word, you can make a pretty good idea of what the possible meanings are - context will often make completely clear which option is correct. Learning KANJI -> CONCEPTs via RTK will give you a pretty good guess at what a written word means - context will often make completely clear which option is correct. Brute force memorization of "kanji readings" will give you... what... a half-assed guess at how to read a word? Which context won't help with? Which is only useful if one of the possible readings happens to be a word you recognize when spoken? Besides, you need to be able to comprehend written Japanese, and comprehend spoken Japanese, to get anything done in the language. How often do you really need to read aloud from text?

SOUND -> CONCEPT is a natural, native Japanese relation. KANJI -> CONCEPT is a natural, native Chinese relation. KANJI -> SOUND is a freakish, unpredictable result of the frankenstein nature by which two different language systems were smashed together. Trying to learn to read by memorizing the sounds of each character is very foreign to the nature of the Japanese language - an arrogant attempt to impose a practice natural to other languages onto Japanese learning.

Eventually, to be fluent, you'll be able to read aloud from Japanese text. But that is best accomplished by mastering each of the spoken and written systems, and learning how they align - not by brute forcing the second-hand relationship between characters and sounds. After brute-forcing kanji via RTK, and brute-forcing listening comprehension via SRS drills, then learning to read will provide lots of "aha!" moments as the two systems reinforce each other by how they overlap.

TODO: museum, coliseum, library, apothecary
TODO: 戦[たたか]い war, match 戦[たたか]う wage war, fight - rather than SEN, obv related to tataku (hit)
TODO: お 陰[かげ] (thanks to) 影[かげ] (shadow, shade)

Tuesday, July 13, 2010

Unity notes

MONITOR

Multiple monitor output: seems to require desktop spanning.

http://answers.unity3d.com/questions/640/fullscreen-on-a-second-monitor
http://answers.unity3d.com/questions/7396/dual-monitor-support
http://answers.unity3d.com/questions/3899/using-multiple-monitors-video-outputs



Use camera viewports to place camera output at certain locations onscreen.
http://unity3d.com/support/documentation/Components/class-Camera.html


how to set app to non-standard size?

if "fullscreen" is only single monitor, how to draw across full desktop without decoration?

is there a way to find total monitor-spanned desktop size? size of second monitor? for now, ability for user to enter second monitor resolution, and using that to place the output viewport in upper right corner of screen, would work.

Supposedly full-screen-on-second-monitor for windows was addressed and would be available in future version (presumably by 3.0) http://answers.unity3d.com/questions/640

There is also a workaround for window: set app res to match monitor res, then place window so header and frame are exactly offscreen... this also addresses the pops-out-of-fullscreen-when-app-focus-changes problem. Even a util for it: http://gwr.orekaria.com/



VIDEO

Video: no position control in native Unity: http://answers.unity3d.com/questions/5197/how-to-create-a-slider-to-control-video-playback

is is possible to get video resolution: http://answers.unity3d.com/questions/18945/how-to-get-video-resolution

it is theoretically possible to access pixels of iplimage from OpenCV and copy to Unity texture: http://answers.unity3d.com/questions/15574/import-video-from-camera

opencv cross-platform support notes: http://answers.unity3d.com/questions/16460/plugins-on-osx-opencv-and-emgucv

hey, this seems promising: a cross-platform QT plugin! http://www.unifycommunity.com/wiki/index.php?title=QTPlayback it doesn't have position control, but includes (non-free) source for the plugin

PLUGIN

native implementations for OSX and Windows http://unity3d.com/support/documentation/Manual/Plugins.html

Sunday, July 11, 2010

Choosing a 3D engine

Creating own VJ / video installation software. Need to choose the right engine.

Requirements:

* unlimited layers
* physics
* paths/splines
* highres support
* multiscreen support (eg matrox out)
* audio input
* open source
* cross platform
** windows
** osx
** linux
** iphone
** consoles
* graphics card accelerated
* saleable
* real-time editing (see changes without restart)
* reasonable end-user GUI controls

Candidates:

* max/msp jitter
* max + ogre
* unity
* torque
* C
* neo axis engine
** ogre-based
** windows only, OSX is "in progress"
* http://www.rtsoft.com/novashell/
* http://game-editor.com/
* http://love2d.org/

Software design:

* source - clip art / pattern
** tiling, movement, etc
* objects
* paths
*

Test app:

* create layers
* assign clip art to layers
* position/scale of each layer

Thursday, January 28, 2010

DROBO WARNING re: 2TB DRIVE SUPPORT

If you plan to use 2TB drives with a 4-bay Drobo, *BE SURE TO UPDATE TO LATEST FIRMWARE*. You'll probably want a full backup before updating firmware, as some people have reported data loss during firmware update. To minimize risk: shut down safely, unplug power and data cables, remove your drive set, update firmware on empty drobo, shutdown again and reinsert drive set.

[actually, the problem is probably triggered by total storage space, not by 2TB drives in particular; however in practice this will only impact 4-bay Drobo users, as 5- and 8-bay units come preinstalled with new firmware... and 4x1TB drives will not hit the limit which triggers the bug]

Apparently earlier firmwares are known to be *NOT SAFE* for use with 2TB drives. In particular, they have an insufficient amount of space allocated for keeping track of the block layout... the drives will work for a while, but once you fill up data to a certain point, it will start overwriting the data and/or block layout info at the beginning of the drive set, block zero is overwritten and YOUR DRIVE SET IS LOST. You will get 4 solid red drive status lights and the message "Drobo does not detect any hard drives. Please insert a hard drive immediately". This is due to low-level corruption of drive set, and there is currently no fix for it.

In addition, the power supply which came with your Drobo may not be powerful enough to handle 2TB drives; you need at least 7.5 amps. Check you power supply and if in doubt call data robotics, they will ship you a new power supply.

Sadly, for a company which promises to protect your data, there is no mention of either issue on their website. The 2TB drive support knowledge base entry simply says "Drobo and DroboPro support 2TB drives" with no mention of firmware or power supply requirements. Both should be indicated in screaming red text on the 2TB support page. Firmware fixes re: data safety should be prominently mentioned on the front page, support page, and anywhere that firmware is mentioned... the Updates page says users should update firmware to "take advantage of the latest features". The latest firmware release notes [PDF] mention mundane issues like OSX compatibility and miscalculation of free space when almost full, but don't mention that firmware updates provide vital data safety fixes for large drives. Nor does it include a cumulative changelog, and earlier firmware release notes are not readily available online. Given that earlier firmwares will function with 2TB drives but act as a time bomb waiting to brick your drive set, a press release / email blast would perhaps be appropriate. I'm sure I'm not the only person who avoids apparently needless firmware updates on the "if it ain't broke, don't mess with it" practice.

To their credit, the engineers are working to find a way to recover some/all data from drive sets that have been corrupted. Like many others, I have been impressed by the customer support and they are taking my issue seriously.

However there does seem to be a left hand / right hand disconnect of sorts... the engineers were aware of the data corruption problem and implemented a fix, tech support is aware of the power supply problem... and yet the web site is just a sales pitch about the greatness of drobo and how many invisible safety checks it has to protect your data. This is particularly obnoxious because their forums went private, then were shut down. Even if you are a model customer and do your research, there is no way to know about either of these two known issues, either one of which could cause total data loss.

...

Of course, you should always have a full backup. An offsite backup for that matter. Without best practices your data will always be at greater risk. That said, a redundant multi-disk device is supposed to protect your data from a single drive failure, not act as a way to lose N drives of data in one fell swoop. Drobo may have a solid tech dept and excellent customer service, but with no warnings about this data loss, there is a disaster waiting to happen for anyone who takes them at their word that 2TB drives are supported.

I don't want to badmouth Data Robotics, particularly as they are attempting a data recovery solution for me (and particularly as I haven't gotten that solution yet, and want to stay on their good side ;) However the possibility of widespread data loss is too severe, particularly for early adopters who had loaded up their Drobos with data before firmware with 2TB fixes had been released. Therefore I feel it is my duty to warn current Drobo customers of this danger.

Monday, January 4, 2010

drobo disaster: backup drobo drives as disk image dumps to files

copying files to drobo, came back to find it and windows finder crashed.

scanning disk in another system, can read the data.

task: backup raw disk images to files, in case disks become corrupted during recovery, I could restore from the files back onto the disks, thus resetting the state of things to just after crash.

luckily, have a shiny new 14TB opensolaris NAS with space for at least 3 of the drobo drive images.

first, list all the devices recognized by opensolaris system before connecting drobo drive:

media:1:~#zpool status
pool: mediapool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
mediapool ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
c0t0d0 ONLINE 0 0 0
c0t1d0 ONLINE 0 0 0
c2t2d0 ONLINE 0 0 0
c2t3d0 ONLINE 0 0 0
c3t0d0 ONLINE 0 0 0
c3t1d0 ONLINE 0 0 0
c3t2d0 ONLINE 0 0 0
c3t3d0 ONLINE 0 0 0
c3t4d0 ONLINE 0 0 0

errors: No known data errors


now shut down

# init 0

and add drive 1 from drobo drive set. power on. zpool status: same output.

media:1:~#format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@0,0/pci8086,3a46@1c,3/pci1458,b000@0/disk@0,0
1. c0t1d0
/pci@0,0/pci8086,3a46@1c,3/pci1458,b000@0/disk@1,0
2. c1d0
/pci@0,0/pci8086,244e@1e/pci-ide@0/ide@0/cmdk@0,0
3. c2t1d0
/pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@1,0
4. c2t2d0
/pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@2,0
5. c2t3d0
/pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@3,0
6. c3t0d0
/pci@0,0/pci1458,b005@1f,2/disk@0,0
7. c3t1d0
/pci@0,0/pci1458,b005@1f,2/disk@1,0
8. c3t2d0
/pci@0,0/pci1458,b005@1f,2/disk@2,0
9. c3t3d0
/pci@0,0/pci1458,b005@1f,2/disk@3,0
10. c3t4d0
/pci@0,0/pci1458,b005@1f,2/disk@4,0
Specify disk (enter its number): ^C

we see two drives which are not part of the pool. the first is our boot drive:

2. c1d0
/pci@0,0/pci8086,244e@1e/pci-ide@0/ide@0/cmdk@0,0

the other is the drive from drobo:

3. c2t1d0
/pci@0,0/pci8086,244e@1e/pci1095,7124@1/disk@1,0

from http://initialprogramload.blogspot.com/2008/07/how-solaris-disk-device-names-work.html

"The p0 device, eg c1t0d0p0, indicates the whole disk as seen by the BIOS"

first try scanning the drive to verify it is from drobo:

media:18:~#cat /dev/rdsk/c2t1d0p0 | more
���� ^L�-���2� @� - Drobo disk packing available fo �� � c;qt ��� x#խ��� ����NOT EXPUNGEDvailable fo


seems to be. next, inspired by http://docs.sun.com/app/docs/doc/805-7228/6j6q7uf21?a=view

media:19:~#dd if=/dev/rdsk/c2t1d0p0 of=/mediapool/media/Backups/drobo_drive_first_slot.dump bs=512k


underway!

still not entirely clear to me: is p0 better than s2 (which is said to generally represent "whole disk")? if it is true that p0 represents entire disk as it appears to BIOS, then it seems we couldn't possibly do any better. still, need to read up.


checking the start of each disk image:


media:4:~>cat /mediapool/media/Backups/drobo_drive_first_slot.dump | more
���� ^L�-���2� @� - Drobo disk packing available fo �� � c;qt ��� x#խ��� ����NOT EXPUNGEDvailable fo
media:5:~>cat /mediapool/media/Backups/drobo_drive_slot_2.dump | more
���� ^L�-���2� @� - Drobo disk packing available fo d� � pt ���<͉����� ����NOT EXPUNGED
media:6:~>cat /mediapool/media/Backups/drobo_drive_slot_3.dump | more
���� ^L�-���2� @� - Drobo disk packing available fo ��� � pt ���&I������ ����NOT EXPUNGED�z�,��� 0�hE�


at least all the header bytes are consistent, that's a positive sign.


after RMA'd unit and read-only firmware, same results.

questions:

where does Drobo data reside on drives? eg first 20MB? purpose is to compare drives to see if firmware version was updated / read-only flag set

more detail about read fails in logs:
* does it appear to be hardware level?
* is it the first drive that fails? all drives? one drive?
* the "all 4 drive status lights red" state - does this mean each of the 4 drives was tried and failed? or is there logic which sets a "total error state" signified by 4xred drives?
* it was said that failure to read was "catalogue" "layout" or similar data. is there other data - eg firmware version - successfully read before this failure occurs?

next steps:

* is there a firmware with higher debug level?

* post first nMB of each disk somewhere, so engineers can look into why they fail to load?

eventually:
* send drives for data recovery. was done for other users, and data successfully recovered. it is this level of customer service - proving that you really do care about our data -

in their interest to get to the bottom of the problem:
* can put better logging in; in future won't have to RMA a unit that doesn't actually have a hardware problem
* it might not be a common problem, but it did occur; this could a rare chance to have a test case to work against in solving it
* the next person to get hit

high-profile users get plenty of love:
http://thestoragearchitect.com/2009/10/19/personal-computing-drobo-weirdness/

and users report sending drives in to datarobotics and data being recovered:
http://blog.theavclub.tv/post/drobo-any-good

"unable to write anything to disk"
-> "failure to write to zone 0"
-> "unrecoverable write error"
-> "read error"
"LBA location" - not a particular area of drive, it is all mapped on the fly

"zone 40693 - double read error"

Saturday, December 12, 2009

EON NAS software setup

zpool create -f mediapool raidz2 c0t0d0 c0t1d0 c2t2d0 c2t3d0 c3t0d0 c3t1d0 c3t2d0 c3t2d0 c3t4d0
zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=guestok=true -o sharenfs=ro mediapool/media
zfs set sharesmb=name=media mediapool/media
groupadd -g 600 media
useradd -u 502 -g 600 media
passwd media
chown -R media:media /mediapool/media
chmod 775 /mediapool/media


http://sites.google.com/site/eonstorage/faq -> How do I start NFS server services

cd /var/svc/manifest/network
svccfg -v import rpc/bind.xml
svccfg -v import nfs/status.xml
svccfg -v import nfs/nlockmgr.xml
svccfg -v import nfs/server.xml
svcadm enable rpc/bind
svcadm enable nfs/status
svcadm enable nfs/nlockmgr
svcadm enable nfs/server

zfs set aclinherit=passthrough mediapool/media
zfs set aclmode=passthrough mediapool/media

chmod A=owner@:rwxpdDaARWcCos:fd-----:allow,group@:rwxpdDaARWcCos:fd-----:allow,everyone@:wpdDAWc:fd-----:deny,everyone@:rxaRCos:fd-----:allow /mediapool/media

ls -ldV /mediapool/media
drwxrwxr-x+ 2 media media 8 Dec 6 09:48 /mediapool/media
owner@:rwxpdDaARWcCos:fd-----:allow
group@:rwxpdDaARWcCos:fd-----:allow
everyone@:-w-pdD-A-Wc---:fd-----:deny
everyone@:r-x---a-R--Cos:fd-----:allow


updimg.sh /mnt/eon0/boot/x86.eon
reboot

zpool status
no pools available

edit /mnt/eon0/.exec and uncomment the "zpool import" line
updimg.sh /mnt/eon0/boot/x86.eon
reboot

zpool status: lists zpool
windows -> start -> run -> \\10.0.1.50\
works!
try to copy some files: fails
up one dir, right click on media, "map network drive", "connect as other user", media/mediapass
write allowed!
mac -> Finder -> apple-K -> nfs://10.0.1.50/mediapool/media
mounts! file read allowed! file write not allowed!

get "PCI CF to SSD SATA" device working under OpenSolaris

"PCI to 4x Compact Flash Card (CD to SSD SATA adapter)"
box says "Creative I/O" but retailed as Syba SY-PCI48001

shows up as "Silicon Image Sil 0680 Ultra-133 Medley ATA Raid Controller"

because it lists itself as device type RAID, the ata driver does not attach. online research suggests that devices based on 0680 which declare themselves as RAID can be made to work.

Boot OS snv_125 DVD with all controllers and disks attached. Double-click "Install OpenSolaris" icon on desktop and install to a spare HD. When install completes, reboot.

Log in, start terminal, su -

update_drv -v -a -i '"pci1095,3680"' ata
exit status = 0
reboot -- -reconfigure

log in, start terminal, su -
prtconf: device still has no driver attached
no sign of it in /var/adm/messages
/etc/driver_aliases lists it



reading online, it might not work unless i flash the BIOS to a non-raid version. i can find non-raid bios for 0680a on silicon image website, but running their windows bios update tool, it could see my 3124 card but not the 0680. http://club.myce.com/f61/new-silicon-image-sil-0680-firmware-drivers-192683/ includes a case where this chip could only be updated via dos updating tool, but was successful with the DOS tool. thing is, it depends which flash chip is on the board.... some might come with a write-once chip that cannot be flashed! however it is not possible to read the markings on the chip on my board, and i can't find out by research, so I need to try the DOS tool.

new sub-sub-project: make a bootable DOS system with the BIOS and tool included. http://genetikayos.livejournal.com/43998.html has instructions. download freeDOS floppy img from http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/unofficial/balder/ and winimage and usb format tool as detailed in above link. put those on a USB key, boot from "hiren boot cd" mini winxp, install winimage, use winimage to extract balder img file to a new directory. try to run HP usb format tool, but needs LZ32.dll which isn't in minixp... nor is it on my real winxp system?? instead use dell diagnostics tool reference in comments at above link... after creating dell diagnostic disk, unplug and insert it so it is mounted by windows. add UPDFLASH.EXE and bios .bin file from silicon image site. rename gui.exe and all .bat files to disable dell diagnostic tools and ensure we get dumped to a DOS prompt on boot.

bios won't boot this flash drive formatted this way, unless i select it in the "hdd priority list".

boots to DOS prompt, ".\UPDFLASH.EXE b3400.bin"
... finds my controller, "Loading BIOS..." "Verifying..." "BIOS is loaded."
success!!

reboot and check BIOS POST data about 680 card: it now shows up as Class 0106, "Mass Storage Controller" yay!

boot from EON disc: format lists it!

"install.sh" [select the option for c1d0 which was the CF card]
success!
"reboot"
log in with root/eonsolaris
/usr/bin/setup [configure hostname and IP addresses for each network interface]
updimg.sh /mnt/eon0/boot/x86.eon

plug in all drives, make sure BIOS is set to boot CF card 1st priority, and continue with final software setup

NAS build new attempt

all cards including Addonics SATA and 0680 IDE->CF installed.

old CD-ROM drive and scratch disk drive attached. boot from EON install disk. immediately install to scratch HD with no config:

log in with root/eonsolaris
"format" then ^C to list disks, note disk id of scratch HDD
"/usr/bin/install.sh" and select c0d0 per format output

reboot, make sure BIOS is set to boot from scratch HDD

update_drv -v -a -i '"pci1095,3680"' ata
exit status = 0

okay, that looks solid. it is listed in driver_aliases, but not format. i also see it listed in /etc/path_to_inst however it seems path_to_inst should not be backed up or manually manipulated?

normal system, would now "reconfigure boot" but as EON state only persists after running updimg, this seems pointless. try updimg, which will now preserver driver_aliases, and see if driver is attached after boot.

updimg.sh /mnt/eon0/boot/x86.eon
reboot

rebooting, get grub menu with list of boot options, but booting from first option now hangs... looks like updimg.sh broke something. reboot and select OEM from boot menu. without spending any time on config, do a test updimg and pay close attention to the output for any error messages. actuall, am worried that updimg.sh will build on x86.eon which already failed to boot, so first cp x86.eon.oem x86.eon and remove any .0 backup. now run updimg.sh /mnt/eon0/boot/x86.eon completes with OK

reboot

reboot works.

looking at /mnt/eon0/boot/.backup confirms that driver_aliases *is* being backed up (thought this would have been lost during x86.eon rollback? guess not because it lives in on-disk storage outside of x86.eon, as grub does) looking at driver_aliases, does not include 680.

update_drv -v -a -i '"pci1095,3680"' ata
exit status = 0

updimg.sh completes with OK
reboot

this time it gets past the logo screen and reboots OK... guess the previous failure was a one-off. /etc/driver_aliases includes the line for the 680 and so does /etc/path_to_inst. however it is not listed by "format" prtconf still shows it as "driver not attached"


NO GO: before asking andre for help, let's work on getting the CF card visible to standard OS snv_125

Thursday, December 10, 2009

Final NAS hardware setup, EON install

Have 2 PCI cards: sil3124 addonics 4xSATA card, sil0680 syba 4xCF->SATA card. intend to use CF card as boot drive, to keep all drive bays free for mass storage (and USB boot does not work with Solaris formatting on my motherboard's BIOS)

Problem: with only sil3124 plugged in PCI2, BIOS pops up 3124 drive detection, and those drives show up in BIOS drive listing. Plugging sil0680 into PCI1, BIOS does an 0680 drive detection, which takes about 30 seconds (!) but does not detect 3124 drives. nevertheless, booting off of EON CD, once booted the 3124 drives show up to 'format' so this does not appear to be a blocking issue.

Problem: OpenSolaris supports sil0680, but this driver is not on the EON install CD, therefore my CF card does not show up to the "format" or "install.sh" commands. ouch. So I have to either add the driver to the running system, or build my own install CD. The former would obviously be the quicker option, if it is possible.

relevant links:
http://eonstorage.blogspot.com/2009/02/adding-your-own-drivers-to-eon.html
http://eonstorage.blogspot.com/2009/02/another-way-to-add-drivers-to-eon.html
http://eonstorage.blogspot.com/2009/05/eon-zfs-nas-meets-ips-packages.html

let's try "another way" method from 2nd link above... should allow us to add driver to running system, which will then detect the CF card, then we can install with CF card support. failing that, we can install to a legacy IDE drive, patch up the drivers there, reboot with sil0680 support, and install to CF.

from http://genunix.org/ find the appropriate link to OS release which matches EON release: http://www.genunix.org/distributions/indiana/osol-1002-125-x86.iso download it, opening the iso image is no problem but all the drivers seem to be bound up in a .zlib file

...

after some searching, it seems there is no separate 0680 driver? don't find it at http://pkg.opensolaris.org/ or in files on OS full install CD, even after booting it.

on booted OS snv_125 liveCD system, look for any sign of my device:

% prtconf
...
pci8068,244e, instance #0
pci1095,3680 (driver not attached)

there it is! numbers match what i saw in BIOS POST. it is device class RAID, but so is the addonics card... generic ata driver should be enough. actually, the addonics card is using si3124 driver, which support RAID features... but generic ATA should still be enough?

"prtconf -D" shows sd disks hanging from devices using "ahci" "ata" and "sil3124" cards... "ata" sounds like a good possibility. how to attach the driver to our device?

become root with "su -" passwd "opensolaris"

/usr/X11R6/bin/scanpci also shows it:

pci bus 0x0006 cardnum 0x00 function 0x00: vendor 0x1095 device 0x0680
Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller

from http://www.timelordz.com/wiki/index.php/OpenSolaris_Indiana_2008.11_Acer_Aspire_One_Install#Attaching_the_Driver we should attach the driver by removing it and adding it with correct args... however the driver is already in use for the onboard ata. how to handle this? one option would be to change BIOS settings for onboard to run in AHCI mode. another option is to find syntax for loading attaching one driver to multiple devices.

% add_drv -i "pci1095,680" ata
("ata") already in use as a driver or alias

so do need to remove it first... therefore need list of every device it applies to it?

here is a supposed method to attach device to installed driver:

update_drv -a -i 'pci1095,680' ata

executes with no output... "format" shows the same list of disks. nothing in dmesg.
oops, command used wrong pci spec:

update_drv -a -i 'pci1095,3680' ata

still no output, no new disk under "format", prtconf shows 'driver not attached'

'man update_drv' says it will take effect after 'reconfig boot or hotplug of the device'

update_drv -v -a -i '"pci1095,3680"' ata

no dice. however /etc/driver_aliases does list the additions... i guess reboot is required.

lots of similar troubleshooting:
http://forums.sun.com/thread.jspa?threadID=5088663
http://bugs.opensolaris.org/view_bug.do?bug_id=6595150
http://hub.opensolaris.org/bin/view/Community+Group+advocacy/intro-solaris-drivers
same chip:
http://mail.opensolaris.org/pipermail/driver-discuss/2006-June/000340.html

proof this chip can work:
http://defect.opensolaris.org/bz/show_bug.cgi?id=9349

if reboot is required, then i need to first install onto one of my mass storage disks, then update aliases, reboot/reconfigure, and only then can i install onto CF card. so, reboot with EON CD.

Monday, December 7, 2009

EON monitoring

Situation: setting up an EON-NAS. The install is very stripped down, and as of writing does not offer any monitoring. Therefore we want to set up an automated process which will run on an external server as a chron job, check the status of the NAS, and email us if it is dead or degraded.

Want it to work out of the box, so not using NAPP-IT and wget. Instead let's use SSH to connect to EON NAS and run raw monitoring commands.

Broadly:

* create a locked-down account with limited access that can run monitoring commands
* set up ssh keys to access that account from monitoring server without password
* write a script to do the monitoring and email on state change
* run that script as chron job in monitoring server
** expose our NAS through firewall, set up a persisent hostname using a DHCP-startup script (which should run on NAS-box, right?)



Process:

on EON as root, set up monitor account with strong password

mkdir /monitor
useradd -d /monitor monitor
passwd monitor
chown monitor /monitor

get the ssh functionality set up:

* make a new account. on monitoring machine as root:
useradd fresh
passwd fresh [ENTER twice for ampty password]
su - fresh
mkdir .ssh [you can skip this if .ssh dir already exists]
ssh-keygen -t rsa -f .ssh/eon_key
* set up auto-ssh
ssh monitor@10.0.1.250 mkdir -p .ssh
cat .ssh/eon_key.pub | ssh monitor@10.0.1.250 'cat >> .ssh/authorized_keys'


we should now be able to ssh to EON without password. test it:

ssh -i .ssh/eon_key monitor@10.0.1.250 ls /bin

works. next step: a command on localhost that can monitor zfs. problem: admin account doesn't have permissions to run zpool or zfs. how to set up an account that can check zpool status without having permission to write/delete pool or fs??

ssh -i .ssh/eon_key monitor@10.0.1.250 /usr/sbin/zpool status
pool: mediapool
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
mediapool ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
c0t0d0 ONLINE 0 0 0
c0t1d0 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
c2t1d0 ONLINE 0 0 0
c2t2d0 ONLINE 0 0 0
c2t3d0 ONLINE 0 0 0
c2t4d0 ONLINE 0 0 0
c2t5d0 ONLINE 0 0 0

errors: No known data errors

ssh -i .ssh/eon_key monitor@10.0.1.250 /usr/sbin/zpool destroy mediapool
cannot unshare '/mediapool/media': no permission: unshare(1M) failed
could not destroy 'mediapool': could not unmount datasets

ssh -i .ssh/eon_key monitor@10.0.1.250 /usr/sbin/zpool status -x | grep "all pools are healthy" || echo "NOT HEALTHY"
ssh -i .ssh/eon_key monitor@10.0.1.250 /usr/sbin/zpool status -x | grep "all pools are healthysfdf" || echo "NOT HEALTHY"
NOT HEALTHY

echo "TEST MAIL" | mail -s "nas problem" notify@gmail.com

ssh -i .ssh/eon_key monitor@10.0.1.250 /usr/sbin/zpool status -x | grep "all pools are healthy" || ssh -i .ssh/eon_key monitor@10.0.1.250 /usr/sbin/zpool status -v | mail -s "nas problem" notify@gmail.com

OKAY, we have a command which will contact EON NAS, check the zfs status, and notify us if anything is wrong. I don't have another local server, so I'm going to monitor from an external server. My local net access is via cable modem, no persistent IP address, so i have to use a dynamic DNS solution.

* freedns.afraid.org, set up a subdomain like "eonstorage.uk.to"
* figure out how to update dyndns when IP address changes.. my router runs dd-wrt which has support for freedns.afraid.org so this is easy
* forward the appropriate port... for security pick a random unused port, eg 62426, and forward it to port 22 of local EON server
* test from 3rd party host: ssh -p 2222 monitor@eostorage.uk.to
* set up chron job on external server

Thursday, December 3, 2009

Troubleshooting OpenSolaris USB Boot

My BIOS will hang if a bootable OS USB drive is present during POST - before mem test if present at boot, or at whatever moment it is inserted.

GParted output for unknown OS config:

/dev/sda
unallocated 2MB
/dev/sda1 992MB unknownFS BOOT
diskLabelType: msdos
Heads: 255
Sectors/Track: 63
Cylinders: 126

fdisk output for same:
Disk ID: 0x000000000
/dev/sda1 BOOT Id=bf System=Solaris
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(1023, 254, 63) logical=(0, 65, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(126, 182, 56)



Now write USB key with FreeNAS Embedded using m0n0wall procedure (as root):

gunzip -c /home/geoff/Desktop/FreeNAS-amd64-embedded-0.7.4919.img| dd of=/dev/sda bs=16k


boot from the USB key to verify that it was correct: YES, FreeBSD starts to load


GParted output:

/dev/sda
unallocated 988MB
diskLabelType: unrecognized
Heads: 255
Sectors/Track: 63
Cylinders: 126


fdisk output:

This disk has both DOS and BSD magic
Give the 'b' command to go to BSD mode.

disk id: 0x90909090
/dev/sda4 BOOT id=a5 System=FreeBSD
Partition 4 has different physical/logical endings:
phys=(1023, 254, 63) logical=(3, 28, 41)

[give 'b' command]

Partition /dev/sda4 has invalid starting sector 0.

Saturday, November 28, 2009

OpenSolaris as windows storage appliance: bulletproofing

Running OS snv_124 via EON, created a ZFS pool and dataset, set smbshare=guestok=true, browsed to the CIFS share from a Windows XP box, and ran some tests.

Copy two files to share by drag-and-drop in Finder, yank power to the server before second file finishes copying. After powering server back up, both files are there with correct (full) file size. The only hint that the second file might not be complete/correct is the timestamp, which was left at time of copy rather than time of original file. Of course, checksums differ between original copy on Windows box and the unfinished copy on server.








I understand that this behaviour is not OpenSolaris' fault. However it is undesireable: it is non-transactional, and a form of data corruption. If a connection to server is lost during a bulk transfer over CIFS, the user has to hunt down which file(s) might be incomplete and manually check/delete them. A backup solution which compares file size and date might fail, it would need to checksum all files or have "date inversion -> recopy" logic (and I do not know whether the timestamp is 100% reliable as an indicator of incomplete write) If a user is prompted "do you wish to overwrite file size 123456 with older version size 123456" they will likely decline, leaving the copy on server incorrect.

I also understand that this situation can be avoided: only write files using a utility which write to tmp file then renames, for instance. However it would increase the value of OS as a storage appliance to be as bulletproof as possible to *any* use by Windows users.

Ideally, incomplete files should never have full file size. This would allow any dumb or manual backup process to detect the incompleteness. For instance, right click->properties on a parent folder would show a difference in size vs original, indicating that the data within is not complete. Basic filesize comparison would trigger a recopy without relying on more esoteric properties such as timestamp.

Is there any currently available method to mitigate this from the OS side? eg

1. Making sure that file sizes will always reflect the amount of data written
2. CIFS option to implement file writes as tmp->rename... this way incomplete files appear to be missing (although without 1. some methods, eg checking size of parent folder, would still mislead users)
3. Some method to remove file completely if write did not complete, perhaps relying on ZIL mechanism so it can be applied at startup after server crash.

Failing that, is there any one-time configuration to a Windows machine to change any of its behaviours to increase robustness?

I am not familiar with the details of CIFS and how various versions of windows handle file copy/move. It is likely that the suggestions above are impossible or don't make sense. However finding a way to make sure that incomplete file/batch copies are immediately detectable would make OS more robust as a storage appliance.

Pointers from those in the know about what can and can't currently be done, what a future solution might look like, or why the above is totally wrong-headed are appreciated.

Thursday, November 26, 2009

EON NAS

A LiveCD version of OpenSolaris meant for NAS use. Unlike FreeNAS, does not offer a slick web GUI for management (although there is work being done to get a basic web gui in place). However being built off OpenSolaris and with releases tracking the latest dev builds, you get the most current ZFS implementation possible without having to sysadmin and upgrade an OpenSolaris system. Because ZFS is self-contained on a set of drives, it is pretty stable even if your hardware dies or if you lose your config when upgrading... just run the latest EON build, import your old ZFS pool, reconfigure network and shares, good to go.



EON:

http://sites.google.com/site/eonstorage/
http://eonstorage.blogspot.com/

REFERENCES:

http://docs.sun.com/app/docs/doc/819-2240/zfs-1m
http://docs.sun.com/app/docs/doc/819-2240/share-1m generic options for sharenfs (and sharesmb?)
http://docs.sun.com/app/docs/doc/819-2240/share-nfs-1m nfs-specific options for sharenfs
http://dlc.sun.com/osol/docs/content/SSMBAG/troubleshooting.html CIFS troubleshooting (OS doc)
http://wiki.genunix.org/wiki/index.php/Solaris_CIFS_Service_Troubleshooting CIFS troubleshootig (genunix wiki)
http://blogs.sun.com/dougm/entry/sharemgr_and_zfs two ways to set nfs options


Download eon-0.594-124-64-cifs.iso from http://www.genunix.org/ ... not entirely clear on SMB vs CIFS but it seems CIFS is later-and-greater.

http://wiki.genunix.org/wiki/index.php/Getting_Started_With_the_Solaris_CIFS_Service
http://docs.sun.com/app/docs/doc/819-2240/zpool-1m?a=view
http://docs.sun.com/app/docs/doc/819-2240/share-nfs-1m?a=view

Burn to a CD - would like to put directly on USB drive but it isn't offered in that format yet, so the install path is ISO -> CD -> BOOT -> install to USB from booted system.

Boot from CD, everything comes up to "eon console login" without problem.

Following the guide at bottom of eon homepage, log in with user: root pass: eonsolaris and run /usr/bin/setup. I have 2 NICs so I configured one as part of my network (10.0.1.250) and the other for potential direct connection (192.168.1.250) /usr/bin/install.sh to install to a bootable USB drive... I ran this once before plugging in my USB drive, ctrl-C to cancel, plugged in USB drive and ran again. This way I could be sure that the new device which appeared on second run was my USB drive. install.sh prompted me a couple times to confirm writing data to thumb drive, then hung for a while apparently trying access some disk that didn't exist. waited patiently for a while, eventually the thumb drive started flashing again and install.sh finished. I then ran /usr/bin/updimg.sh as suggested by the guide, although it wasn't entirely clear to me why.. I guess the image written to thumb drive was the pre-install version, and now I needed to immediately update it? Regardless, follow the instructions. Unfortunately, updimg.sh requires path to image to be written. Suggested path is /mnt/eon0/boot/x86.eon but /mnt/eon0 eon1 and eon2 were all mounted read-only. I replugged my USB drive, it flashed and dmesg showed it "online" but it did not automount. I started install.sh again just to grab the device number of my USB disk: c1t0d0 then ran "mkdir /mnt/newroot" and "mount /dev/dsk/c1t0d0s0 /mnt/newroot" ls /mnt/newroot/boot shows that there is already an x86.eon there, so I doubt this step is necessary... but regardless run /usr/bin/updimg.sh /mnt/newroot/boot/x86.eon it took a while, finished with no errors, I removed the CD and rebooted.

On reboot, BIOS seemed broken, wouldn't get past POST screen. Hard power off, wait for a while, power on. Still no go. Unplug all devices and drives except for PS2 keyboard, reboot... get past POST to DISK BOOT FAILURE. plug in USB drive and reboot. hangs in POST... so it definitely seems to be the newly formatted thumb drive that is breaking boot. Can't find a away around it, let's try again...

Boot from CD, skip setup (which was only NIC's anyway), install.sh to a hard drive partition this time. install.sh mentions that it is creating boot/x86.eon so don't bother then the troublesome updimg step. Reboot w/o CD. Boots from HD ok.

Really would prefer USB, repeat streamlined install to USB key. Still no dice... it leaves USB key in a state that hangs POST. Just to be sure, flash the same drive with FreeNAS boot image using m0n0wall method and boot from that - no problem. So it seems to be an issue with the way EON install.sh preps the drive

WELL, I was unable to get OpenSolaris official dev .usb images to boot either, they had the same problem, and since OpenSolaris seems to be the only full-featured / robust ZFS implementation, I'm stuck with this limitation for now. As main OS branch lacks CIFS and includes GUI, I'm back to messing with EON.

Boot from installed HD image. 'mkfile 5000M /mnt/eno0/file1' and file2 then

zpool create testpool /mnt/eon/file1
zfs create testpool/testfs
df -k [shows testpool/testfs with 1% used]

now that zfs is up, share it over CIFS... I expected to zpool set sharesmb but http://sites.google.com/site/eonstorage/getting-started only has us setting permissions... because net share is default in EON? Let's try it out.

groupadd -g 600 media
useradd -u 502 -g 600 -s /bin/bash mediausr
passwd mediausr
cd /testpool
chown -R mediausr:media testfs
chmod 755 testfs

/usr/bin/setup to initialize interfaces
/usr/bin/updimg.sh /mnt/eon0/boot/x86.eon

plug in the network cable. in console get NOTICEs from smbsrv that . and zfstestpool "share not found"

windows: start -> run -> \\10.0.1.250\ results in connection, but resulting window shows no shares

"zfs get all" confirms that sharesmb is not enabled, so

zfs set sharesmb=on testpool/testfs

back to windows and try again: now testpool_testfs shows up! enter username but passwd not accepted

zfs set sharesmb=guestok=true testpool/testfs

windows: re-open \\...250\ and am now able to open testpool_testfs\ however write access is denied... set guestok to false and troubleshoot write access... get password prompt, but mediausr/media is not accepted.

test mediausr account by ssh'ing in with mediausr/media - it works. so user account is OK, it is just CIFS authentication that doesn't link up to it.

chmod A-everyone@:full_set:fd:allow testfs

windows: still keeps re-promting me for my password. set guestok=true again

can now write files! at some point I'll need it passwd protected for write, but for now i can move on to tests

copy two files, yank power halfway through second file

power up, restore testpool:
zpool import -d /mnt/eon0/ testpool
zpool status
ls -l /testpool/testfs

looks good, I see only the first file. The partial second file does not appear, even though it had been listed with full size as copy began... so unlike my FreeNAS tests, does not leave invalid but apparently correct files (which would require checksumming to detect their incorrectness) However, trying to checksum the file on NAS silently fails, and trying to copy back to desktop to checksum locally fails with "I/O error" message. If I copy file 2 over to EON I can copy it back, but file 1 still gives IO error.

zpool status -v shows the error with the file. HMMM, is this a case of bad disk, zil not flushing, or what? on the plus side the error was caught, but on the negative side there was corruption. then again, the EON install root is not on ZFS, so can't expect it to be bulletproof... really need a separate disk to test with.

START OVER with two clean, tested raw drives

Boot from CD, setup to configure interfaces, install to master HD. Replace CD-ROM with second HD (slave) and boot from installed system.

zpool create testpool c0d1
zfs create testpool/testfs
/usr/bin/updimg.sh /mnt/eon0/boot/x86.eon

reboot to test: "Bad or corrupt data while decompressing file" ouch!

Swap back to CD-ROM and reinstall to HD. skip setup and immediately updimg. reboot: worked. run setup, updimg again. reboot: worked. "zpool import" lists the testpool i previously created, "zpool import -f testpool" brings it back online. updimg again to test zfs automounting on reboot. reboot works but zfs pool is not mounted?? I need the workaround from http://eonstorage.blogspot.com/2009/10/eon-zfs-storage-0594-based-on-snv124.html - "zpool import -a" in .exec moving on:

zfs set sharesmb=on testpool/testfs
zfs set sharesmb=guestok=true testpool/testfs

reboot

zfs get all | grep sharesmb -> confirmed working
connect from windows: folder opens but no write access.
chmod A-everyone@:full_set:fd:allow testfs -> "chmod: ERROR: ACL entry doesn't exist"
chmod 777 testfs

that fixed it! so, eventually i need a coherent account/permissions strategy: would like share to be listed when network is browsed, and open read-only access, so that guests can browse and play media without needing any special instructions or login. however write access should be password protected, with only my windows box set up with password, so neighbors can't delete my media.

for now, on to tests.

copy a couple files: OK
copy them back: OK, but read is MUCH slower than write !?! perhaps limited by write speed to local disk?
md5sum a file on share: completes in about 1min, so read is faster, prev test must have been limited by write to local disk
close browser window, reboot NAS: browse and file read works

copy 2 files, yank power towards end of 2nd file. windows beefs a bit. after bootup, reconnect: file 1 and 2 both appear complete with full file size! the only difference is that the date on the new file has not been set. this is a transactional violation and form of silent data corruption... files appear to novice user to be complete, a backup solution would have to checksum all files or have special "date inversion -> recopy" logic to know the file needs to be updated, user who loses connection during a bulk copy needs to search through and figure out exactly where the copy was when it died... it would increase value as a storage appliance if there was a way to mitigate this effect... a configuration for CIFS that file writes use tmp name/path until they are complete? an option in ZFS that anything pending in ZIL which doesn't include file close / completion should be unwound?


important: When creating a ZFS file system to be used for SMB file sharing, set the casesensitivity option to mixed to permit a combination of case-sensitive and case-insensitive matching. Also, set the nbmand option to enforce mandatory cross-protocol share reservations and byte-range locking. via http://wiki.genunix.org/wiki/index.php/Getting_Started_With_the_Solaris_CIFS_Service


zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=guestok=true testpool/testfs2
chmod 777 /testpool/testfs2

test results are the same. moving on, let's configure ACL

chmod 775 /testpool/testfs2 # Undo the global write permissions we used during tests

groupadd -g 600 media
useradd -u 502 -g 600 mediausr
passwd mediausr
chown -R mediausr:media /testpool/testfs2

For now, not getting crazy, in fact not setting ACL explicitly; just using chmod 775 to take away write access for non-authenticated users. Now the only trick is to get login working for normal user accounts over CIFS... something about CIFS passwords not being compatible with /etc/passwd, so you have to enable CIFS password shadowing then set the password again for each user that needs to connect via CIFS.

... well according to http://wiki.genunix.org/wiki/index.php/Getting_Started_With_the_Solaris_CIFS_Service and examining the state of EON, it looks like everything is already set up. the EON instructions at http://sites.google.com/site/eonstorage/getting-started support the idea that no special steps need be taken.

run -> \\10.0.1.250\ -> browse, full read permission but no write permission. up to toplevel list of shares, right click on testfs2 and "map network drive", select "connect as other user" and enter mediausr/media, click OK... it reprompts for my password. enter again and check "remember password" box. viola, Z: now appears under "My Computer", and from there I have write permission.

Now the last piece of the puzzle... it would be nice to see the shares listed under "browse network" so that visitors would not have to enter in IP addresses manually. When working with FreeNAS I had the experience that my windows box would not list the share, but OSX would. Come to think of it, my old ReadyNAS behaves the same way... OSX can browse to it but it was invisible to WinXP unless the IP address was given or Raidar GUI was used to connect. Testing OX -> Finder -> Go -> Network... I see FFEM folder with readynas server inside, and an empty WORKGROUP folder. Hmmm, is that WORKGROUP folder from EON? It is the default workgroup name... try Go -> Connect to server and type in IP address, but then it only uses afp protocol, and there is no obvious way to change the protocol used.

smbadm list -> confirms that primary domain is WORKGROUP
smbadm join -w TESTGROUP -> try a different name that will be obvious when encountered

back to OSX, no change. log user out, log in a different user, disconnect and reconnect to wireless network. go to Finder -> Nerwork: no change. still see empty WORKGROUP, no sign of TESTGROUP. try Go -> Connect to server -> smb://10.0.1.250/ - get password prompt! however empt user/pass gives error. username 'guest' empty pass gives error. i recall something about a bug with empty fields during logon... oh yeah, this: http://defect.opensolaris.org/bz/show_bug.cgi?id=11890 hasn't been fixed yet, so for now we'll make an explicit guest account:

useradd -u 503 guest
passwd guest # hit enter twice to confirm empty password

try OSX "Connect to server" -> smb://10.0.1.250 -> log in with guest/[empty] -> still fails with error. okay, set password to guest and try again.... still fails with error -50. Hrmm. Try again with our poweruser account mediausr/media ... still fails. this same login works from windows, so the problem lies elsewhere. while we're at it, test guest/guest from windows "map network drive" ... works as expected, read-only access. Hey, perhaps the OSX problem is related to a bug referenced here: http://opensolaris.org/jive/thread.jspa?messageID=438356&tstart=0 "empty domain prevents guest login". i'm not using the test account, but I did set an empty domain... rerun /usr/bin/setup and enter eon.com for domain. rejoin TESTGROUP. no dice.

I notice that my connection from OSX to ReadyNAS is actually using nfs. Try explicitly connect to smb://ip_address and it works with any username/password. So OSX is capable of connecting to SMB/CIFS. Still, this suggests a workaround for EON: sharing via NFS

zfs set sharenfs=ro testpool/testfs2

OSX -> Go -> Connect to server -> nfs://10.0.1.250 -> connecting...

SO, back to the other pending issue... how to make sure shares are visible under "My Network Places" (check again, can't see TESTGROUP and WORKGROUP is empty)

http://www.mail-archive.com/cifs-discuss@opensolaris.org/msg01386.html
http://www.addonics.com/support/faqs/faq-sunsupport.asp
http://blogs.sun.com/afshinsa/entry/how_to_enable_guest_access


START OVER with EON-NAS 0.59.5

before starting, boot from partedmagic and make sure disks are wiped, otherwise they might be mounted and prevent install to HD

boot from EON-NAS 0.59.5 CD, log in with root/eonsolaris
type "format" and ctrl-c out to get a list of drives... can clearly see that my small drive (will be root) is c0d0 while big drives are c1d0/c1d1/c2d0
/usr/bin/install.sh [select c0d0 to install on]
[hard reboot, remove EON CD... i've noticed that net interfaces don't come up until after reboot]


login with root/eonsolaris
/usr/bin/setup
and configure net interfaces - enter eon.com for domain because there is some bug related to "empty domain"
zpool create mediapool raidz c1d0 c1d1 c2d0
zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=guestok=true -o sharenfs=ro mediapool/media
groupadd -g 600 media
useradd -u 502 -g 600 media
passwd media
chown -R media:media /mediapool/media
chmod 775 /mediapool/media
/usr/bin/updimg.sh /mnt/eon0/boot/x86.eon
reboot

login with root/eonsolaris
ping 10.0.1.1 to make sure network came up
df -k to make sure zfs automounted
if not, 'zpool import -a' to test import, then uncomment 'zpool import -a' line in /mnt/eon0/.exec

in windows, start -> run -> \\10.0.1.250\ -> anon read-only access
right click -> map network drive -> connect as other user -> media/media -> rw access
OSX -> browse network -> fail
OSX -> connect to server -> nfs://10.0.1.250/ -> connecting.................
OSX -> connect to server -> smb://10.0.1.250/ -> auth error -50 for any account info

SO: back where we were previously: win works (except for browsing network) can't access at all from OSX

further tests:

linux CIFS/SMB:

From fedora, Places -> Connect to server... -> Windows share -> 10.0.1.250 -> share list -> click on mediapool_media -> pass prompt -> can't connect w/o password -> any password works, connect, can read files

linux nfs:
no go


TROUBLESHOOTING:

check zfs options:
zfs get mediapool/media >& /tmp/getout; more /tmp/getout

check zfs:cifs options:
zfs get sharesmb mediapool/media

check zfs:nfs options:
zfs get sharenfs mediapool/media


smb service seems to be running:

media:89:~#svcs '*smb*'
STATE STIME FMRI
online 13:11:17 svc:/network/smb/client:default
online 13:11:22 svc:/network/smb/server:default

however nfs does not seem to exist in either enabled or disabled state:
media:91:~#svcs '*nfs*'
svcs: Pattern '*nfs*' doesn't match any instances
STATE STIME FMRI

furthermore:
media:93:~#ps aux | grep smb
root 607 0.0 0.215844 7620 ? S 13:11:18 0:05 /usr/lib/smbsrv/sm
root 1331 0.0 0.1 1632 960 pts/2 S 20:53:08 0:00 grep smb

media:94:~#ps aux | grep nfs
root 1333 0.0 0.1 1632 960 pts/2 S 20:53:33 0:00 grep nfs

no sign of nfs at all in running processes/services... screw it, start nfs manually and see if we get changed results...

media:98:~#/usr/lib/nfs/nfsd
media:99:~#ps aux | grep nfs
daemon 1341 0.0 0.1 2912 1848 ? S 20:55:26 0:00 /usr/lib/nfs/nfsd
root 1343 0.0 0.1 1632 960 pts/2 S 20:55:31 0:00 grep nfs

RPC: Rpcbind failure - RPC: Unable to receive

still no go...


follow the instructions here:

http://sites.google.com/site/eonstorage/faq -> How do I start NFS server services

cd /var/svc/manifest/network
svccfg -v import rpc/bind.xml
svccfg -v import nfs/status.xml
svccfg -v import nfs/nlockmgr.xml
svccfg -v import nfs/server.xml
svcadm enable rpc/bind
svcadm enable nfs/status
svcadm enable nfs/nlockmgr
svcadm enable nfs/server

now we see evidence of nfs running:

media:22:/var/svc/manifest/network#svcs | grep nfs
online 21:35:52 svc:/network/nfs/status:default
online 21:36:04 svc:/network/nfs/nlockmgr:default
online 21:36:21 svc:/network/nfs/server:default
media:23:/var/svc/manifest/network#ps aux | grep nfs
root 1526 0.0 0.1 3324 2104 ? S 21:36:20 0:00 /usr/lib/nfs/mount
daemon 1159 0.0 0.1 3272 2160 ? S 21:35:52 0:00 /usr/lib/nfs/statd
daemon 1331 0.0 0.1 2900 1968 ? S 21:36:04 0:00 /usr/lib/nfs/lockd
daemon 1528 0.0 0.1 2908 1844 ? S 21:36:20 0:00 /usr/lib/nfs/nfsd
root 1578 0.0 0.1 1632 960 pts/1 S 21:36:43 0:00 grep nfs


from linux:
[root@localhost]~# mount -v 10.0.1.250:mediapool/media /mnt/nfs
mount: no type was given - I'll assume nfs because of the colon
mount: trying 10.0.1.250 prog 100003 vers 3 prot tcp port 2049
mount: trying 10.0.1.250 prog 100005 vers 3 prot udp port 64243
[root@localhost]~# ls /mnt/nfs
TESTFILE.dat

works!

in order for changes to persist after reboot, need to
/usr/bin/updimg.sh /mnt/eon0/boot/x86.eon

from mac:

nfs://10.0.1.250
nfs://10.0.1.250:/mediapool/media
nfs://10.0.1.250:mediapool/media
nfs://10.0.1.250/mediapool/media


the last works! http://mygeekproject.com/?cat=8 seems a tad off on the syntax, at least for OSX 10.4


now for some testing: hard power off, swap drives cables around so they are out-of-order:

result: perhaps due to "zfs import -a" in .exec, it boots up fine!


BULK UP:

plug 8 2TB drives into ports 1-6 and 9-10 (7-8 are IDE which is controller 4). However find that regardless of drive or cable, we have a problem if a drive is plugged into port 9 = controller 5 master disk. can't help but recognize the possibility that there is a conflict between IDE and SATA channels 4/5 master... especially since there is a "SATA/IDE control mode" option in BIOS

BIOS: change "SATA RAID/AHCI Mode" from 'Disabled' to 'AHCI'
result: bootup is notably different, with different timing/language around disk detection. boot still stalls with 'early timeout' and 'ata_disk_start: select failed' errors.

BIOS: change 'Onboard SATA/IDE Ctrl mode' from IDE to AHCI
results: last two drive come on a separate screen of bootup and in blue. however bootup stall because (apparently) IDE disk can no longer be found. interestingly, shows IDE master as "HDD0" and GSATA_0 as HDD1 - apparently no conflict? is it possible that BIOS boot order is messed up now? BIOS settings: note that it goes through both screens of disk detection before going to setup pages. once there, YES, our IDE root disk is buried in the boot order menu. move it to first: boot succeeds. great, we now have it booting with the same physical setup that previously failed with apparent conflict. Wierd thing is, master and disk0 on controller show up as HDD1 and HDD2 in BIOS boot process... they should be either 1 and 3, counting both controllers in order, or both HDD1 because both are first drive on the controller and conflicting. Is it possible to add 8th SATA drive and break the 8-drive barrier??? plug in topmost SATA to GSATA_1... BIOS steps now show HDD0, HDD2, and HDD2!! Boot succeeds! try making an 8-disc raidz set:

zfs destroy mediapool/media
zpool destry mediapool
zpool create mediapool c0t0d0 c0t1d0 c2t0d0 c2t1d0 c2t2d0 c2t3d0 c2t4d0 c2t5d0
zfs create -o casesensitivity=mixed -o nbmand=on -o sharesmb=guestok=true -o sharenfs=ro mediapool/media

works: df -k show we have a 13.3TB filesystem. OSX mounts it via NFS, no write permission

actually, there is a problem: files show up with crazy-ass permissions, and can't be accessed from linux or from OSX. things to try: undoing the max_version, setting ACL-style permissions (aren't they already set?) for that fs, looking into UID_NOBODY, etc.

Examine the share on the OS box:

media:2:~#ls -ldv /mediapool/media/
drwxrwxr-x 2 media media 4 Dec 6 00:30 /mediapool/media/
0:owner@::deny
1:owner@:list_directory/read_data/add_file/write_data/add_subdirectory
/append_data/write_xattr/execute/write_attributes/write_acl
/write_owner:allow
2:group@::deny
3:group@:list_directory/read_data/add_file/write_data/add_subdirectory
/append_data/execute:allow
4:everyone@:add_file/write_data/add_subdirectory/append_data/write_xattr
/write_attributes/write_acl/write_owner:deny
5:everyone@:list_directory/read_data/read_xattr/execute/read_attributes
/read_acl/synchronize:allow

media:4:~#sharemgr show -vp
default nfs=()
zfs
zfs/mediapool/media nfs=() smb=(guestok="true") nfs:sys=(ro="*")
mediapool_media=/mediapool/media

here is a file written from windows via authorized CIFS share:

media:5:~#ls -ldv /mediapool/media/snowfall2.MP4
----------+ 1 media media 63966846 Dec 8 2006 /mediapool/media/snowfall2.MP4
0:user:media:read_data/write_data/append_data/read_xattr/write_xattr
/execute/delete_child/read_attributes/write_attributes/delete
/read_acl/write_acl/write_owner/synchronize:allow
1:group:2147483648:read_data/write_data/append_data/read_xattr
/write_xattr/execute/delete_child/read_attributes/write_attributes
/delete/read_acl/write_acl/write_owner/synchronize:allow


SO, it seems the problem is not NFS per se, but the fact that files written from windows over CIFS have weird permissions. test by writing a file from OS and see if it can be read by NFS clients:

media:6:~#vi /mediapool/media/test_file_written_by_open_solaris
media:7:~#
media:7:~#ls -lv !$
ls -lv /mediapool/media/test_file_written_by_open_solaris
-rw-r--r-- 1 root root 48 Dec 6 08:35 /mediapool/media/test_file_written_by_open_solaris
0:owner@:execute:deny
1:owner@:read_data/write_data/append_data/write_xattr/write_attributes
/write_acl/write_owner:allow
2:group@:write_data/append_data/execute:deny
3:group@:read_data:allow
4:everyone@:write_data/append_data/write_xattr/execute/write_attributes
/write_acl/write_owner:deny
5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize
:allow


from OSX:

lancebook-2% ls -l /Volumes/10.0.1.250-4/test_file_written_by_open_solaris
-rw-r--r-- 1 root wheel 48 Dec 6 11:35 /Volumes/10.0.1.250-4/test_file_written_by_open_solaris
lancebook-2% cat /Volumes/10.0.1.250-4/test_file_written_by_open_solaris
this file was written by open solaris root user



I recall something about setting ACL inherit property on the toplevel share, so all new files would inherit readibility...

zfs get all mediapool/media
mediapool/media aclmode groupmask default
mediapool/media aclinherit restricted default

ah yes, http://breden.org.uk/2009/05/10/home-fileserver-zfs-file-systems/ is an example. try:

media:14:~#zfs set aclinherit=passthrough mediapool/media
media:16:~#zfs set aclmode=passthrough mediapool/media

now copy a file from windows box via CIFS and check it:

media:20:~#ls -l /mediapool/media/YogaNidraHQ.mp3
----------+ 1 media media 59463068 May 22 2007 /mediapool/media/testfile.dat
media:21:~#ls -lV /mediapool/media/YogaNidraHQ.mp3
----------+ 1 media media 59463068 May 22 2007 /mediapool/media/testfile.dat
user:media:rwxpdDaARWcCos:-------:allow
group:2147483648:rwxpdDaARWcCos:-------:allow

still looks funky, sigh... and note there are no permissions for everyone?


chmod A=owner@:rwxpdDaARWcCos:fd-----:allow,group@:rwxpdDaARWcCos:fd-----:allow,everyone@:rwxpdDaARWcCos:fd-----:deny /mediapool/media


oops, that removed read permissions for everyone...

media:26:~#ls -ldV /mediapool/mediadrwxrwx---+ 2 media media 7 Dec 6 09:41 /mediapool/media
owner@:rwxpdDaARWcCos:fd-----:allow
group@:rwxpdDaARWcCos:fd-----:allow
everyone@:rwxpdDaARWcCos:fd-----:deny
media:27:~#
media:27:~#chmod 755 !$
chmod 755 /mediapool/media
media:28:~#ls -ldV /mediapool/media
drwxr-xr-x+ 2 media media 7 Dec 6 09:41 /mediapool/media
owner@:rwxpdDaARWcCos:fdi----:allow
owner@:----dDaARWcCos:-------:allow
group@:rwxpdDaARWcCos:fdi----:allow
group@:----dDaARWcCos:-------:allow
everyone@:rwxpdDaARWcCos:fdi----:deny
everyone@:----dDaARWcCos:-------:deny
owner@:--------------:-------:deny
owner@:rwxp---A-W-Co-:-------:allow
group@:-w-p----------:-------:deny
group@:r-x-----------:-------:allow
everyone@:-w-p---A-W-Co-:-------:deny
everyone@:r-x---a-R-c--s:-------:allow
media:29:~#chmod 775 /mediapool/media
media:30:~#ls -ldV /mediapool/media
drwxrwxr-x+ 2 media media 7 Dec 6 09:41 /mediapool/media
owner@:rwxpdDaARWcCos:fdi----:allow
owner@:----dDaARWcCos:-------:allow
group@:rwxpdDaARWcCos:fdi----:allow
group@:----dDaARWcCos:-------:allow
everyone@:rwxpdDaARWcCos:fdi----:deny
everyone@:----dDaARWcCos:-------:deny
owner@:--------------:-------:deny
owner@:rwxp---A-W-Co-:-------:allow
group@:--------------:-------:deny
group@:rwxp----------:-------:allow
everyone@:-w-p---A-W-Co-:-------:deny
everyone@:r-x---a-R-c--s:-------:allow


okay, those are wierd and stacked permissions, but seem to be what I want...

make another test file over CIFS and check result:

media:31:~#ls -l /mediapool/media/testfile2.dat
-rwxrwx---+ 1 media media 2117760 May 31 2008 /mediapool/media/testfile2.dat

well that is a step in the right direction... it has recognizable simple options. only problem is a lack of read permissions for everyone... wish i could reset the ACL... but note that the desirable ACL states don't have any inheritance... construct ideal complex ACL settings using the ACL permissions/inheritance codes listed at http://docs.huihoo.com/opensolaris/solaris-zfs-administration-guide/html/ch07.html

chmod A=owner@:rwxpdDaARWcCos:fd-----:allow,group@:rwxpdDaARWcCos:fd-----:allow,everyone@:wpdDAWc:fd-----:deny,everyone@:rxaRCos:fd-----:allow /mediapool/media

now apply it:

media:32:~#chmod A=owner@:rwxpdDaARWcCos:fd-----:allow,group@:rwxpdDaARWcCos:fd-----:allow,everyone@:wpdDAWc:fd-----:deny,everyone@:rxaRCos:fd-----:allow /mediapool/media
media:33:~#
media:33:~#
media:33:~#ls -ldV /mediapool/mediadrwxrwxr-x+ 2 media media 8 Dec 6 09:48 /mediapool/media
owner@:rwxpdDaARWcCos:fd-----:allow
group@:rwxpdDaARWcCos:fd-----:allow
everyone@:-w-pdD-A-Wc---:fd-----:deny
everyone@:r-x---a-R--Cos:fd-----:allow

copy a test file over, check it:


media:34:~#ls -lV /mediapool/media/testfile3.dat
-rwxrwxr-x+ 1 media media 3641472 May 31 2008 /mediapool/media/testfile3.dat
owner@:rwxpdDaARWcCos:------I:allow
group@:rwxpdDaARWcCos:------I:allow
everyone@:-w-pdD-A-Wc---:------I:deny
everyone@:r-x---a-R--Cos:------I:allow

looks good! check from OSX nfs mount:

lancebook-2% ls -l /Volumes/10.0.1.250-4/
-rwxrwxr-x 1 fresh 600 3641472 May 31 2008 testfile3.dat

looks good except that write is allowed by uid/gid... in this case OSX local user "fresh" has the same uid so fresh would be allowed to delete the file. need to remount NFS read-only... wait, it is set to ro in zfs attributes. log in as "fresh" - can't modify files. seems solid!