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"