Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Thursday, 25 June 2009
EMC Client installation and checking for linux and solaris
EMC Client installation and checking
This web page is a quick guide on what to install and how to check that EMC SAN is attached and working
Solaris
Installing
==========================================================
Install Emulex driver/firmware, san packages (SANinfo, HBAinfo, lputil), EMC powerpath
Use lputil to update firmware
Use lputil to disable boot bios
Update /kernel/drv/lpfc.conf
Update /kernel/drv/sd.conf
Reboot
Install ECC agent
Note: when adding disks on different FA had to reboot server?
List HBA's /usr/sbin/hbanyware/hbacmd listHBAS (use to get WWN's)
/opt/HBAinfo/bin/gethbainfo (script wrapped around hbainfo)
grep 'WWN' /var/adm/messages
HBA attributes /opt/EMLXemlxu/bin/emlxadm
/usr/sbin/hbanyware/hbacmd HBAAttrib 10:00:00:00:c9:49:28:47
HBA port /opt/EMLXemlxu/bin/emlxadm
/usr/sbin/hbanyware/hbacmd PortAttrib 10:00:00:00:c9:49:28:47
HBA firmware /opt/EMLXemlxu/bin/emlxadm
Fabric login /opt/HBAinfo/bin/gethbainfo (script wrapped around hbainfo)
Adding Additional Disks cfgadm -c configure c2
Disk available cfgadm -al -o show_SCSI_lun
echo|format
inq (use to get serial numbers)
Labelling format
Partitioning vxdiskadm
format
Filesystem newfs or mkfs
Linux
Installing
==========================================================
Install Emulex driver, san packages (saninfo, hbanyware), firmware (lputil)
Configure /etc/modprobe.conf
Use lputil to update firmware
Use lputil to disable boot bios
Create new ram disk so changes to modprobe.conf can take affect.
Reboot
Install ECC agent
List HBA's
/usr/sbin/hbanyware/hbacmd listHBAS (use to get WWN's)
cat /proc/scsi/lpfc/*
HBA attributes /usr/sbin/hbanyware/hbacmd HBAAttrib 10:00:00:00:c9:49:28:47
cat /sys/class/scsi_host/host*/info
HBA port /usr/sbin/hbanyware/hbacmd PortAttrib 10:00:00:00:c9:49:28:47
HBA firmware lputil
Fabric login cat /sys/class/scsi_host/host*/state
Disk available cat /proc/scsi/scsi
fdisk -l |grep -I Disk |grep sd
inq (use to get serial numbers)
Labelling parted -s /dev/sda mklabel msdos (like labelling in solaris)
parted -s /dev/sda print
Partitioning fdisk
parted
Filesystem mkfs -j -L /dev/vx/dsk/datadg/vol01
PowerPath
HBA Info /etc/powermt display
Disk Info /etc/powermt display dev=all
Rebuild /kernel/drv/emcp.conf /etc/powercf -q
Reconfigure powerpath using emcp.conf /etc/powermt config
Save the configuration /etc/powermt save
Enable and Disable HBA cards used for testing
/etc/powermt display (get card ID)
/etc/powermt disable hba=3072
/etc/powermt enable hba=3072
This web page is a quick guide on what to install and how to check that EMC SAN is attached and working
Solaris
Installing
==========================================================
Install Emulex driver/firmware, san packages (SANinfo, HBAinfo, lputil), EMC powerpath
Use lputil to update firmware
Use lputil to disable boot bios
Update /kernel/drv/lpfc.conf
Update /kernel/drv/sd.conf
Reboot
Install ECC agent
Note: when adding disks on different FA had to reboot server?
List HBA's /usr/sbin/hbanyware/hbacmd listHBAS (use to get WWN's)
/opt/HBAinfo/bin/gethbainfo (script wrapped around hbainfo)
grep 'WWN' /var/adm/messages
HBA attributes /opt/EMLXemlxu/bin/emlxadm
/usr/sbin/hbanyware/hbacmd HBAAttrib 10:00:00:00:c9:49:28:47
HBA port /opt/EMLXemlxu/bin/emlxadm
/usr/sbin/hbanyware/hbacmd PortAttrib 10:00:00:00:c9:49:28:47
HBA firmware /opt/EMLXemlxu/bin/emlxadm
Fabric login /opt/HBAinfo/bin/gethbainfo (script wrapped around hbainfo)
Adding Additional Disks cfgadm -c configure c2
Disk available cfgadm -al -o show_SCSI_lun
echo|format
inq (use to get serial numbers)
Labelling format
Partitioning vxdiskadm
format
Filesystem newfs or mkfs
Linux
Installing
==========================================================
Install Emulex driver, san packages (saninfo, hbanyware), firmware (lputil)
Configure /etc/modprobe.conf
Use lputil to update firmware
Use lputil to disable boot bios
Create new ram disk so changes to modprobe.conf can take affect.
Reboot
Install ECC agent
List HBA's
/usr/sbin/hbanyware/hbacmd listHBAS (use to get WWN's)
cat /proc/scsi/lpfc/*
HBA attributes /usr/sbin/hbanyware/hbacmd HBAAttrib 10:00:00:00:c9:49:28:47
cat /sys/class/scsi_host/host*/info
HBA port /usr/sbin/hbanyware/hbacmd PortAttrib 10:00:00:00:c9:49:28:47
HBA firmware lputil
Fabric login cat /sys/class/scsi_host/host*/state
Disk available cat /proc/scsi/scsi
fdisk -l |grep -I Disk |grep sd
inq (use to get serial numbers)
Labelling parted -s /dev/sda mklabel msdos (like labelling in solaris)
parted -s /dev/sda print
Partitioning fdisk
parted
Filesystem mkfs -j -L
PowerPath
HBA Info /etc/powermt display
Disk Info /etc/powermt display dev=all
Rebuild /kernel/drv/emcp.conf /etc/powercf -q
Reconfigure powerpath using emcp.conf /etc/powermt config
Save the configuration /etc/powermt save
Enable and Disable HBA cards used for testing
/etc/powermt display (get card ID)
/etc/powermt disable hba=3072
/etc/powermt enable hba=3072
Saturday, 6 June 2009
Shutting down the linux system
Shutting Down the Linux System
If you look at the scripts in runlevel 0, you'll find a number of services being shut down, followed by the killing of all active processes, and finally, the halt script in /etc/rc.d/init.d directory executing the shutdown.
The halt script is used to either halt or reboot your system, depending on how it is called. What happens during a shutdown? If you're familiar with other operating systems (such as DOS), you remember that all you had to do was close any active application and then turn off the computer. Although Linux is easy to use, shutting down your computer is not as simple as turning it off. (You can try this, but you do so at your own risk.) A number of processes must take place before you or Linux turns off your computer. The following sections take a look at some of the commands involved.
shutdown
Although many people use Linux as single users on a single computer, many of us use computers on either a distributed or shared network. If you've ever been working under a tight deadline in a networked environment, you know the dreadful experience of seeing a System is going down in 5 minutes! message from the system administrator. You might also know the frustration of working on a system on which the system administrator is trying to perform maintenance, suffering seemingly random downtimes or frozen tasks.
Luckily for most users, maintenance jobs are performed during off hours, when most people are home with their loved ones or fast asleep in bed. Unluckily for sysadmins, this is the perfect time for system administration or backups, and one of the top reasons for the alt.sysadmin.recovery newsgroup.
The primary command to stop Linux is the shutdown command. Like most UNIX commands, shutdown has a number of options. A man page for the shutdown command is included with Red Hat Linux, but you can quickly read its command-line syntax if you use an illegal option, such as -z. Thanks to the programmer, here it is:
Usage: shutdown [-akrhfnc] [-t secs] time [warning message]
-a: use /etc/shutdown.allow
-k: don't really shutdown, only warn.
-r: reboot after shutdown.
-h: halt after shutdown.
-f: do a 'fast'reboot (skip fsck).
-F: Force fsck on reboot.
-n: do not go through "init" but go down real fast.
-c: cancel a running shutdown.
-t secs: delay between warning and kill signal.
** the "time" argument is mandatory! (try "now") **
To properly shut down your system immediately, use the -h option, followed by the word now or the numeral 0:
# shutdown -h now
or
# shutdown -h 0
If you want to wait for a while, use the -t option, followed by a number (in seconds) before shutdown or reboot. If you want to restart your computer, use the -r option, along with the word now or the numeral 0:
# shutdown -r now
or
# shutdown -r 0
NOTE
You'll find two curious text strings embedded in the shutdown program:
"You don't exist. Go away."
"Oh hello Mr. Tyler - going DOWN?"
Both are found by executing this:
# strings /sbin/shutdown
To find out about "You don't exist. Go away", see Robert Kiesling's Linux Frequently Asked Questions with Answers. You should be able to find a copy at http://www.linuxdoc.org/FAQ.
You can also use linuxconf to shut down your computer. If you're logged in as the root operator, enter the following from the command line of your console or an X11 terminal window:
# linuxconf --shutdown
linuxconf presents a shutdown dialog box, as shown in Figure 9.4. To restart your system, press the Tab key until you highlight the Accept button, and then press the Enter key. You can also enter a time delay or halt your system immediately, and specify a message to broadcast to all your users when you execute the shutdown.
Figure 9.4 The linuxconf command will perform a system reboot or shutdown.
halt and reboot
Two other commands also stop or restart your system: halt and reboot. reboot is a symbolic link to halt, which notifies the kernel of a shutdown or reboot. Although you should always use shutdown to restart your system, you can use the "Vulcan neck pinch": Ctrl+Alt+Del.
If you use the keyboard form of this command, you'll find that Linux uses the following command:
# shutdown -t3 -r now
NOTE
This command is defined in your system's initialization table, /etc/inittab.
Restarting your computer with the shutdown command calls the sync command, which updates the inodes (structure representations)of each of your files. If you exit Linux without updating this information, Linux could lose track of your files on disk, and that spells disaster!
NOTE
The only time you'll want to risk shutting down Linux through a hard reset or the power-off switch on your computer is if you can't quickly kill a destructive process, such as an accidental rm -fr /*. Yet another reason to never run Linux as the root operator all the time!
By now you should know that exiting Linux properly can help you avoid problems with your system. What happens if something goes wrong? In the next section you learn preventive measures, how to maintain your filesystem, and how to recover and overcome problems.
If you look at the scripts in runlevel 0, you'll find a number of services being shut down, followed by the killing of all active processes, and finally, the halt script in /etc/rc.d/init.d directory executing the shutdown.
The halt script is used to either halt or reboot your system, depending on how it is called. What happens during a shutdown? If you're familiar with other operating systems (such as DOS), you remember that all you had to do was close any active application and then turn off the computer. Although Linux is easy to use, shutting down your computer is not as simple as turning it off. (You can try this, but you do so at your own risk.) A number of processes must take place before you or Linux turns off your computer. The following sections take a look at some of the commands involved.
shutdown
Although many people use Linux as single users on a single computer, many of us use computers on either a distributed or shared network. If you've ever been working under a tight deadline in a networked environment, you know the dreadful experience of seeing a System is going down in 5 minutes! message from the system administrator. You might also know the frustration of working on a system on which the system administrator is trying to perform maintenance, suffering seemingly random downtimes or frozen tasks.
Luckily for most users, maintenance jobs are performed during off hours, when most people are home with their loved ones or fast asleep in bed. Unluckily for sysadmins, this is the perfect time for system administration or backups, and one of the top reasons for the alt.sysadmin.recovery newsgroup.
The primary command to stop Linux is the shutdown command. Like most UNIX commands, shutdown has a number of options. A man page for the shutdown command is included with Red Hat Linux, but you can quickly read its command-line syntax if you use an illegal option, such as -z. Thanks to the programmer, here it is:
Usage: shutdown [-akrhfnc] [-t secs] time [warning message]
-a: use /etc/shutdown.allow
-k: don't really shutdown, only warn.
-r: reboot after shutdown.
-h: halt after shutdown.
-f: do a 'fast'reboot (skip fsck).
-F: Force fsck on reboot.
-n: do not go through "init" but go down real fast.
-c: cancel a running shutdown.
-t secs: delay between warning and kill signal.
** the "time" argument is mandatory! (try "now") **
To properly shut down your system immediately, use the -h option, followed by the word now or the numeral 0:
# shutdown -h now
or
# shutdown -h 0
If you want to wait for a while, use the -t option, followed by a number (in seconds) before shutdown or reboot. If you want to restart your computer, use the -r option, along with the word now or the numeral 0:
# shutdown -r now
or
# shutdown -r 0
NOTE
You'll find two curious text strings embedded in the shutdown program:
"You don't exist. Go away."
"Oh hello Mr. Tyler - going DOWN?"
Both are found by executing this:
# strings /sbin/shutdown
To find out about "You don't exist. Go away", see Robert Kiesling's Linux Frequently Asked Questions with Answers. You should be able to find a copy at http://www.linuxdoc.org/FAQ.
You can also use linuxconf to shut down your computer. If you're logged in as the root operator, enter the following from the command line of your console or an X11 terminal window:
# linuxconf --shutdown
linuxconf presents a shutdown dialog box, as shown in Figure 9.4. To restart your system, press the Tab key until you highlight the Accept button, and then press the Enter key. You can also enter a time delay or halt your system immediately, and specify a message to broadcast to all your users when you execute the shutdown.
Figure 9.4 The linuxconf command will perform a system reboot or shutdown.
halt and reboot
Two other commands also stop or restart your system: halt and reboot. reboot is a symbolic link to halt, which notifies the kernel of a shutdown or reboot. Although you should always use shutdown to restart your system, you can use the "Vulcan neck pinch": Ctrl+Alt+Del.
If you use the keyboard form of this command, you'll find that Linux uses the following command:
# shutdown -t3 -r now
NOTE
This command is defined in your system's initialization table, /etc/inittab.
Restarting your computer with the shutdown command calls the sync command, which updates the inodes (structure representations)of each of your files. If you exit Linux without updating this information, Linux could lose track of your files on disk, and that spells disaster!
NOTE
The only time you'll want to risk shutting down Linux through a hard reset or the power-off switch on your computer is if you can't quickly kill a destructive process, such as an accidental rm -fr /*. Yet another reason to never run Linux as the root operator all the time!
By now you should know that exiting Linux properly can help you avoid problems with your system. What happens if something goes wrong? In the next section you learn preventive measures, how to maintain your filesystem, and how to recover and overcome problems.
Friday, 22 May 2009
Tuesday, 28 April 2009
Kill Inactive and Idle Linux Users
Kill Inactive and Idle Linux Users
Every once in awhile the SSH connection to my Linux server will die and I’ll be left with a dead user. Here’s how I discover the inactive session using the w command:
15:26:26 up 13 days, 23:47, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
raam pts/0 wfc-main.wfcorp. Mon10 2days 0.04s 0.04s -bash
raam pts/1 pool-151-199-29- 15:26 0.00s 0.02s 0.01s w
You can easily tell there’s an idle user by glancing at the IDLE column; the user in the first row has been idle for 2 days. There are many ways of killing idle users, but here I’ll show you a few of my favorites. The bottom line is, you need to kill the parent process created by the idle user when he logged in. There are a number of ways of doing that.
Here is how I discover the parent process using the pstree -p command:
├─screen(29380)───bash(29381)───naim(29384)
├─scsi_eh_0(903)
├─sshd(1997)─┬─sshd(32093)─┬─sshd(32095)
│ │ └─sshd(32097)───bash(32098)─┬─mutt(32229)
│ │ └─screen(32266)
│ └─sshd(1390)─┬─sshd(1392)
│ └─sshd(1394)───bash(1395)───pstree(1484)
├─syslogd(1937)
└─usb-storage(904)
We need to find the parent PID for the dead user and issue the sudo kill -1 command. We use the -1 option because it’s a cleaner way of killing processes; some programs, such as mutt, will end cleanly if you kill them with -1. I can see by looking at the tree where I’m running the pstree command, so I just follow that down the tree until I find a common process (branch) shared by both users; this happens to be sshd(1997).
You can see there are two branches at the point — one for my current session and one for the idle session (I know this because I’m the only user logged into this Linux server and because I know I should only have one active session). So I simply kill the sshd(32093) process and the idle user disappears.
Of course, if you’re on a system with multiple users, or you’re logged into the box with multiple connections, using the above method and searching through a huge tree of processes trying to figure out which is which will not be fun. Here’s another way of doing it: Looking at the output from the w command above, we can see that the idle users’ TTY is pts/0 so now all we need is the PID for the parent process. We can find that by running who -all | grep raam:
raam + pts/0 May 10 10:45 . 18076 (wfc-main.wfcorp.net)
raam + pts/1 May 11 15:26 . 1390 (pool-151-199-29-190.bos.east.verizon.net)
Here we can see that 18076 is the PID for the parent process of pts/0, so once we issue kill -1 18076 that idle session will be gone!
Every once in awhile the SSH connection to my Linux server will die and I’ll be left with a dead user. Here’s how I discover the inactive session using the w command:
15:26:26 up 13 days, 23:47, 2 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
raam pts/0 wfc-main.wfcorp. Mon10 2days 0.04s 0.04s -bash
raam pts/1 pool-151-199-29- 15:26 0.00s 0.02s 0.01s w
You can easily tell there’s an idle user by glancing at the IDLE column; the user in the first row has been idle for 2 days. There are many ways of killing idle users, but here I’ll show you a few of my favorites. The bottom line is, you need to kill the parent process created by the idle user when he logged in. There are a number of ways of doing that.
Here is how I discover the parent process using the pstree -p command:
├─screen(29380)───bash(29381)───naim(29384)
├─scsi_eh_0(903)
├─sshd(1997)─┬─sshd(32093)─┬─sshd(32095)
│ │ └─sshd(32097)───bash(32098)─┬─mutt(32229)
│ │ └─screen(32266)
│ └─sshd(1390)─┬─sshd(1392)
│ └─sshd(1394)───bash(1395)───pstree(1484)
├─syslogd(1937)
└─usb-storage(904)
We need to find the parent PID for the dead user and issue the sudo kill -1 command. We use the -1 option because it’s a cleaner way of killing processes; some programs, such as mutt, will end cleanly if you kill them with -1. I can see by looking at the tree where I’m running the pstree command, so I just follow that down the tree until I find a common process (branch) shared by both users; this happens to be sshd(1997).
You can see there are two branches at the point — one for my current session and one for the idle session (I know this because I’m the only user logged into this Linux server and because I know I should only have one active session). So I simply kill the sshd(32093) process and the idle user disappears.
Of course, if you’re on a system with multiple users, or you’re logged into the box with multiple connections, using the above method and searching through a huge tree of processes trying to figure out which is which will not be fun. Here’s another way of doing it: Looking at the output from the w command above, we can see that the idle users’ TTY is pts/0 so now all we need is the PID for the parent process. We can find that by running who -all | grep raam:
raam + pts/0 May 10 10:45 . 18076 (wfc-main.wfcorp.net)
raam + pts/1 May 11 15:26 . 1390 (pool-151-199-29-190.bos.east.verizon.net)
Here we can see that 18076 is the PID for the parent process of pts/0, so once we issue kill -1 18076 that idle session will be gone!
Thursday, 9 April 2009
How to restart ssh daemon on linux
Obviously if sshd is not running then you will have to go through the ilo / Term Server and then do the following;
cd /etc/rc.d/init.d/
./sshd start
cd /etc/rc.d/init.d/
./sshd start
Monday, 23 February 2009
linux - faillog
Faillog on linux
To view faillog (which resides in /var/log) and is a binary
Run faillog –u username;
etst001 # faillog -u brinap
Username Failures Maximum Latest
brinap 0 0
MAN PAGE
faillog - display faillog records or set login failure limits
Synopsis faillog [options]
Description
faillog formats the contents of the failure log from /var/log/faillog database. It also can be used for maintains failure counters and limits. Run faillog without arguments display only list of user faillog records who have ever had a login failure.
Options
The options which apply to the faillog command are:
-a, --all
Display faillog records for all users.
-h, --help
Display help message and exit.
-l, --lock-time SEC
Lock account to SEC seconds after failed login.
-m, --maximum MAX
Set maximum number of login failures after the account is disabled to MAX. Selecting MAX value of 0 has the effect of not placing a limit on the number of failed logins. The maximum failure count should always be 0 for root to prevent a denial of services attack against the system.
-r, --reset
Reset the counters of login failures or one record if used with the -u LOGINoption. Write access to /var/log/faillog is required for this option.
-t, --time DAYS
Display faillog records more recent than DAYS. The -t flag overrides the use of -u.
-u, --user LOGIN
Display faillog record or maintains failure counters and limits (if used with -l, -m or -r options) only for user with LOGIN.
Caveats
faillog only prints out users with no successful login since the last failure. To print out a user who has had a successful login since their last failure, you must explicitly request the user with the -u flag, or print out all users with the -a flag.
Files
/var/log/faillog
Failure logging file.
PROBLEM: How do I deny login access/lock accounts for users who mis type their passwords more than a set number of times?
SOLUTION:
The faillog mechanism is designed to log login failures. By typing "faillog" at your shell prompt, you can obtain a list of users who have repeatedly tried to login and have failed.
The "faillog" is reset upon successful login - so once a user succeeds their failure count is set to 0.
You can limit the maximum number of login failures (system wide) by using the "faillog -m" option (specify the maximum number of failures allowed).
You can reset the fail count for a user (once a user has been "locked out" this is required to "unlock" him/her) using the "faillog -u username -r" command.
EXAMPLE:
Set the maximum number of login failures to 5:
At a terminal prompt, type faillog -m 5 and press ENTER.
Reset the login failures for the user "geeko":
At a terminal prompt, type faillog -u geeko -r and press ENTER.
To view faillog (which resides in /var/log) and is a binary
Run faillog –u username;
etst001 # faillog -u brinap
Username Failures Maximum Latest
brinap 0 0
MAN PAGE
faillog - display faillog records or set login failure limits
Synopsis faillog [options]
Description
faillog formats the contents of the failure log from /var/log/faillog database. It also can be used for maintains failure counters and limits. Run faillog without arguments display only list of user faillog records who have ever had a login failure.
Options
The options which apply to the faillog command are:
-a, --all
Display faillog records for all users.
-h, --help
Display help message and exit.
-l, --lock-time SEC
Lock account to SEC seconds after failed login.
-m, --maximum MAX
Set maximum number of login failures after the account is disabled to MAX. Selecting MAX value of 0 has the effect of not placing a limit on the number of failed logins. The maximum failure count should always be 0 for root to prevent a denial of services attack against the system.
-r, --reset
Reset the counters of login failures or one record if used with the -u LOGINoption. Write access to /var/log/faillog is required for this option.
-t, --time DAYS
Display faillog records more recent than DAYS. The -t flag overrides the use of -u.
-u, --user LOGIN
Display faillog record or maintains failure counters and limits (if used with -l, -m or -r options) only for user with LOGIN.
Caveats
faillog only prints out users with no successful login since the last failure. To print out a user who has had a successful login since their last failure, you must explicitly request the user with the -u flag, or print out all users with the -a flag.
Files
/var/log/faillog
Failure logging file.
PROBLEM: How do I deny login access/lock accounts for users who mis type their passwords more than a set number of times?
SOLUTION:
The faillog mechanism is designed to log login failures. By typing "faillog" at your shell prompt, you can obtain a list of users who have repeatedly tried to login and have failed.
The "faillog" is reset upon successful login - so once a user succeeds their failure count is set to 0.
You can limit the maximum number of login failures (system wide) by using the "faillog -m" option (specify the maximum number of failures allowed).
You can reset the fail count for a user (once a user has been "locked out" this is required to "unlock" him/her) using the "faillog -u username -r" command.
EXAMPLE:
Set the maximum number of login failures to 5:
At a terminal prompt, type faillog -m 5 and press ENTER.
Reset the login failures for the user "geeko":
At a terminal prompt, type faillog -u geeko -r and press ENTER.
Monday, 9 February 2009
Linux and NFS - how to mount an NFS resource
Add nfs mount on a linux machine
For the full info - go here http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-nfs-mount.html
Vital directories;
/etc/fstab
ALSO - make sure you have created the dir as a dir on the server! In other words, a request to mount the resource ukpoopoop003:/apps/export/hsit as /apps/filestaging2/appsith means you need to create the dir appsith on this server under /apps/filestaging2
Mounting NFS Filesystems using /etc/fstab
An alternate way to mount an NFS share from another machine is to add a line to the /etc/fstab file. The line must state the hostname of the NFS server, the directory on the server being exported, and the directory on the local machine where the NFS share is to be mounted. You must be root to modify the /etc/fstab file.
The general syntax for the line in /etc/fstab is as follows:
server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr
The mount point /pub must exist on the client machine. After adding this line to /etc/fstab on the client system, type the command mount /pub at a shell prompt, and the mount point /pub will be mounted from the server.
Here is an example of /etc/fstab with mounted nfs resources;
server001 $ more /etc/fstab
.......truncated for brevity........
pradltot06:/export/filestaging/cac01 /app/filestaging/pOOpOO01 nfs bg
0 0
pradltot07:/export2/filestaging/cac01 /app/filestaging2/pOOpOO1 nfs bg
0 0
For the full info - go here http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-nfs-mount.html
Vital directories;
/etc/fstab
ALSO - make sure you have created the dir as a dir on the server! In other words, a request to mount the resource ukpoopoop003:/apps/export/hsit as /apps/filestaging2/appsith means you need to create the dir appsith on this server under /apps/filestaging2
Mounting NFS Filesystems using /etc/fstab
An alternate way to mount an NFS share from another machine is to add a line to the /etc/fstab file. The line must state the hostname of the NFS server, the directory on the server being exported, and the directory on the local machine where the NFS share is to be mounted. You must be root to modify the /etc/fstab file.
The general syntax for the line in /etc/fstab is as follows:
server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr
The mount point /pub must exist on the client machine. After adding this line to /etc/fstab on the client system, type the command mount /pub at a shell prompt, and the mount point /pub will be mounted from the server.
Here is an example of /etc/fstab with mounted nfs resources;
server001 $ more /etc/fstab
.......truncated for brevity........
pradltot06:/export/filestaging/cac01 /app/filestaging/pOOpOO01 nfs bg
0 0
pradltot07:/export2/filestaging/cac01 /app/filestaging2/pOOpOO1 nfs bg
0 0
Subscribe to:
Posts (Atom)
