일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- jQuery
- 복현오거리
- 라즈베리파이2
- 윈도우10
- 보르비스초월
- 아파치
- KB증권
- SKT
- KB국민카드
- OpenWrt
- 리눅스
- 시놀로지
- Rocky
- iptime
- proxmox
- 알리익스프레스
- ConoHa
- 램가스초월
- 소비전력
- 자바스크립트
- PHP-FPM
- 알뜰폰
- mysql
- 가상서버호스팅
- php
- Apache
- 킹북이초월
- 티스토리
- centos
- 스톤에이지
- Today
- Total
맛집 여행 캠핑 일상 생활
[라즈베리파이] CentOS microSD 공간 확장 본문
728x90
라즈베리파이2에 CentOS 이미지를 굽고 df -h 로 용량을 확인해보면 microSD 카드 용량 보다 훨씬 작게 잡혀있습니다.
루트 공간을 확장 시켜주는 방법입니다.
[root@localhost ~]# parted /dev/mmcblk0
GNU Parted 3.1
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit chs
(parted) print
Model: SD CBADS (sd/mmc)
Disk /dev/mmcblk0: 7650,197,34
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 7650,255,63. Each cylinder is 8225kB.
Partition Table: msdos
Disk Flags:
Number Start End Type File system Flags
1 0,130,2 36,247,18 primary fat16 boot, lba
2 36,247,19 99,46,10 primary linux-swap(v1)
3 99,46,11 318,17,18 primary ext4
(parted) rm 3
Error: Partition(s) 3 on /dev/mmcblk0 have been written, but we have been unable
to inform the kernel of the change, probably because it/they are in use. As a
result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? i
(parted) print
Model: SD CBADS (sd/mmc)
Disk /dev/mmcblk0: 7650,197,34
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 7650,255,63. Each cylinder is 8225kB.
Partition Table: msdos
Disk Flags:
Number Start End Type File system Flags
1 0,130,2 36,247,18 primary fat16 boot, lba
2 36,247,19 99,46,10 primary linux-swap(v1)
(parted) mkpart primary 99,46,11 7650,197,34
(parted) print
Model: SD CBADS (sd/mmc)
Disk /dev/mmcblk0: 7650,197,34
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 7650,255,63. Each cylinder is 8225kB.
Partition Table: msdos
Disk Flags:
Number Start End Type File system Flags
1 0,130,2 36,247,18 primary fat16 boot, lba
2 36,247,19 99,46,10 primary linux-swap(v1)
3 99,46,11 7650,197,34 primary ext4
(parted) quit
Information: You may need to update /etc/fstab.
[root@localhost ~]# sync
[root@localhost ~]# reboot
다시 로그인해서
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.7G 1.2G 407M 75% /
devtmpfs 430M 0 430M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 12M 451M 3% /run
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 286M 50M 237M 18% /boot
tmpfs 93M 0 93M 0% /run/user/0
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 58.6G 0 disk
├─mmcblk0p2 179:2 0 488M 0 part [SWAP]
├─mmcblk0p3 179:3 0 57.9G 0 part /
└─mmcblk0p1 179:1 0 286M 0 part /boot
[root@localhost ~]# resize2fs /dev/mmcblk0p3
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/mmcblk0p3 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 8
The filesystem on /dev/mmcblk0p3 is now 15164544 blocks long.
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 57G 1.2G 56G 3% /
devtmpfs 430M 0 430M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 12M 451M 3% /run
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 286M 50M 237M 18% /boot
tmpfs 93M 0 93M 0% /run/user/0
이제 사이즈가 늘어난 것을 확인할 수 있습니다.
728x90
반응형
'LINUX' 카테고리의 다른 글
[CentOS] 라즈베리파이2 arm32 epel-release 설치 방법 (0) | 2024.08.12 |
---|---|
[CentOS] yum update 에러 (0) | 2024.08.11 |
[Proxmox] vnStat PHP Frontend 설치하기 (0) | 2024.07.25 |
[Apache] mod_qos 설정시 error_log (0) | 2024.07.24 |
[Rocky] vnStat PHP Frontend 데이터 안나오는 문제 (2) | 2024.07.23 |
Trackback : | Comments :