Changes

Jump to: navigation, search

OPS345 Lab 3

656 bytes added, 02:52, 2 January 2022
Mount your new LV on /var/www
== Mount your new LV on /var/www ==
* Mount your new filesystem on /var/www. You should not get any errors or surprises: [[File:AWSTestMountingLV.png|border|center]] * That looks good in the screenshot. We don't need any of the contents that were originally in /var/www, so we'll set up the /dev/mapper/vg_www-lv_www device to mount automatically onto the /var/www directory every time the machine boots up. Add this to the end of '''/etc/fstab''': <source>/dev/mapper/vg_www-lv_www /var/www ext4 defaults 0 0</source> * And test to make sure that it worked: [[File:AWSMountLVPermanently.png|border|center]] Don't reboot the machine if the following testing fails. You might end up with an unbootable VM, and you'll have to restart from the end of the previous lab. * Once you're comfortable that your fstab isn't broken and your logical volume mounts properly: reboot ww and confirm that everything still works. 
* vi /etc/fstab
** /dev/mapper/vg_www-lv_www /var/www ext4 defaults 0 0
* mount /var/www/
* ls /var/www/
* mount | grep /dev/xvd
* ls /var/www/
* mkdir /var/www/html
* vi /var/www/html/index.php<source>

Navigation menu