RHCSA7LVM的管理

以下试题来自:

http://www.certdepot.net/rhel7-rhcsa-sample-exam-1/

 

1. Create a xfs file system on a new logical volume of 100MB called lv_xfs. Mount it permanently with uuid under /xfs.

2. Extend the existing xfs file system to a total size of 200MB and add a label called myFS.


Reference answer:

# lvcreate -n lv_xfs -L 100M vg0

# mkdir /xfs

# mkfs.xfs /dev/vg0/lv_xfs

# blkid | grep lv_xfs >> /etc/fstab

# vim /etc/fstab

UUID=xxx /xfs xfs default 1 2

# mount -a

 

# lvextend -L 200M /dev/vg0/lv_xfs

# xfs_growfs /xfs

# umount /xfs

# xfs_admin -l "myFS" /dev/vg0/lv_xfs

# mount /xfs

 

3. Add 100MB of swap space to the machine using a new logical volume.

 

Reference answer:

# lvcreate -n lv_swap -L 100M vg0

# mkswap /dev/vg0/lv_swap

# swapon /dev/mapper/vg0-lv_swap

posted @ 2015-03-13 14:08  emmac  阅读(256)  评论(0编辑  收藏  举报