[オリジナル]Raspberry Pi CentOS 7拡張メモリカード空き容量
7325 ワード
CentOS 7公式サイトのミラーリングを用いて録画するシステムは約2 Gのスペースしか占有していないが,TFカードは30 Gのスペースが利用可能であるため,調整/rootパーティションのスペースが特に重要となり,本明細書の例では残りのスペースをすべてリサイクルできる.
環境の説明
装置:Raspberry Pi 2 b システム:CentOS-Userland-7-armv 7 hl-Minimal ストレージ:SanDisk Ultra 32 GB
ベースライブラリのインストール:
1
手順リスト:
==============
手順:
実行コマンド:d (パーティション3を削除)
実行コマンド:p(この場合、パーティションが1つ足りないはずです)
実行コマンド:n (加点区)
実行コマンド:p(プライマリパーティション)
ダイレクトリターン
後の値はデフォルトで
実行コマンド:p
実行コマンド:w
そしてreboot
コマンドの実行: resize2fs/dev/mmcblk0p3 パーティション情報を再ロードしてdf-h表示を実行
==============
[作者:クラウドサーバを歩くJoyist] - http://chdong.top/
http://av98.byethost10.com/index.php?thread-99.htm
実戦操作開始
ログインSSH端末で入力:fdisk/dev/mmcblk 0 //HDDパーティションソフトウェア
1 2 3 4 5 6 7 8
ソフトウェアに次のように入力します.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10
端末に入力:
1 2 3 4 5
ツリーベリーパイが起動した後にSSHにログインして端末に入力する:
resize 2 fs/dev/mmcblk 0 p 3パーティション情報の再ロード
1 2 3 4 5 6
[作者:Joyist] - http://chdong.top/
操作結果
使用:
1 2 3 4 5 6 7 8 9 10
/rootパーティションの下のスペースは29 Gに拡張され、メモリカードのスペースとほぼ同じです.
大功を成し遂げる.
後でファイルがインストールできない場合は、sudo apt-get updateとsudo apt-get upgradeを入力してみてください.
環境の説明
装置:Raspberry Pi 2 b システム:CentOS-Userland-7-armv 7 hl-Minimal ストレージ:SanDisk Ultra 32 GB
ベースライブラリのインストール:
1
yum groupinstall base
手順リスト:
==============
手順:
:
fdisk /dev/mmcblk0 実行コマンド:d (パーティション3を削除)
実行コマンド:p(この場合、パーティションが1つ足りないはずです)
実行コマンド:n (加点区)
実行コマンド:p(プライマリパーティション)
ダイレクトリターン
後の値はデフォルトで
実行コマンド:p
実行コマンド:w
そしてreboot
コマンドの実行: resize2fs/dev/mmcblk0p3 パーティション情報を再ロードしてdf-h表示を実行
==============
[作者:クラウドサーバを歩くJoyist] - http://chdong.top/
http://av98.byethost10.com/index.php?thread-99.htm
実戦操作開始
ログインSSH端末で入力:fdisk/dev/mmcblk 0 //HDDパーティションソフトウェア
1 2 3 4 5 6 7 8
[root@centos-rpi2 ~]
# fdisk /dev/mmcblk0
Welcome to
fdisk
(util-linux 2.23.2).
Changes will remain
in
memory only,
until
you decide to write them.
Be careful before using the write
command
.
Command (m
for
help):
ソフトウェアに次のように入力します.
p
-旧パーティションの表示 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Command (m
for
help): p
Disk
/dev/mmcblk0
: 31.9 GB, 31914983424 bytes, 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical
/physical
): 512 bytes / 512 bytes
I
/O
size (minimum
/optimal
): 512 bytes / 512 bytes
Disk label
type
: dos
Disk identifier: 0x000c831c
Device Boot Start End Blocks Id System
/dev/mmcblk0p1
2048 1026047 512000 c W95 FAT32 (LBA)
/dev/mmcblk0p2
1026048 2074623 524288 82 Linux swap / Solaris
/dev/mmcblk0p3
2074624 6268927 2097152 83 Linux
Command (m
for
help):
d
-パーティションを削除し、プロンプトに従って3番目のパーティションを削除 1 2 3 4 5
Command (m
for
help): d
Partition number (1-3, default 3):
Partition 3 is deleted
Command (m
for
help):
n
-システムのデフォルト(デフォルトは最大)に従って開始するパーティションを追加します. 1 2 3 4 5
Command (m
for
help): n
Partition
type
:
p primary (2 primary, 0 extended, 2
free
)
e extended
Select (default p):
:p ( )
1 2 3 4 5 6 7 8 9
Select (default p): p
Partition number (3,4, default 3):
First sector (2074624-62333951, default 2074624):
Using default value 2074624
Last sector, +sectors or +size{K,M,G} (2074624-62333951, default 62333951):
Using default value 62333951
Partition 3 of
type
Linux and of size 28.8 GiB is
set
Command (m
for
help):
p
-新しいパーティションの表示 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Command (m
for
help): p
Disk
/dev/mmcblk0
: 31.9 GB, 31914983424 bytes, 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical
/physical
): 512 bytes / 512 bytes
I
/O
size (minimum
/optimal
): 512 bytes / 512 bytes
Disk label
type
: dos
Disk identifier: 0x000c831c
Device Boot Start End Blocks Id System
/dev/mmcblk0p1
2048 1026047 512000 c W95 FAT32 (LBA)
/dev/mmcblk0p2
1026048 2074623 524288 82 Linux swap / Solaris
/dev/mmcblk0p3
2074624 62333951 30129664 83 Linux
Command (m
for
help):
w
-パーティション情報を書き込み、ソフトウェアを終了 1 2 3 4 5 6 7 8 9 10
Command (m
for
help): w
The partition table has been altered!
Calling ioctl() to re-
read
partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@centos-rpi2 ~]
#
端末に入力:
reboot
ベリーパイを再起動 1 2 3 4 5
[root@centos-rpi2 ~]
# reboot
Connection closed by foreign host.
Disconnected from remote host(pi ) at 14:55:14.
Type `help' to learn how to use Xshell prompt.
[d:\~]$
ツリーベリーパイが起動した後にSSHにログインして端末に入力する:
resize 2 fs/dev/mmcblk 0 p 3パーティション情報の再ロード
1 2 3 4 5 6
[root@centos-rpi2 ~]
# 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 = 4
The filesystem on
/dev/mmcblk0p3
is now 7532416 blocks long.
[root@centos-rpi2 ~]
#
[作者:Joyist] - http://chdong.top/
操作結果
使用:
df -h
新しいパーティション情報テーブルの表示1 2 3 4 5 6 7 8 9 10
[root@centos-rpi2 ~]
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root
29G 954M 27G 4% /
devtmpfs 460M 0 460M 0%
/dev
tmpfs 464M 24K 464M 1%
/dev/shm
tmpfs 464M 12M 452M 3%
/run
tmpfs 464M 0 464M 0%
/sys/fs/cgroup
/dev/mmcblk0p1
500M 45M 455M 9%
/boot
tmpfs 93M 0 93M 0%
/run/user/0
[root@centos-rpi2 ~]
#
/rootパーティションの下のスペースは29 Gに拡張され、メモリカードのスペースとほぼ同じです.
大功を成し遂げる.
後でファイルがインストールできない場合は、sudo apt-get updateとsudo apt-get upgradeを入力してみてください.