Linux dd - 디스크 복제 # 우선 디스크 정보부터 확인 [root@Eloquence ~]# fdisk -l Disk /dev/sda: 300.0 GB, 300000000000 bytes,
585937500 sectors // 원본 데이터가 저장된 디스크 # Start End Size Type Name Disk /dev/sdb: 300.0 GB, 300000000000 bytes, 585937500 sectors // 원본 데이터를 고스란히 물려받을(?) 디스크 # Start End Size Type Name # 복제 진행 및 진행상황 모니터링 [root@Eloquence ~]# dd if=/dev/sda of=/dev/sdb bs=512 [root@Eloquence ~]#iostat -m 2 // MB단위로 2초마다 iostat 값 출력 - 상황에 맞게 옵션값 변경해주세요. # 결과 확인 Disk /dev/sda: 300.0 GB, 300000000000 bytes, 585937500 sectors # Start End Size Type Name
Disk /dev/sdb: 300.0 GB, 300000000000 bytes, 585937500 sectors // sda 내용이 sdb에 똑같이 복제된 걸 확인. # Start End Size Type Name
Linux dd - 디스크 초기화(삭제) # 두 가지 방법이 있습니다. # ① 디스크 데이터 완전 삭제 # dd if=/dev/zero of=데이터 삭제될 대상 디스크 장치 이름 # dd if=/dev/random of=데이터 삭제될 대상 디스크 장치 이름 [root@Eloquence ~]# dd if=/dev/zero
of=/dev/sdb # ② 디스크 파티션 삭제 [root@Eloquence ~]# dd if=/dev/zero of=/dev/sdb count=1 bs=512 [root@localhost ~]# fdisk -l . . . 전략 WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. Disk /dev/sdb: 300.0 GB, 300000000000 bytes, 585937500 sectors // sdb 데이터 및 파티션이 비었는 걸 확인 제 주관적인 지식을 통해 작성된 글이며, 틀린 부분이 있다면 의견을 달아주세요. |