1. create a new 512M partition, format it to ext4, and mount it to the/data directory. Each time the partition is started, it must take effect. Answer: # fdisk/dev/xvda and create a 512M partition, such as/dev/xvda5 # partprobe/dev/xvda or reboot machine # mkfs-text4/dev/xvda5 # mkdir-p/data # vim/etc/fstab Add/dev/xvda5/dataext4de
1. Create a 512M partition, format it to ext4, and mount it to the/data Directory, which requires that each boot take effect.
A:
# Fdisk/dev/xvda and create a m partition, such as/dev/xvda5
# Partprobe/dev/xvda or reboot Machine
# Mkfs-t ext4/dev/xvda5
# Mkdir-p/data
# Vim/etc/fstab add
/Dev/xvda5/data ext4 defaults 0 0
# Mount-
2. Pull the/home partition online to 512 M, which is allowed between 490M-510M
A:
# Df-h/home determine its lv, for example,/dev/vol0/home
# Lvresize-L 508 M/dev/vol0/home
# Resize2fs/dev/vol0/home
3. Reduce/home to 320 M, which is allowed between M and M. do not damage the data in the system.
A:
# Df-h/home determine its lv, for example,/dev/vol0/home
# Umount/home
# E2fsck-f/dev/vol0/home
# Resize2fs/dev/vol0/home 300 M
# Lvresize-L 308 M/dev/vol0/home
# Mount/home
4. Create a new volume group. The size of each PE is 8 Mb. in this volume group, create an LV, the lv name is lvshare, And the size is 50 PE. format it.
If the value is ext4, it is mounted to the/mnt/data directory after the instance is started. It must take effect each time it is started. The value is allowed between 380M-400M.
A:
# Fdisk: the size of the new partition is 1 GB and marked as 8e, for example,/dev/xvda6.
# Partprobe or reboot
# Pvcreate/dev/xvda6
# Vgcreate-s 8 M vg1/dev/xvda6
# Lvcreate-n lvshare-l 50 vg1
# Mkfs. ext4/dev/vg1/lvshare
# Mkdir-p/mnt/data
# Vim/etc/fstab add
/Dev/vg1/lvshare/mnt/data ext4 defaults 0 0
# Mount-a; df-h
5. Download ftp: // 192.168.0.254/pub/boot. iso to/root and mount it to/media/cdrom.
Effective upon each boot
A:
# Cd/root; wget ftp: // 192.168.0.254/pub/boot. iso
# Mkdir-p/media/cdrom
# Vim/etc/fstab add
/Root/boot. iso/media/cdrom iso9660 ults, loop 0 0
# Mount-
6. Add a SWAP250M, which does not affect the original SWAP. It is required to take effect at each boot.
A:
# Create a new partition 250 M, such as/dev/xvda7, and mark it as 82
# Mkswap/dev/xvda7
# Vim/etc/fstab add
/Dev/xvda7 swap defaults 0 0
# Swapon-a; swapon-s