ルートディスク50GBでは予想通り容量が足りなくなり、追加で200GBの”デバイス:/dev/vdb”をConoHaコンソールから追加し、マウントしました。
# fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/vda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/vda: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/vda1 1 6528 52428799+ ee GPT Disk /dev/vdb: 214.7 GB, 214748364800 bytes 16 heads, 63 sectors/track, 416101 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
# parted -s -a optimal /dev/vdb -- mklabel msdos mkpart primary ext4 1 -1
# fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/vda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/vda: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/vda1 1 6528 52428799+ ee GPT Disk /dev/vdb: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000784ab Device Boot Start End Blocks Id System /dev/vdb1 1 26109 209713152 83 Linux
# mkfs.ext4 /dev/vdb1 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 13107200 inodes, 52428288 blocks 2621414 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 1600 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
# ls -laht /var/local total 16K drwxr-xr-x. 4 root root 4.0K Feb 5 20:26 . drwxr-xr-x 3 root root 4.0K Jan 29 20:13 cybozu drwxr-xr-x 3 root root 4.0K Jan 29 20:13 cybozu_org drwxr-xr-x. 19 root root 4.0K Jan 29 20:12 ..
バックアップ作成
# rsync -arv /var/local/cybozu/ /var/local/cybozu_bak/
# mkdir /var/local/data # mount /dev/vdb1 /var/local/data
# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda2 50G 30G 17G 65% / tmpfs 939M 0 939M 0% /dev/shm /dev/vdb1 197G 60M 187G 1% /var/local/data
# rsync -arv /var/local/cybozu/ /var/local/data/
# ls -laht total 20K drwxr-xr-x. 5 root root 4.0K Feb 5 20:39 . drwxr-xr-x 3 root root 4.0K Jan 29 20:13 cybozu drwxr-xr-x 3 root root 4.0K Jan 29 20:13 cybozu_bak drwxr-xr-x 4 root root 4.0K Jan 29 20:13 data drwxr-xr-x. 19 root root 4.0K Jan 29 20:12 ..
# mv /var/local/cybozu /var/local/cybozu_org
# mkdir /var/local/cybozu # umount /dev/vdb1 /var/local/data # mount /dev/vdb1 /var/local/cybozu
# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda2 50G 17G 30G 36% / tmpfs 939M 0 939M 0% /dev/shm /dev/vdb1 197G 14G 174G 8% /var/local/cybozu
# rm -rf data cybozu_bak
# ls -laht total 16K drwxr-xr-x. 4 root root 4.0K Feb 5 20:52 . drwxr-xr-x 3 root root 4.0K Jan 29 20:13 cybozu_org drwxr-xr-x 4 root root 4.0K Jan 29 20:13 cybozu drwxr-xr-x. 19 root root 4.0K Jan 29 20:12 ..
# vi /etc/fstab # # /etc/fstab # Created by anaconda on Wed Apr 12 17:04:02 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=a4009347-3af6-4ff1-9d52-3956ac19a861 / ext4 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /var/spool/swap/swapfile none swap defaults 0 0 ※下記を追加 # データディスク追加 /dev/vdb1 /var/local/cybozu ext4 defaults,nofail 0 0
# reboot now
# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda2 50G 17G 30G 36% / tmpfs 939M 0 939M 0% /dev/shm /dev/vdb1 197G 14G 174G 8% /var/local/cybozu
もくじ
ローカルバックアップ領域の変更と作成
バックアップ領域作成
# mkdir /var/local/cybozu/cbbackup # chmod 777 /var/local/cybozu/cbbackup
Cybozuでの設定
- 管理者アカウントでログイン
- 右上端の歯車マーククリック >> 【システム設定】をクリック
- 【システム管理用パスワードの入力】にパスワードを入力 >> 【OK】をクリックします。
- 【システムタスク】をクリックします。
- 【タスク一覧】をクリックします。
- 【バックアップ】の項目で【変更する】をクリックします。
- 【バックアップ先】に”/var/local/cybozu/cbbackup”と入力し、【変更する】をクリックします。
その後に時間をおいて、きちんとバックアップがバックアップ領域に取得できたら設定完了です。
# ls -laht /var/local/cybozu/cbbackup total 12K drwxr-xr-x 4 root root 4.0K Feb 6 09:05 .. drwxrwxrwx 3 root root 4.0K Feb 6 02:01 . drwxr-xr-x 4 hoge root 4.0K Feb 6 02:00 cbbackup20180206020139