LoginSignup
0
0

More than 5 years have passed since last update.

CloudAtCostのLVMサイズを拡張

Last updated at Posted at 2016-02-10

Ubuntu 16.04.2

fdisk /dev/sda

d 3
n p Enter Enter Enter
t Enter 8e
w

reboot

pvresize /dev/sda3
lvextend -l +100%FREE /dev/mapper/CAC_VG-CAC_LV
reboot

resize2fs /dev/mapper/CAC_VG-CAC_LV

Debian8

拡張

  • 10GBより大きいDISKを指定した場合、手動で拡張する必要がある。
  • /dev/sda3が未使用。mkfs.ext4 /dev/sda3してマウントするのも良い。
作業前
$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0       9.1G  1.2G  7.5G  14% /
拡張
pvcreate /dev/sda3
vgextend localhost-vg /dev/sda3
lvextend -l +100%FREE /dev/localhost-vg/root
resize2fs /dev/localhost-vg/root
作業後
$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0        57G  1.2G   54G   3% /

その他メモ

sources.list

無効なsources.list削除
sed -i 's@^deb http://non-us@#deb http://non-us@g' /etc/apt/sources.list

自分用

apt-get update
apt-get install -y byobu
byobu
apt-get upgrade -y
vi /etc/hostname
vi /etc/hosts
hostname -F /etc/hostname
/etc/fstab
/dev/mapper/localhost--vg-root /  ext4    defaults,data=writeback,noatime 0       1
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0