Export and mount a filesystem using NFS

The first two steps we need to do before we export our fs is making sure that the rpcbind service and the nfs service are on and running. We’ll open a session in our exporting server and enter the following commands: [root@devops ~]#chkconfig rpcbind on [root@devops ~]#chkconfig nfs on [root@devops ~]#service rpcbind start [root@devops ~]#service nfs start Now, we’ll edit out /etc/exports file and enter the path of the fs we want to export, the option that we want for our fs and the destination server. Only the server that we’ll mention in the file will be able to mount our fs and see its content. So after opening our file with vi /etc /exports we’ll enter our information: /source/filesystem/path...
Continue reading...

How to activate Linux logical volume

In order to check the logical volume’s status we’ll use the lvs command: [root@devops ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lvol1 doe_vg -wi-ao 100.00m The status of the lv will be dispalyed in the attr column on the fifth feild. in the above example the attribute is A which means – active. If the fifth feild is not as shown above. for example: [root@devops ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lvol1 doe_vg -wi— 100.00m you may not be able to mount a filesystem on the logical volume. In order to activate the logical volume we’ll use the command below: [root@devops ~]# lvchange -aa /dev/mapper/vol1...
Continue reading...

How To Create Linux LVM step-by-step

LVM allows users to dynamically extend or shrink Linux “partition” or file system in online mode! The LVM can resize volume groups (VG) online by adding new physical volumes (PV) or rejecting those existing PVs attached to VG. How to setup Linux LVM ? Login with root user ID Using the whole new hard disk for LVM partition: fdisk /dev/xvdf Follow This Steps! At the Linux fdisk command prompt, press n to create a new disk partition, press p to create a primary disk partition, press 1 to denote it as 1st disk partition, press ENTER twice to accept the default of 1st and last cylinder – to convert the whole secondary hard disk to a single disk partition, press t (will...
Continue reading...

How To Change Linux Timezone

Firstly, install the latest tzdata package. Suppose you’ve properly configured the yum repositories, these commands will install / update tzdata: yum install tzdata yum update tzdata Now, replace /etc/localtime with the timezone file (installed by tzdata package in /usr/share/zoneinfo directory). For example, to set RHEL system timezone to New York: cp /usr/share/zoneinfo/America/New_York /etc/localtime Next, edit the /etc/sysconfig/clock file, set ZONE value to reflect timezone file used: ZONE=”America/New_York” UTC=true NOTE: If the BIOS clock is set to use UTC time, then you should also set the UTC value to “true”. Besides, insert this keyword UTCin the 3rd line of /etc/adjtime file, e.g.: -0.008103 1375208456 0.000000 1375208456 UTC It’s recommended to have BIOS clock storing UTC time instead of local time, if...
Continue reading...

Connect AWS via VPN client – UTM Sophos

The following is an overview diagram of our setup. Note that this post does not cover HA setup although it is possible to extend it further by running the instances in multiple AZs. In our VPC, we have public and private subnets: in our public subnet, we have the openVPN instance and in our private subnet we have the web server (server 1). This configuration allows you to separate public & private traffic by terminating all internet traffic at the public subnet layer. It is possible to have your internal instances in the public subnet where your VPN instance is located but the above model provides more isolation.   The steps To configure your VPN, perform the following: Create a...
Continue reading...

Private and public subnets in Amazon VPC

Understanding the distinction between “private” and “public” subnets in Amazon VPC requires an understanding of how IP routing and network address translation (NAT) works in general, and how they are specifically implemented in VPC. The core differentiation between a public and private subnet in VPC is defined by what that subnet’s default route is, in the VPC routing tables.. This configuration, dictates the validity of using, or not using, public IP addresses on instances on that particular subnet. Each subnet has exactly one default route, which can be only one of two things: The VPC’s “Internet Gateway” object, in the case of a “public” subnet An EC2 instance, performing the “NAT instance” role, in the case of a “private” subnet....
Continue reading...