월간 인기 게시물

게시물 718건
   
cinder backup-restore memo 2
글쓴이 : 최고관리자 날짜 : 2016-04-07 (목) 11:42 조회 : 3229
                                
backup-restore Volume Size 가 다를경우 아래와 같은 과정을 거치면...작업가능
(단. 확장되지 않은 Volume에 백업된 파일을 사용할수 없음. 현시점을 기준으로 확장 --> 백업 --> restore)

 Extend --> 백업대상 Volume-detach --> 백업대상에서 복구파일 restore --> backup-create --> 
작업하려는 인스턴스에 restore --> volume-attach

# cinder list
....................................
| 306062c4-e73a-44d5-8070-b84da98b0b7d | available |   ceph_volume_5   |  5   |      -      |  false   |    False    |                                      |


:: 5G Volume을 30G Volume으로 확장 
# cinder extend 306062c4-e73a-44d5-8070-b84da98b0b7d 30
# nova volume-detach bdb147a9-2cec-4914-9c63-f6a202140366 1d836f22-58c2-4e7d-b54e-7fc8af4676e4
# cinder list
....................................
| 306062c4-e73a-44d5-8070-b84da98b0b7d | available |   ceph_volume_5   |  30  |      -      |  false   |    False    |                                      |

:: 현재 Volume 백업
# cinder backup-create 306062c4-e73a-44d5-8070-b84da98b0b7d --name "5g_change_30g"

# cinder backup-restore --volume 306062c4-e73a-44d5-8070-b84da98b0b7d  3a928365-a67f-4805-9775-f5709bada161

# nova volume-attach bdb147a9-2cec-4914-9c63-f6a202140366 306062c4-e73a-44d5-8070-b84da98b0b7d


인스턴스내
:: 마운트해서 Volume 정보확인
# mkdir /BAK_DISK
# mount /dev/vdi1 /BAK_DISK
# df -Th
Filesystem     Type   Size  Used Avail Use% Mounted on
...................................
/dev/vdi1      ext4   4.8G  1.7G  2.9G  38% /BAK_DISK


-s <partition>      give partition size(s) in blocks
# fdisk -s /dev/vdi
31457280   ---> 백업된 파일은 5G 였지만 30G 확장

:: Volume 확장 
# umount /BAK_DISK
# fdisk -u /dev/vdi
-u <size>                 give sizes in sectors instead of cylinders

※ Disk Resize 참고 URL

# reboot
# e2fsck -f /dev/vdi1
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vdc1: 17/327680 files (0.0% non-contiguous), 494832/1310644 blocks

# resize2fs /dev/vdi1
resize2fs 1.41.12 (17-May-2010)
The filesystem is already 7864312 blocks long.  Nothing to do!

# df -Th
Filesystem     Type   Size  Used Avail Use% Mounted on
...................................
/dev/vdI1      ext4    30G  1.7G   27G   7% /BAK_DISK


==> 다시 동일하게..아래과정....
Volume-detach --> backup-create --> backup-restore --> Volume-attach

이름 패스워드
�ㅽ���
援대┝
10pt
<html> <body>
 
 
 
 
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.