[OpenIndiana-discuss] How does this even work?

Cryptographrix cryptographrix at gmail.com
Mon Feb 20 01:48:14 UTC 2017


root at nas:/etc# uname -a

SunOS nas 5.11 oi_151a8 i86pc i386 i86pc Solaris


root at nas:/etc# export OLD_DISK=c16t50014EE258D78C8Bd0


root at nas:/etc# export NEW_DISK=c16t5000C500939587DBd0


root at nas:/etc# prtvtoc /dev/rdsk/${OLD_DISK}

* /dev/rdsk/c16t50014EE258D78C8Bd0 partition map

*

* Dimensions:

*     512 bytes/sector

* 3907029168 sectors

* 3907029101 accessible sectors

*

* Flags:

*   1: unmountable

*  10: read-only

*

* Unallocated space:

*       First     Sector    Last

*       Sector     Count    Sector

*          34       222       255

*

*                          First     Sector    Last

* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory

       0      4    00        256 3907012495 3907012750

       8     11    00  3907012751     16384 3907029134


root at nas:/etc# iostat -E ${OLD_DISK}

sd37      Soft Errors: 0 Hard Errors: 0 Transport Errors: 0

Vendor: ATA      Product: WDC WD2002FYPS-0 Revision: 5G04 Serial No:
WD-WCAVYNNNNNNN

Size: 2000.40GB <2000398934016 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0

Illegal Request: 0 Predictive Failure Analysis: 0


root at nas:/etc# echo "p" | parted /dev/rdsk/${OLD_DISK}

GNU Parted 1.8.8

Using /dev/rdsk/c16t50014EE258D78C8Bd0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) p

Model: Generic Ide (ide)

Disk /dev/rdsk/c16t50014EE258D78C8Bd0: 2000GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt


Number  Start   End     Size    File system  Name  Flags

 1      131kB   2000GB  2000GB               zfs

 9      2000GB  2000GB  8389kB


(parted)

root at nas:/etc# prtvtoc /dev/rdsk/${NEW_DISK}

* /dev/rdsk/c16t5000C500939587DBd0 partition map

*

* Dimensions:

*     512 bytes/sector

* 3907029168 sectors

* 3907029101 accessible sectors

*

* Flags:

*   1: unmountable

*  10: read-only

*

* Unallocated space:

*       First     Sector    Last

*       Sector     Count    Sector

*          34       222       255

*

*                          First     Sector    Last

* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory

       0      4    00        256 3907012495 3907012750

       8     11    00  3907012751     16384 3907029134


root at nas:/etc# iostat -E ${NEW_DISK}

sd52      Soft Errors: 0 Hard Errors: 0 Transport Errors: 0

Vendor: ATA      Product: ST2000DM006-2DM1 Revision: CC26 Serial No:
NNNNNNNN

Size: 2000.40GB <2000398934016 bytes>

Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0

Illegal Request: 0 Predictive Failure Analysis: 0


root at nas:/etc# echo "p" | parted /dev/rdsk/${NEW_DISK}

GNU Parted 1.8.8

Using /dev/rdsk/c16t5000C500939587DBd0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) p

Model: Generic Ide (ide)

Disk /dev/rdsk/c16t5000C500939587DBd0: 2000GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt


Number  Start   End     Size    File system  Name  Flags

 1      131kB   2000GB  2000GB               zfs

 9      2000GB  2000GB  8389kB


(parted)


root at nas:/etc# zpool replace --help

invalid option '-'

usage:

        replace [-f] <pool> <device> [new-device]



root at nas:/etc# zpool replace -f rspool ${OLD_DISK} ${NEW_DISK}

cannot replace c16t50014EE258D78C8Bd0 with c16t5000C500939587DBd0: devices
have different sector alignment


More information about the openindiana-discuss mailing list