Wednesday, January 16, 2013

Mount Software File System

If you are working with multiple servers you will want to find a central location to store your software. You can use a nfs or samba mount to a file server, or in virtual box you can create a disk device that can be attached to different systems that stores all you software and scripts. This tutorial goes over the second method of adding a second disk device to virtual box which will be used to hold software and scripts and can be easily detached and mounted on another system.

Step 1. Create new disk device
Video Demo:

Step 2. Restart server.

Step 3. Partition new disk
fdisk –l
fdisk -u /dev/sdb
n = new
p = primary partition
partition 1
default = beginning of disk
default = end of disk
w = write

Step 4. Create the logical volume
pvcreate /dev/sdb1
pvdisplay
vgcreate softwarevg /dev/sdb1
vgdisplay
lvcreate -L 79G --name softwarelv softwarevg
lvdisplay
mkfs.ext4 /dev/softwarevg/softwarelv

vi /etc/fstab
/dev/software/softwarelv  /software                ext4    defaults        0 0

Step 5. Mount Directory
mkdir /software
mount /software


 


 

 

Technorati Tags: ,,