기존 Solaris11 설치를 새 디스크로 이동하는 방법

기존 Solaris11 설치를 새 디스크로 이동하는 방법

기존 Solaris 11(x86) 설치를 HDD에서 새 SSD로 옮기고 싶습니다. SSD는 HDD보다 크기가 작기 때문에 dd를 이용한 단순 복사는 불가능합니다.

답변1

내 문제에 대한 해결책을 찾았습니다.

  • DVD/ISO에서 부팅
  • 콘솔 시작

디스크 레이블 및 파티션 레이아웃 생성 

root@solaris:~# format c2t1d0

selecting c2t1d0 <VMware,-VMware Virtual S-1.0-16.00GB>
[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
        inquiry    - show disk ID
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> part

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
        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
        !<cmd> - execute <cmd>, then return
        quit
partition> print
Current partition table (original):
Total disk sectors available: 33537981 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector        Size        Last Sector
  0  BIOS_boot    wm                40     260.00MB         532519
  1        usr    wm            532520      15.74GB         33538013
  2 unassigned    wm                 0          0              0
  3 unassigned    wm                 0          0              0
  4 unassigned    wm                 0          0              0
  5 unassigned    wm                 0          0              0
  6 unassigned    wm                 0          0              0
  8   reserved    wm          33538015       8.00MB         33554398

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
        inquiry    - show disk ID
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> quit

새 디스크의 샤드 1에 새 zpool을 만듭니다.

root@solaris:~# zpool create rpool1 c2t1d0s1

원본 zpool의 재귀적 스냅샷 생성

root@solaris:~# zfs snapshot -r rpool@now

zfs send|receive를 통해 스냅샷을 새 zpool에 복사

root@solaris:~# zfs send -R rpool@now | zfs recv -Fdu rpool1

두 개의 zpool 내보내기

root@solaris:~# zpool export rpool
root@solaris:~# zpool export rpool1

원래 zpool 이름으로 새 zpool을 가져옵니다.

root@solaris:~# zpool import -f rpool1 rpool

시작 환경 활성화

root@solaris:~# beadm activate be://rpool/solaris

새 디스크에 부트로더 설치

root@solaris:~# bootadm install-bootloader -P rpool

시작 환경을 활성화합니다. (두 번째 활성화를 하지 않으면 오류가 발생합니다.)

root@solaris:~# beadm activate be://rpool/solaris

스냅샷 나열

root@solaris:~# zfs list -t snapshots

스냅샷 삭제

root@solaris:~ # zfs destroy -R rpool@now

재시작

root@solaris:# reboot

시스템에서 오래된 디스크 제거

관련 정보