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