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...