--home 디렉토리를 백업
tar -zcvf /root/home.tar.gz -C /home .
--백업이 잘 되었는지 테스트
tar -tvf /root/home.tar.gz
--home 디렉토리를 언마운트
umount /dev/mapper/centos-home
-> umount: /home: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
--Logical Volume을 삭제
lvremove /dev/mapper/centos-home
-> Logical volume centos/home contains a filesystem in use.
--home에 대한 새로운 Logical Volume 생성 후 마운트
--이 때 200GB는 당연히 이전 /home 용량에서 / 에 추가로 할당할 용량을 빼고난 후의 값이어야 함
lvcreate -L 200GB -n home centos
--home 디렉토리를 마운트
mkfs.xfs /dev/centos/home
mount /dev/mapper/centos-home
--root Volume 확장
lvextend -r -l +100%FREE /dev/mapper/centos-root
--home 디렉토리 복구
tar -zxvf /root/home.tar.gz -C /home
[CentOS] LVM /home 용량을 줄이고 / 용량을 늘리기
CentOS를 처음 설치할 때 파티션 설정 부분에서 수동으로 설정하지 않고, 자동으로 설정하게 했다면 /home에 많은 용량이 할당된 것을 볼 수 있다.특정 목적으로 /home 디렉토리 용량이 많이 필요한
knoow.tistory.com
[ LINUX ] CentOS LVM 파티션 축소 및 확장
[ LINUX ] CentOS LVM 파티션 축소 및 확장 Reducing and expanding CentOS LVM partitions 회사 리눅스 서버의 파티션을 조정해달라는 요청을 받게되어 작성하게 되었습니다. 기본적으로 파티션을 축소 혹은 확장
binshuuuu.tistory.com
리눅스 언마운트(umount) target is busy 발생할 경우
누군가 마운트된 경로를 사용 중일 때 target is busy라고 나오게 되는데,해당 프로세스를 강제로 kill한 뒤 언마운트하면 됩니다. 누가 사용하고있는지 확인fuser -cu 마운트경로 사용하고 있는 프로
boya.tistory.com
device is busy -> 강제로 umount - 스마일서브 IDCHOWTO닷컴
mount 된 로컬 디스크…또는 samba 로 mount 된 디바이스를 umount 하고자 할때,간혹 “device is busy” 또는 “Device or resource busy” 라는 메시지와 함께 umount가 되지 않는 경우가…
idchowto.com
'Backup' 카테고리의 다른 글
GA4/GTM/BigQuery 테스트 (0) | 2023.06.23 |
---|---|
PostgreSQL LIKE IN / LIKE OR 여러개 (0) | 2023.01.06 |
PostgreSQL 설정 변경/재시작 (0) | 2022.12.10 |
PostgreSQL 실행 중인 쿼리 확인/취소 (0) | 2022.11.19 |
PostgreSQL SQL 덤프 (1) | 2022.09.30 |