Step 1) Setup environment vaiables (Using csh):
# setenv PATH \
/usr/sfw/bin:/usr/local/bin:/usr/bin:/bin
# setenv PATH \
${PATH}:/usr/ccs/bin:/usr/sbin:/opt/sfw/bin:.
# setenv LD_LIBRARY_PATH \
/usr/sfw/lib:/usr/local/lib:/opt/sfw/lib
Step 2) Configure and install perl (Install location will be /usr/local/perl587)
# gtar xfz perl-5.8.7.tar.gz
# cd perl-5.8.7
# rm -f config.sh Policy.sh
# sh Configure -Dcc='gcc -B/usr/ccs/bin/' \
-Dprefix=/usr/local/perl587 -des
# make
# make test
# make install
# cd ..
# cp /usr/local/perl587/bin/perl /usr/local/bin
Step 3) Check perl has been install and is in your path.
# rehash
# which perl
/usr/local/bin/perl
# perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=solaris, osvers=2.10, archname=sun4-solaris
... a lot more stuff....
Step 4) Install some basic perl modules (down load from: http://search.cpan.org/)
# gtar xfz HTML-Tagset-3.04.tar.gz
# cd HTML-Tagset-3.04
# perl Makefile.PL
# make
# make test
# make install
# cd ..
# gtar xfz HTML-Parser-3.46.tar.gz
# cd HTML-Parser-3.46
# perl Makefile.PL
# make
# make test
# make install
# cd ..
# gtar xfz URI-1.35.tar.gz
# cd URI-1.35
# perl Makefile.PL
# make
# make test
# make install
# cd ..
# gtar xfz Compress-Zlib-1.41.tar.gz
# cd Compress-Zlib-1.41
# perl Makefile.PL
# make
# make test
# make install
# cd ..
# gtar xfz libwww-perl-5.803.tar.gz
# cd libwww-perl-5.803
# perl Makefile.PL -n
# make
# make test
# make install
# cd ..
Step 5) Set up mod_perl (Need to extract apache files first, since it updates them):
# gtar xfz apache_1.3.34.tar.gz
# gtar xfz mod_perl-1.29.tar.gz
# cd mod_perl-1.29
# perl Makefile.PL \
APACHE_SRC=../apache_1.3.34/src \
DO_HTTPD=1 USE_APACI=1 \
PREP_HTTPD=1 EVERYTHING=1
# make
# make install
Step 6) Previous step did not compile apache. I prefer it that way:
# ./configure --prefix=/usr/local/Apache/1334 \
--enable-module=info \
--enable-module=most --enable-shared=max \
--enable-module=status \
--enable-module=so \
--activate-module=src/modules/perl/libperl.a
# make
# make install
Step 7) We will pause here, since if you try to start the apache server you will get an error if this is on a SPARC platform.
# /usr/local/Apache/1334/bin/apachectl start
Syntax error on line 210 of /usr/local/Apache/1334/conf/httpd.conf:
Cannot load /usr/local/Apache/1334/libexec/mod_negotiation.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/Apache/1334/libexec/mod_negotiation.so: symbol __floatdisf: referenced symbol not found
/usr/local/Apache/1334/bin/apachectl start: httpd could not be started
Step 8) SKIP to "step 9" if you are on a x86 platform.
# cd src/modules/proxy
# ld -G -o mod_proxy.so mod_proxy.lo \
`gcc -print-libgcc-file-name`
# cd ../standard
# ld -G -o mod_negotiation.so mod_negotiation.lo \
`gcc -print-libgcc-file-name`
# cd ../../..
# make
# make install
solaris interview questions and answers for all versions
Header Ad Banner
Wednesday, December 31, 2008
NFS server configuration on solaris 10
The network file system (NFS)
NFS iss the system that can be used to access file systems over the network. NFS version 4 is the default NFS in Solaris 10. The NFS service is managed by the Service Management Facility. That means NFS can be managed (enabled, disabled, or restarted) by the svcadm command, and the status of NFS service can be obtained by using the svcs command. The benefit here is sharing files over the network among computers possibly running different operating systems.
The NFS Service
The NFS service is a network service that enables computers of different architectures running different operating systems to share file systems across the network. A wide spectrum of operating systems ranging from Windows to Linux/UNIX support NFS. It has become possible to implement the NFS environment on a variety of operating systems because it is defined as an abstract model of a file system, rather than an architectural specification. Each operating system applies the NFS model to its specific file system semantics. This means that file system operations such as reading and writing work for the users as if they were accessing a file on the local system.
The benefits of the NFS service are described here:
1) It enables users on the network to share data, because all computers on the network can access the same set of files.
2) It reduces storage costs by letting computers share applications and common files instead of needing local disk space on each computer for each common file and user application.
3) It provides data consistency and reliability, because all users can read the same set of files, and whenever changes are made, they are made only at one place.
4) It makes the mounting of file systems accessing the remote files transparent to users.
5) It supports heterogeneous environments and reduces system administration overhead.
NFS is a network service offered in the client/server environment
NFS Servers and Clients
The NFS is a client/server system, the terms client and server refer to the roles that computers assume in sharing resources (file systems in this case) on the network. In NFS, computers that make their file systems available over the network and thereby offer NFS service to serve the requested files are acting as NFS servers, and the computers that are accessing the file systems are acting as NFS clients. In the NFS framework, a computer on a network can assume the role of a client, a server, or both.
Here is how NFS works:
A server makes a file system on its disk available for sharing, and the file system can then be accessed by an NFS client: on the network.
A client accesses files on the server's shared file system by mounting the file system.
The client does not make a copy of the file system on the server; instead, the mounting process uses a series of remote procedure calls that enable the client to access the file system transparently on the server's disk. To the user, the mounting works just like a mount on the local machine.
Once the remote file system (on the server) is mounted on the client machine, the user types commands as though the file systems were local.
You can mount an NFS file system automatically with autoFS.
The NFS File Systems
In most UNIX system environments, a file hierarchy that can be shared by using the NFS service corresponds to a file system or a portion of a file system. However, a file system resides on a single operating system, and NFS support works across operating systems. Moreover, the concept of a file system might be meaningless in some non-UNIX environments. Therefore, the term file system in NFS refers to a file or a file hierarchy that can be shared and mounted in the NFS environment.
An NFS server can make a single file or a directory subtree (file hierarchy) available to the NFS service for sharing. A server cannot share a file hierarchy that overlaps with a file hierarchy that is already being shared. Note that peripheral devices such as modems and printers cannot be shared under NFS.
Managing NFS
Since the release of Solaris 9, the NFS server starts automatically when you boot the system. Nevertheless, you do need to manage NFS, which includes administering the NFS service, working with NFS daemons, and making file systems available for sharing.
Administering the NFS Service
When the system is booted, the NFS server is automatically started by executing the nfs.server scripts. However, when the system is up, you may need to stop the service or start it again for whatever reason without rebooting the system. For that, you need to know that the NFS service is managed by the Service Management Facility (SMF) under the identifier network/nfs/server. By means of this identifier, you can find the status of the service by using the svcs command, and you can start (enable) or stop (disable) the service by using the svcadm command.
You can determine whether the NFS service is running on your machine by issuing the command shown here:
# svcs network/nfs/server
This command displays whether the NFS service is online or disabled. If you want to stop (disable) the service, issue the following command:
# svcadm disable network/nfs/server
You can start the service by issuing the following command:
# svcadm enable network/nfs/server
When the system is up, some daemons are running to support the NFS service.
Working with NFS Daemons
Since the release of Solaris 9, NFS service starts automatically when the system is booted. When the system goes into level 3 (or multiuser mode), several NFS daemons are started to support the service.
Daemons automatically started in NFS version 4 when the system boots Daemon
Description
automountd - Handles mount and unmount requests from the autofs service.
nfsd - Handles file system requests from clients.
nfs4cbd - Manages the communication endpoints for the NFS version 4 callback program.
nfsmapid - Provides integer-to-String and string-to-integer conversions for the user ID (UID) and the group ID (GID).
The nfsd daemon handles the file system requests from the client and is automatically started with option -a. You can change the parameters of the command by editing the /etc/default/nfs file. The syntax for the nfsd command is as follows:
nfsd [-a] [-c {#_conn}] [-l {listenBacklog}] [-p {protocol}] [-t {device}]
[{nservers}]
The options and parameters are described here:
-a. Start the daemon over all available connectionless and connection-oriented transport protocols such as TCP and UDP. This is equivalent to setting the NFSD_PROTOCOL parameter in the nfs file to ALL.
-c (#_conn.) Set the maximum number of connections allowed to the NFS server over connection-oriented transport protocols such as TCP. By default, the number is unlimited. The equivalent parameter in the nfs file is NFSD_MAX_CONNECTIONS.
-l (listenBacklog). Set the connection queue length (specified by (listenBacklog)) for the number of entries for the NFS TCP. The default value is 32. This number can also be determined by setting the NFSD_LISTEN_BACKLOG parameter in the nfs file.
-p (protocol). Start the daemon over the protocol specified by (protocol). The default in NFS version 4 is TCP. The equivalent parameter in the nfs file is: NFSD_PROTOCOL.
-t (device). Start an nfs daemon for the transport specified by. The equivalent parameter in the nfs file is: NFSD_DEVICES.
(nservers). Set the maximum number of concurrent requests from the clients that the NFS server can handle. The equivalent parameter in the nfs file is: NFSD_SERVERS.
The default NFS version is version 4 in Solaris 10, Unlike previous versions of NFS, NFS version 4 does not use these daemons: lockd, mountd, nfslogd, and statd
Sharing File Systems
On the server machine, you can make a file system available for sharing by using the share command on the machine. You can use this command manually for testing purpose or to make a file system available only until the system is rebooted. If you want to make the sharing of a file system permanent and automatic, you should enter the share command into the /etc/dfs/dfstab file. Each entry of this file is a share command, and this file is automatically executed at boot time when the system enters run level 3. The syntax for the share command is shown here:
share [-F (FSType)] [-o (specificOptions)] [-d (description)] [(pathname)]
The options are described here:
-F (FSType). Specifies the file system type, such as nfs.
-o (specificOptions). The (specificOptions) specifies the options for controlling access to the shared file system. The possible values for (specificOptions) are as follows:
rw. Read/write permissions for all clients. This is the default behavior.
rw = (client1):(client2). . . . Read/write permission for the listed clients; no access for any other client.
ro. Read-only permission for all clients.
ro = (client1):(client2). . . . Read-only permission for the listed clients; no access for any other client.
-d (description). The (description) specifies the description for the shared resource.
If you want to know the resources being shared on the local server, issue the dfshares command without any arguments or options.
Files related to the NFS service
/etc/default/autofs - Configuration information for autofs.
/etc/default/fs - Lists the default file system type for local file systems.
/etc/default/nfs - Configuration information for the nfsd daemon.
/etc/dfs/dfstab - Contains a list of local resources to be shared; the share commands.
/etc/mnttab - Lists file systems that are currently mounted.
/etc/dfs/sharetab - Lists the local and remote resources that are shared.
/etc/vfstab - Defines file systems to be mounted locally.
Some Examples how to share files in NFS
# vi /etc/dfs/dfstab
share -F nfs -o ro,anon=0 /cdrom/sol_10_305_sparc/s0/Solaris_10/Tools - to share the cdrom OS software and read only permission.
share -F nfs -o rw,anon=0 /cdrom - to share files with read and write permission and anon=0 means access to all hosts.
share -F nfs -o rw=hostname1 /cdrom - to give access to only one host.
share -F nfs -o rw=-hostname1 /cdrom - to deny this hostname1 and access to all.
share -F nfs -o rw=hostname1 hostname2 /cdrom - access to hostname1 and hostname2
share -F nfs -o rw=-hostname1 -hostname2 /cdrom - deny hostname1 and hostname2 and allow access to all computer in the network.
wq!
# Shareall (or)
#exportfs -va - to export the filesystem
#share - to see the files shared in nfs and which are exported currently
Client side mount the shared File system
# mount -f nfs hostname1:/cdrom /cdrom - mount shared file directory to local directory.
# cd /cdrom
# ls
NFS iss the system that can be used to access file systems over the network. NFS version 4 is the default NFS in Solaris 10. The NFS service is managed by the Service Management Facility. That means NFS can be managed (enabled, disabled, or restarted) by the svcadm command, and the status of NFS service can be obtained by using the svcs command. The benefit here is sharing files over the network among computers possibly running different operating systems.
The NFS Service
The NFS service is a network service that enables computers of different architectures running different operating systems to share file systems across the network. A wide spectrum of operating systems ranging from Windows to Linux/UNIX support NFS. It has become possible to implement the NFS environment on a variety of operating systems because it is defined as an abstract model of a file system, rather than an architectural specification. Each operating system applies the NFS model to its specific file system semantics. This means that file system operations such as reading and writing work for the users as if they were accessing a file on the local system.
The benefits of the NFS service are described here:
1) It enables users on the network to share data, because all computers on the network can access the same set of files.
2) It reduces storage costs by letting computers share applications and common files instead of needing local disk space on each computer for each common file and user application.
3) It provides data consistency and reliability, because all users can read the same set of files, and whenever changes are made, they are made only at one place.
4) It makes the mounting of file systems accessing the remote files transparent to users.
5) It supports heterogeneous environments and reduces system administration overhead.
NFS is a network service offered in the client/server environment
NFS Servers and Clients
The NFS is a client/server system, the terms client and server refer to the roles that computers assume in sharing resources (file systems in this case) on the network. In NFS, computers that make their file systems available over the network and thereby offer NFS service to serve the requested files are acting as NFS servers, and the computers that are accessing the file systems are acting as NFS clients. In the NFS framework, a computer on a network can assume the role of a client, a server, or both.
Here is how NFS works:
A server makes a file system on its disk available for sharing, and the file system can then be accessed by an NFS client: on the network.
A client accesses files on the server's shared file system by mounting the file system.
The client does not make a copy of the file system on the server; instead, the mounting process uses a series of remote procedure calls that enable the client to access the file system transparently on the server's disk. To the user, the mounting works just like a mount on the local machine.
Once the remote file system (on the server) is mounted on the client machine, the user types commands as though the file systems were local.
You can mount an NFS file system automatically with autoFS.
The NFS File Systems
In most UNIX system environments, a file hierarchy that can be shared by using the NFS service corresponds to a file system or a portion of a file system. However, a file system resides on a single operating system, and NFS support works across operating systems. Moreover, the concept of a file system might be meaningless in some non-UNIX environments. Therefore, the term file system in NFS refers to a file or a file hierarchy that can be shared and mounted in the NFS environment.
An NFS server can make a single file or a directory subtree (file hierarchy) available to the NFS service for sharing. A server cannot share a file hierarchy that overlaps with a file hierarchy that is already being shared. Note that peripheral devices such as modems and printers cannot be shared under NFS.
Managing NFS
Since the release of Solaris 9, the NFS server starts automatically when you boot the system. Nevertheless, you do need to manage NFS, which includes administering the NFS service, working with NFS daemons, and making file systems available for sharing.
Administering the NFS Service
When the system is booted, the NFS server is automatically started by executing the nfs.server scripts. However, when the system is up, you may need to stop the service or start it again for whatever reason without rebooting the system. For that, you need to know that the NFS service is managed by the Service Management Facility (SMF) under the identifier network/nfs/server. By means of this identifier, you can find the status of the service by using the svcs command, and you can start (enable) or stop (disable) the service by using the svcadm command.
You can determine whether the NFS service is running on your machine by issuing the command shown here:
# svcs network/nfs/server
This command displays whether the NFS service is online or disabled. If you want to stop (disable) the service, issue the following command:
# svcadm disable network/nfs/server
You can start the service by issuing the following command:
# svcadm enable network/nfs/server
When the system is up, some daemons are running to support the NFS service.
Working with NFS Daemons
Since the release of Solaris 9, NFS service starts automatically when the system is booted. When the system goes into level 3 (or multiuser mode), several NFS daemons are started to support the service.
Daemons automatically started in NFS version 4 when the system boots Daemon
Description
automountd - Handles mount and unmount requests from the autofs service.
nfsd - Handles file system requests from clients.
nfs4cbd - Manages the communication endpoints for the NFS version 4 callback program.
nfsmapid - Provides integer-to-String and string-to-integer conversions for the user ID (UID) and the group ID (GID).
The nfsd daemon handles the file system requests from the client and is automatically started with option -a. You can change the parameters of the command by editing the /etc/default/nfs file. The syntax for the nfsd command is as follows:
nfsd [-a] [-c {#_conn}] [-l {listenBacklog}] [-p {protocol}] [-t {device}]
[{nservers}]
The options and parameters are described here:
-a. Start the daemon over all available connectionless and connection-oriented transport protocols such as TCP and UDP. This is equivalent to setting the NFSD_PROTOCOL parameter in the nfs file to ALL.
-c (#_conn.) Set the maximum number of connections allowed to the NFS server over connection-oriented transport protocols such as TCP. By default, the number is unlimited. The equivalent parameter in the nfs file is NFSD_MAX_CONNECTIONS.
-l (listenBacklog). Set the connection queue length (specified by (listenBacklog)) for the number of entries for the NFS TCP. The default value is 32. This number can also be determined by setting the NFSD_LISTEN_BACKLOG parameter in the nfs file.
-p (protocol). Start the daemon over the protocol specified by (protocol). The default in NFS version 4 is TCP. The equivalent parameter in the nfs file is: NFSD_PROTOCOL.
-t (device). Start an nfs daemon for the transport specified by
(nservers). Set the maximum number of concurrent requests from the clients that the NFS server can handle. The equivalent parameter in the nfs file is: NFSD_SERVERS.
The default NFS version is version 4 in Solaris 10, Unlike previous versions of NFS, NFS version 4 does not use these daemons: lockd, mountd, nfslogd, and statd
Sharing File Systems
On the server machine, you can make a file system available for sharing by using the share command on the machine. You can use this command manually for testing purpose or to make a file system available only until the system is rebooted. If you want to make the sharing of a file system permanent and automatic, you should enter the share command into the /etc/dfs/dfstab file. Each entry of this file is a share command, and this file is automatically executed at boot time when the system enters run level 3. The syntax for the share command is shown here:
share [-F (FSType)] [-o (specificOptions)] [-d (description)] [(pathname)]
The options are described here:
-F (FSType). Specifies the file system type, such as nfs.
-o (specificOptions). The (specificOptions) specifies the options for controlling access to the shared file system. The possible values for (specificOptions) are as follows:
rw. Read/write permissions for all clients. This is the default behavior.
rw = (client1):(client2). . . . Read/write permission for the listed clients; no access for any other client.
ro. Read-only permission for all clients.
ro = (client1):(client2). . . . Read-only permission for the listed clients; no access for any other client.
-d (description). The (description) specifies the description for the shared resource.
If you want to know the resources being shared on the local server, issue the dfshares command without any arguments or options.
Files related to the NFS service
/etc/default/autofs - Configuration information for autofs.
/etc/default/fs - Lists the default file system type for local file systems.
/etc/default/nfs - Configuration information for the nfsd daemon.
/etc/dfs/dfstab - Contains a list of local resources to be shared; the share commands.
/etc/mnttab - Lists file systems that are currently mounted.
/etc/dfs/sharetab - Lists the local and remote resources that are shared.
/etc/vfstab - Defines file systems to be mounted locally.
Some Examples how to share files in NFS
# vi /etc/dfs/dfstab
share -F nfs -o ro,anon=0 /cdrom/sol_10_305_sparc/s0/Solaris_10/Tools - to share the cdrom OS software and read only permission.
share -F nfs -o rw,anon=0 /cdrom - to share files with read and write permission and anon=0 means access to all hosts.
share -F nfs -o rw=hostname1 /cdrom - to give access to only one host.
share -F nfs -o rw=-hostname1 /cdrom - to deny this hostname1 and access to all.
share -F nfs -o rw=hostname1 hostname2 /cdrom - access to hostname1 and hostname2
share -F nfs -o rw=-hostname1 -hostname2 /cdrom - deny hostname1 and hostname2 and allow access to all computer in the network.
wq!
# Shareall (or)
#exportfs -va - to export the filesystem
#share - to see the files shared in nfs and which are exported currently
Client side mount the shared File system
# mount -f nfs hostname1:/cdrom /cdrom - mount shared file directory to local directory.
# cd /cdrom
# ls
Booting process in solaris 10
Booting process in solaris 10
The first question while giving any interview in solaris is what is the booting process in solaris or what is the boot phase in solaris.
Even to understand solaris clearly and to trouble shoot most of the things we need to know the booting process so that we can encounter where exactly is the problem we are getting.
The Boot Phases
The different phases of the boot process on SPARC-based systems are described here:
(I) Boot PROM phase.
The PROM displays the system identification information and then runs power-on self test (POST), which is a diagnostics routine that scans the system to verify the installed hardware and memory. POST runs diagnostics on hardware devices and builds a device tree, which is a data structure describing the devices attached to the system. After the completion of POST, the PROM loads the primary boot program bootblk.
(II) Boot programs phase.
The bootblk program loaded by PROM finds the secondary boot program ufsboot located in the UFS file system on the default boot device and loads it into the memory.
(III) Kernel initialization phase.
The ufsboot program loads the kernel into the memory. The kernel initializes itself and uses the ufsboot program to locate and load OS modules to control the system. A module is a piece of software with a specific functionality, such as interfacing with a particular hardware device. After loading enough modules to mount the root (/) file system, the kernel umnaps the ufsboot program and continues gaining control of the system. At the end of the kernel initialization phase, the kernel starts the /sbin/init process.
(IV) The init phase.
The init phase starts when, after initializing itself, the kernel starts the /sbin/init process, which in turn starts /lib/svc/bin/svc.startd to start the system services to do the following:
Check and mount file systems.
Configure network and devices.
Start various processes and perform tasks related to system maintenance.
The svc.startd process also executes run control (rc) scripts for backward compatibility. The steps in the boot process are illustrated in
Thanks
Naveen
The first question while giving any interview in solaris is what is the booting process in solaris or what is the boot phase in solaris.
Even to understand solaris clearly and to trouble shoot most of the things we need to know the booting process so that we can encounter where exactly is the problem we are getting.
The Boot Phases
The different phases of the boot process on SPARC-based systems are described here:
(I) Boot PROM phase.
The PROM displays the system identification information and then runs power-on self test (POST), which is a diagnostics routine that scans the system to verify the installed hardware and memory. POST runs diagnostics on hardware devices and builds a device tree, which is a data structure describing the devices attached to the system. After the completion of POST, the PROM loads the primary boot program bootblk.
(II) Boot programs phase.
The bootblk program loaded by PROM finds the secondary boot program ufsboot located in the UFS file system on the default boot device and loads it into the memory.
(III) Kernel initialization phase.
The ufsboot program loads the kernel into the memory. The kernel initializes itself and uses the ufsboot program to locate and load OS modules to control the system. A module is a piece of software with a specific functionality, such as interfacing with a particular hardware device. After loading enough modules to mount the root (/) file system, the kernel umnaps the ufsboot program and continues gaining control of the system. At the end of the kernel initialization phase, the kernel starts the /sbin/init process.
(IV) The init phase.
The init phase starts when, after initializing itself, the kernel starts the /sbin/init process, which in turn starts /lib/svc/bin/svc.startd to start the system services to do the following:
Check and mount file systems.
Configure network and devices.
Start various processes and perform tasks related to system maintenance.
The svc.startd process also executes run control (rc) scripts for backward compatibility. The steps in the boot process are illustrated in
Thanks
Naveen
Basic Boot PROM Commands
Basic Boot PROM Commands
ok boot cdrom - To boot from CD-ROM drive
ok boot disk - To boot from hard disk
ok boot floppy - To boot from 3.5 inch diskette drive
ok boot net - To boot from network( basically used for Custom Jumpstart
ok tape for SCSI tape
ok boot cdrom - To boot from CD-ROM drive
ok boot disk - To boot from hard disk
ok boot floppy - To boot from 3.5 inch diskette drive
ok boot net - To boot from network( basically used for Custom Jumpstart
ok tape for SCSI tape
Important open boot commands in solaris OBP commands
Basic Boot PROM Commands
When the system is turned on or reset, it first runs POST, and then one of the following two things can happen:
The system will automatically reboot if the value of the configuration variable auto-boot? is true, the value of the boot-command variable is boot, and OpenBoot is not in diagnostic mode. In order to boot, the system will automatically load, and executes the program and its arguments specified by the boot-file variable from the device described by the boot-device variable.
If the configuration variable auto-boot? is false, the system may stop at the OpenBoot user interface without booting the system and will display the ok prompt.
You can issue the Boot PROM commands at the ok prompt. One obvious command is the boot command to boot the system, which you can use in one of the following ways:
Issue the boot command without any arguments if you want to boot the system from the default boot device using the default boot arguments.
Issue the boot command with an explicit boot device as an argument if you want to boot the system from the specified boot device using the default boot arguments.
Issue the boot command with explicit boot arguments if you want to boot the system from the default device by using the specified arguments.
Issue the boot command with an explicit boot device and with explicit arguments if you want to boot the system from the specified device with the specified arguments.
The general syntax of the boot command is shown here:
boot [device] [arguments]
Arguments and options are described here:
{device}. Specifies the full path or the alias for the boot device. The typical values are:
ok cdrom for CD-ROM drive
ok disk for hard disk
ok floppy for 3.5 inch diskette drive
ok net for network
ok tape for SCSI tape
{arguments}. Specify the arguments for the boot command such as the name of the file that contains the program that will be started as a result of the command. The name is relative to the selected device and partition. If this argument is not specified, the boot program uses the value of the NVRAM parameter: boot-file.
In addition to the boot command there are other administrative and diagnostic commands that you can issue at the Boot PROM prompt: ok. The commonly used OpenBoot PROM commands issued from the ok prompt are described below
ok banner - Displays current power-on banner. (-h ) can be used
ok boot [arguments] [options] - Boots the system.
ok boot - Boots with default options.
ok .enet-addr - Displays current Ethernet address of the machine.
ok .version - Displays the version of the Boot PROM
ok eject media - Ejects the media.
ok eject floppy
ok eject cdrom
ok eject tape
ok help [category]
ok help [command]
ok help [command]
The help command without arguments displays a list of command categories, and, with a category as an argument, displays help for all the commands in that category.
Example :- ok help setenv - Displays help for the setenv command.
ok password - Sets the security password.
ok printenv - Displays a table showing the boot configuration variable names, their current values, and default values.
ok reset-all - Resets the system. It's equivalent to performing a power cycle.
ok set-default [varName] - Sets the value of the specified variable to its default value.
Example :- ok set-default auto-boot?
ok setenv [varName] [value] - Sets the value of a boot configuration variable.
Example - ok auto-boot? false
ok show-devs - Displays the list of all the devices in the OpenBoot device tree.
ok test [device] - Tests the specified device. No message displayed means test succeeded.
Example -
ok test floppy
ok test cdrom
ok test /memory
ok test tape
ok probe-scsi-all - to see all scsi based hardware.
Rebooting the Hung System
In order to reboot the hung system and force a crash dump, perform the following steps. This procedure will work even if the system is not hung.
Press the stop key sequence for your system. The specific stop key sequence depends on your keyboard type. For example, it could be Stop-A or L1-A. On terminals, press the Break key. The system will go to the PROM phase and display the ok prompt.
Synchronize the file systems and write the crash dump.
1)> n
ok sync
After the crash dump has been written to disk, the system will continue to reboot.
Verify that the system boots to run level 3. The login prompt is displayed when the boot process has finished successfully.
[login prompt]:
Login as root, and issue the following command to force a crash dump:
halt -d
At the ok prompt, issue the boot command to boot the system:
ok boot
Making boot device alias
In case system can not boot from primary disk and it is needed to make another boot disk to access the data , nvalias command is used .
nvalias command makes the device alias and assigns an alternate name to a physical disk. Physical address of target disk is required which can be had by show-disk command on ok>.
ok nvalias disk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd2,0
The new aliased disk can be named as boot disk or can be used for booting by refering its name .
ok setenv boot-device disk7
ok reset
or
ok boot disk7
When the system is turned on or reset, it first runs POST, and then one of the following two things can happen:
The system will automatically reboot if the value of the configuration variable auto-boot? is true, the value of the boot-command variable is boot, and OpenBoot is not in diagnostic mode. In order to boot, the system will automatically load, and executes the program and its arguments specified by the boot-file variable from the device described by the boot-device variable.
If the configuration variable auto-boot? is false, the system may stop at the OpenBoot user interface without booting the system and will display the ok prompt.
You can issue the Boot PROM commands at the ok prompt. One obvious command is the boot command to boot the system, which you can use in one of the following ways:
Issue the boot command without any arguments if you want to boot the system from the default boot device using the default boot arguments.
Issue the boot command with an explicit boot device as an argument if you want to boot the system from the specified boot device using the default boot arguments.
Issue the boot command with explicit boot arguments if you want to boot the system from the default device by using the specified arguments.
Issue the boot command with an explicit boot device and with explicit arguments if you want to boot the system from the specified device with the specified arguments.
The general syntax of the boot command is shown here:
boot [device] [arguments]
Arguments and options are described here:
{device}. Specifies the full path or the alias for the boot device. The typical values are:
ok cdrom for CD-ROM drive
ok disk for hard disk
ok floppy for 3.5 inch diskette drive
ok net for network
ok tape for SCSI tape
{arguments}. Specify the arguments for the boot command such as the name of the file that contains the program that will be started as a result of the command. The name is relative to the selected device and partition. If this argument is not specified, the boot program uses the value of the NVRAM parameter: boot-file.
In addition to the boot command there are other administrative and diagnostic commands that you can issue at the Boot PROM prompt: ok. The commonly used OpenBoot PROM commands issued from the ok prompt are described below
ok banner - Displays current power-on banner. (-h ) can be used
ok boot [arguments] [options] - Boots the system.
ok boot - Boots with default options.
ok .enet-addr - Displays current Ethernet address of the machine.
ok .version - Displays the version of the Boot PROM
ok eject media - Ejects the media.
ok eject floppy
ok eject cdrom
ok eject tape
ok help [category]
ok help [command]
ok help [command]
The help command without arguments displays a list of command categories, and, with a category as an argument, displays help for all the commands in that category.
Example :- ok help setenv - Displays help for the setenv command.
ok password - Sets the security password.
ok printenv - Displays a table showing the boot configuration variable names, their current values, and default values.
ok reset-all - Resets the system. It's equivalent to performing a power cycle.
ok set-default [varName] - Sets the value of the specified variable to its default value.
Example :- ok set-default auto-boot?
ok setenv [varName] [value] - Sets the value of a boot configuration variable.
Example - ok auto-boot? false
ok show-devs - Displays the list of all the devices in the OpenBoot device tree.
ok test [device] - Tests the specified device. No message displayed means test succeeded.
Example -
ok test floppy
ok test cdrom
ok test /memory
ok test tape
ok probe-scsi-all - to see all scsi based hardware.
Rebooting the Hung System
In order to reboot the hung system and force a crash dump, perform the following steps. This procedure will work even if the system is not hung.
Press the stop key sequence for your system. The specific stop key sequence depends on your keyboard type. For example, it could be Stop-A or L1-A. On terminals, press the Break key. The system will go to the PROM phase and display the ok prompt.
Synchronize the file systems and write the crash dump.
1)> n
ok sync
After the crash dump has been written to disk, the system will continue to reboot.
Verify that the system boots to run level 3. The login prompt is displayed when the boot process has finished successfully.
[login prompt]:
Login as root, and issue the following command to force a crash dump:
halt -d
At the ok prompt, issue the boot command to boot the system:
ok boot
Making boot device alias
In case system can not boot from primary disk and it is needed to make another boot disk to access the data , nvalias command is used .
nvalias command makes the device alias and assigns an alternate name to a physical disk. Physical address of target disk is required which can be had by show-disk command on ok>.
ok nvalias disk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,80000/sd2,0
The new aliased disk can be named as boot disk or can be used for booting by refering its name .
ok setenv boot-device disk7
ok reset
or
ok boot disk7
Friday, December 19, 2008
Creation of user and group in solaris10
Creation of user and group in solaris10
From command mode :-
#groupadd -g gid groupname- to create a new group .
eg:- groupadd -g 200 newgroup
#more /etc/groups
to check if the group is created
#useradd -u-g -d /export/home/userhomedirectory -m -s /bin/sh username
eg:- useradd -u 200 -g 200 -d /export/home/naveen -m -s /bin/sh naveen.
#passwd naveen
enter passwd
#more /etc/passwd
#more /etc/shadow
-This is used to check the user and passwd entries are available.
GUI MODE :-
Type SMC at command mode
#smc - solaris management console
2)Double click user tab
3)Click on the create user option and enter the information
4)Enter user id .
5)Enter Password.
6)Enter group.
7)Enter Home Directory.
8)Enter default Mail server path.
9)Click finish and user is created same way u can also create group.
For testing #su - naveen - if you are trying to login from root it will not ask for passwd so use #telnet localhost and enter username and passwd.
Thanks & Regards
Naveen
From command mode :-
#groupadd -g gid groupname
eg:- groupadd -g 200 newgroup
#more /etc/groups
to check if the group is created
#useradd -u
eg:- useradd -u 200 -g 200 -d /export/home/naveen -m -s /bin/sh naveen.
#passwd naveen
enter passwd
#more /etc/passwd
#more /etc/shadow
-This is used to check the user and passwd entries are available.
GUI MODE :-
Type SMC at command mode
#smc - solaris management console
2)Double click user tab
3)Click on the create user option and enter the information
4)Enter user id .
5)Enter Password.
6)Enter group.
7)Enter Home Directory.
8)Enter default Mail server path.
9)Click finish and user is created same way u can also create group.
For testing #su - naveen - if you are trying to login from root it will not ask for passwd so use #telnet localhost and enter username and passwd.
Thanks & Regards
Naveen
Monday, November 24, 2008
Backup Interview questions
Q)How to create backup by ufs dump
A)ufsdump –0(zero)cvf /dev/rmt/0 /naveen
How to list the files
Ufsrestore –tvf /dev/rmt/0
Ufsdump –uvf /dev/rmt/0 /naveen – to updates
Ufsrestore –ivf /dev/rmt/0 /naveen
Q)How to back up using tar
A)Tar –cvf /dev/rmt/0 /naveen - copy
Tart –tvf /dev/rmt/0 - Extract
Tar –uvf /dev/rmt/0 /naveen - Update
Tar –xvf /dev/rmt/0 /naveen - Extract
A)ufsdump –0(zero)cvf /dev/rmt/0 /naveen
How to list the files
Ufsrestore –tvf /dev/rmt/0
Ufsdump –uvf /dev/rmt/0 /naveen – to updates
Ufsrestore –ivf /dev/rmt/0 /naveen
Q)How to back up using tar
A)Tar –cvf /dev/rmt/0 /naveen - copy
Tart –tvf /dev/rmt/0 - Extract
Tar –uvf /dev/rmt/0 /naveen - Update
Tar –xvf /dev/rmt/0 /naveen - Extract
Wednesday, November 12, 2008
NIS Interview questions and answers
How to create a nis master
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain
#Vi /etc/hosts
Sun1 192.168.0.1
Sun2 192.168.0.2 add all the host connected to the network
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Vi /etc/nsswitch.conf
File nis – add this entry
Wq!
#Cd /var/yp
#Ypinit –m – master server
Enter host 192.168.0.1
Stop at errors say no here
Yes-yes-yes
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Here you can see all the deamon get restarted .
Q)which command display the default nis server
A)ypwhich
Q)which command will display all the master and slave servers
A)Ypcat –k ypservers
Q)how to see the nis users
A)Ypcat passwd
Q)what are the deamons for nis master
A)Ypserv ypbind ypxfrd rpc.ypassword rpc.ypupdates.
Q)what is map
A)Map is table which consist of a key and a file which consist of the information of the key
Q)how to create nis slave server(192.168.0.2)
#Vi /etc/host
Sun1 192.168.0.1 master server ip
Wq!
#Cp /etc/nsswitch.nis /etc/switch.conf
#Vi nsswitch.con
Files nis
Wq!
#Domainname sun.com
#Echo sun.com> /etc/defaultdomain or to maintain more security /var/yp/ypservers
#Cd /var/yp
#Ypinit –s sun1 (master server)
Yes give master server ip or hostname
Error say no
Yes-yes
#Cd /var/up if u r in that directory then its okay
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Ypserv ypbind
#Ypwhich – will display master and slave servers
#Ypcat –k ypservers – list master and slave server
Q)what are the daemon for nis slave server
A)Ypserv ypbind
Q)how to see nis user from the slave
A)Ypcat passwd
38)how to configure nis client
#Vi /etc/hosts
Sun1 192.168.0.1 - master
Sun2 192.168.0.2 – slave
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain or /var/yp/ypservers
#Cd /var/yp
#Ypinit –c
Add the slave if available or master
Yes
No at errors
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Daemons for nis clients are ypbind
Q)To see nis server and master from the client
A)Ypcat –k ypservers
Q)how do you update slave servers from the master
A)Cd /var/yp
#/usr/ccs/bin/make passswd
Or yppush.
Q)how to create nis+ server and client
#Cp /etc/passwd /export/home/nisfiles
#Cp /etc/group /export/home/nisfiles
#Cp /etc/hosts /export/home/nisfiles
#Vi auto_master
Remove all entries and keep only user name home directories
Host1 192.168.0.1:/export/home
Host2 192.168.0.1:/export/home
Wq!
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisserver –r –Y
Reboot
#cd /export/home
#nspopulate -v –F
Q)how to create nis+ client
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisclient –I –h 192.168.0.1 –d sun.com
Listing table & objects in NIS+
• #nisls ;Gives the total objects in NIS+
• #nisls org_dir ;Lists the tables listed in the directory.
Listing a contents of tables
• #niscat passwd.org_dir
Listing table structure
• #niscat -o passwd.org_dir ;lists structure of password table.
Adding A user
• #nistbladm -a name=john uid=123 gid=111 home=/home/john shell=/bin/sh passwd.org_dir
Changing the user information in passwd table (Super user only
Fill in the corresponding values in <>
• #nistbladm –a name=<> passwd=<> uid=<> gid=<> home=<> shelll=<> passwd.org_d
example
• #nistbladm -a name=john uid=123 gid=234 home=/home/john shell=/bin/sh passwd.org_di
to change only shell
• #nistbladm -m shell=/usr/local/bin/bash [name=john],passwd.org_dir
Changing user passwd
As root
• # nispasswd ;user has to update his key through
chkey -p
As user
• $ nispasswd ;update encrypted key
• $chkey -p ;(user NIS+ passwd and login passwd are the same.)
Adding user credentials
• #nisaddcred -p 123 -P john local
• # nisaddcred -p unix.123@planet.com -P john.planet.com. des
123 is userid and john is the user name.
Adding / removing a user dir entry in auto_home table :
• #nistbladm -a key=john value=10.20.30.40:/home/john auto_home.org_dir
• #nistbladm -r key=john auto_home.org_dir ;If key is not unique then more fields needs to be defined .
Removing a user
• #nistbladm -r name=john passwd.org_dir
Modifying the tables for multiple entries.
• #nisaddent -d passwd > /tmp/passwd ;Dump the table to a file
• #vi /tmp/passwd ;Edit the dumped file
• # nisaddent -r -f /etc/passwd passwd ;Put back the dumped file.
nisaddent command is available only for some of the standard tables, for others either nispopulate or nistbladm has to be used .
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain
#Vi /etc/hosts
Sun1 192.168.0.1
Sun2 192.168.0.2 add all the host connected to the network
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Vi /etc/nsswitch.conf
File nis – add this entry
Wq!
#Cd /var/yp
#Ypinit –m – master server
Enter host 192.168.0.1
Stop at errors say no here
Yes-yes-yes
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Here you can see all the deamon get restarted .
Q)which command display the default nis server
A)ypwhich
Q)which command will display all the master and slave servers
A)Ypcat –k ypservers
Q)how to see the nis users
A)Ypcat passwd
Q)what are the deamons for nis master
A)Ypserv ypbind ypxfrd rpc.ypassword rpc.ypupdates.
Q)what is map
A)Map is table which consist of a key and a file which consist of the information of the key
Q)how to create nis slave server(192.168.0.2)
#Vi /etc/host
Sun1 192.168.0.1 master server ip
Wq!
#Cp /etc/nsswitch.nis /etc/switch.conf
#Vi nsswitch.con
Files nis
Wq!
#Domainname sun.com
#Echo sun.com> /etc/defaultdomain or to maintain more security /var/yp/ypservers
#Cd /var/yp
#Ypinit –s sun1 (master server)
Yes give master server ip or hostname
Error say no
Yes-yes
#Cd /var/up if u r in that directory then its okay
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Ypserv ypbind
#Ypwhich – will display master and slave servers
#Ypcat –k ypservers – list master and slave server
Q)what are the daemon for nis slave server
A)Ypserv ypbind
Q)how to see nis user from the slave
A)Ypcat passwd
38)how to configure nis client
#Vi /etc/hosts
Sun1 192.168.0.1 - master
Sun2 192.168.0.2 – slave
Wq!
#Cp /etc/nsswitch.nis /etc/nsswitch.conf
#Domainname sun.com
#Echo sun.com > /etc/defaultdomain or /var/yp/ypservers
#Cd /var/yp
#Ypinit –c
Add the slave if available or master
Yes
No at errors
#Cd /var/yp
#/usr/lib/netsvc/yp/ypstop
#/usr/lib/netsvc/yp/ypstart
Daemons for nis clients are ypbind
Q)To see nis server and master from the client
A)Ypcat –k ypservers
Q)how do you update slave servers from the master
A)Cd /var/yp
#/usr/ccs/bin/make passswd
Or yppush.
Q)how to create nis+ server and client
#Cp /etc/passwd /export/home/nisfiles
#Cp /etc/group /export/home/nisfiles
#Cp /etc/hosts /export/home/nisfiles
#Vi auto_master
Remove all entries and keep only user name home directories
Host1 192.168.0.1:/export/home
Host2 192.168.0.1:/export/home
Wq!
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisserver –r –Y
Reboot
#cd /export/home
#nspopulate -v –F
Q)how to create nis+ client
#cp /etc/nsswitch.nis /etc/nsswitch.conf
Files nisplus
Wq!
#domainname sun.com
#echo sun.com>/etc/defaultdomain
#nisclient –I –h 192.168.0.1 –d sun.com
Listing table & objects in NIS+
• #nisls ;Gives the total objects in NIS+
• #nisls org_dir ;Lists the tables listed in the directory.
Listing a contents of tables
• #niscat passwd.org_dir
Listing table structure
• #niscat -o passwd.org_dir ;lists structure of password table.
Adding A user
• #nistbladm -a name=john uid=123 gid=111 home=/home/john shell=/bin/sh passwd.org_dir
Changing the user information in passwd table (Super user only
Fill in the corresponding values in <>
• #nistbladm –a name=<> passwd=<> uid=<> gid=<> home=<> shelll=<> passwd.org_d
example
• #nistbladm -a name=john uid=123 gid=234 home=/home/john shell=/bin/sh passwd.org_di
to change only shell
• #nistbladm -m shell=/usr/local/bin/bash [name=john],passwd.org_dir
Changing user passwd
As root
• # nispasswd
chkey -p
As user
• $ nispasswd ;update encrypted key
• $chkey -p ;(user NIS+ passwd and login passwd are the same.)
Adding user credentials
• #nisaddcred -p 123 -P john local
• # nisaddcred -p unix.123@planet.com -P john.planet.com. des
123 is userid and john is the user name.
Adding / removing a user dir entry in auto_home table :
• #nistbladm -a key=john value=10.20.30.40:/home/john auto_home.org_dir
• #nistbladm -r key=john auto_home.org_dir ;If key is not unique then more fields needs to be defined .
Removing a user
• #nistbladm -r name=john passwd.org_dir
Modifying the tables for multiple entries.
• #nisaddent -d passwd > /tmp/passwd ;Dump the table to a file
• #vi /tmp/passwd ;Edit the dumped file
• # nisaddent -r -f /etc/passwd passwd ;Put back the dumped file.
nisaddent command is available only for some of the standard tables, for others either nispopulate or nistbladm has to be used .
Sunday, November 9, 2008
User Administration solaris interview
Q)how to create a user
A)Useradd –u uid –g gid –d /export/home/naveen –m –s /bin/sh naveen
Q)whats are the files which maintain user informations
/etc/passwd
/etc/group
/etc/shadow
Q)fields in /etc/passwd
User-passwd-uid-gid-homedirectory-shell
Q)fields in /etc/group
A)groupname-gid
Q)fields in /etc/shadow
A)username:encrypted passwd-min-max-lastchange-inactive-warn-expire
Q)how to create a quotas
A)Cd /export/home
Touch quotas
Chmod u+rw quotas
Edquota naveen
Soft=5000 hard=6000 inodes=5000 inode=5500
Quotaon –v /export/home
Repqupota –v /export/home or quota –v naveen to see quota
A)Useradd –u uid –g gid –d /export/home/naveen –m –s /bin/sh naveen
Q)whats are the files which maintain user informations
/etc/passwd
/etc/group
/etc/shadow
Q)fields in /etc/passwd
User-passwd-uid-gid-homedirectory-shell
Q)fields in /etc/group
A)groupname-gid
Q)fields in /etc/shadow
A)username:encrypted passwd-min-max-lastchange-inactive-warn-expire
Q)how to create a quotas
A)Cd /export/home
Touch quotas
Chmod u+rw quotas
Edquota naveen
Soft=5000 hard=6000 inodes=5000 inode=5500
Quotaon –v /export/home
Repqupota –v /export/home or quota –v naveen to see quota
Tuesday, November 4, 2008
User Administration solaris interview
How to breakroot passwd
#ok boot cdrom –s
TERM=ansi
Export TERM
Mkdir /demo
Mount /dev/dsk/c0t0d0s0 /demo
Vi /naveen/etc/passwd
Root:KHGHGHGGFG:-remove this junk passwd
Wq!
Reboot it logins with out asking for passwd
# Passwd – enter new password.
#ok boot cdrom –s
TERM=ansi
Export TERM
Mkdir /demo
Mount /dev/dsk/c0t0d0s0 /demo
Vi /naveen/etc/passwd
Root:KHGHGHGGFG:-remove this junk passwd
Wq!
Reboot it logins with out asking for passwd
# Passwd – enter new password.
Thursday, September 18, 2008
solaris interview question Raid levels and File systems
Q) How to create raid 0 concatination
A) # metainit d0 2 1 c0t0d0s1 1 c0t1d0s1
Q)How to see the meta device information
A)# metastat
Q)How to format and mount a slice
A)newfs /dev/md/rdsk/d0
Mount /dev/md/dsk/d0 /nav
Q) how to create raid 0 stripping
A) #metainit d1 1 2 c0t0d0s1 c0t0d0s2
#metastat
#newfs /dev/md/rdsk/d1
#mount /dev/md/dsk/c1 /naveen
Q) How to differentiate concatenation and stripping
A)when used metastat command stripping will show an interlace value 32KB this shows it is striped
Q)how to clear metadevices
A)#metaclear d0
#metaclear d1
Q)How to create mirroring raid -1
#metainit d1 1 1 c0t0d0s1
Metainit d2 1 1 c0t0d0s2
Metainit d3 –m d1
Metattach d3 d2
Metastat
Q)how to create stripe with parity
#metainit d1 –raid5 c0t0d0s0 c0t0d0s0 c0t2d0s0
Metastat
Newfs /dev/md/rdsk/d1
Mount /dev/md/rdsk/d1 /naveen
Q)how to grow the size of the volume
#growfs –M /d1 c0t0d0s1-(new device)
Q)how to create raids using veritas volume manager concationation
A)#vxassit –g rootdg make vol01 20g
#newfs /dev/vx/rdsk/rootdg/vol01
#mount /dev/vx/dsk/rootdg/vol01 /naveen
Stripping
A)
vxassit –g rootdg make vol02 20g layout=stripe st_width=32
#newfs /dev/vx/rdsk/rootdg/vol02
#mount /dev/vx/dsk/rootdg/vol02 /naveen
mirroring
A)vxassit –g rootdg make vol03 20g layout=mirror
newfs /dev/vx/rdsk/rootdg/vol03
mount /dev/vx/dsk/rootdg/vol03 /naveen
stripping with parity.
A)vxassit –g rootdg make vol4 20g layout=raid5,nologs
newfs /dev/vx/rdsk/rootdg/vol4
mount /dev/vx/dsk/rootdg/vol4.
Q)How to print plexes,subdisk,volumes
Vxprint –pt – for plexes
Vxprint –st subdisk
Vxprint –vt volumes
Q)how to increase the size of the volume
Vxassit –r rootdg growby vol01 20g
/usr/lib/fs/fsck –F ufs –M /naveen /dev/vx/rdsk/rootdg/vol01 40980 (offset value by typing the vxprint –vt command)
Q)what is the top command used for
A)Its lists all the processes with the process id
Cpu utilization and idle cpu
Memory utilization and idle memory
Swap utilization and ideal swap
Application using maximum cpu utilization with pid
Q)what is lofs used for
A)Lofs list open files is used for to check a problem encounter with a file or process
Q)what is the use of truss command
A)Trace system call for every running file
30)Whats are the fields in vfstab
A)mount device-raw device for fsk-mountpoint-filesystem-fsckcheck-mount at boot
and it contain all the mounted filesystem
A) # metainit d0 2 1 c0t0d0s1 1 c0t1d0s1
Q)How to see the meta device information
A)# metastat
Q)How to format and mount a slice
A)newfs /dev/md/rdsk/d0
Mount /dev/md/dsk/d0 /nav
Q) how to create raid 0 stripping
A) #metainit d1 1 2 c0t0d0s1 c0t0d0s2
#metastat
#newfs /dev/md/rdsk/d1
#mount /dev/md/dsk/c1 /naveen
Q) How to differentiate concatenation and stripping
A)when used metastat command stripping will show an interlace value 32KB this shows it is striped
Q)how to clear metadevices
A)#metaclear d0
#metaclear d1
Q)How to create mirroring raid -1
#metainit d1 1 1 c0t0d0s1
Metainit d2 1 1 c0t0d0s2
Metainit d3 –m d1
Metattach d3 d2
Metastat
Q)how to create stripe with parity
#metainit d1 –raid5 c0t0d0s0 c0t0d0s0 c0t2d0s0
Metastat
Newfs /dev/md/rdsk/d1
Mount /dev/md/rdsk/d1 /naveen
Q)how to grow the size of the volume
#growfs –M /d1 c0t0d0s1-(new device)
Q)how to create raids using veritas volume manager concationation
A)#vxassit –g rootdg make vol01 20g
#newfs /dev/vx/rdsk/rootdg/vol01
#mount /dev/vx/dsk/rootdg/vol01 /naveen
Stripping
A)
vxassit –g rootdg make vol02 20g layout=stripe st_width=32
#newfs /dev/vx/rdsk/rootdg/vol02
#mount /dev/vx/dsk/rootdg/vol02 /naveen
mirroring
A)vxassit –g rootdg make vol03 20g layout=mirror
newfs /dev/vx/rdsk/rootdg/vol03
mount /dev/vx/dsk/rootdg/vol03 /naveen
stripping with parity.
A)vxassit –g rootdg make vol4 20g layout=raid5,nologs
newfs /dev/vx/rdsk/rootdg/vol4
mount /dev/vx/dsk/rootdg/vol4.
Q)How to print plexes,subdisk,volumes
Vxprint –pt – for plexes
Vxprint –st subdisk
Vxprint –vt volumes
Q)how to increase the size of the volume
Vxassit –r rootdg growby vol01 20g
/usr/lib/fs/fsck –F ufs –M /naveen /dev/vx/rdsk/rootdg/vol01 40980 (offset value by typing the vxprint –vt command)
Q)what is the top command used for
A)Its lists all the processes with the process id
Cpu utilization and idle cpu
Memory utilization and idle memory
Swap utilization and ideal swap
Application using maximum cpu utilization with pid
Q)what is lofs used for
A)Lofs list open files is used for to check a problem encounter with a file or process
Q)what is the use of truss command
A)Trace system call for every running file
30)Whats are the fields in vfstab
A)mount device-raw device for fsk-mountpoint-filesystem-fsckcheck-mount at boot
and it contain all the mounted filesystem
Wednesday, September 17, 2008
solaris interview questions and answers
How to create 2 database replicas
# metadb –a –f –c 2 c0t0d0s1
Unix interview questions and answers
# metadb –a –f –c 2 c0t0d0s1
Unix interview questions and answers
solaris interview questions and answers
How to change the default level of State Database replica from 8kb to 4kb
# metabd –a –f –l 4096 c0t0d0s1
Unix interview questions and answers
# metabd –a –f –l 4096 c0t0d0s1
Unix interview questions and answers
Tuesday, September 16, 2008
solaris interview questions and answers
solaris interview questions and answers
Q) How to see the state databases replica.
A) # metabd
Unix interview questions and answers
Q) How to see the state databases replica.
A) # metabd
Unix interview questions and answers
Monday, September 15, 2008
solaris interview questions and answers
solaris interview questions and answers
how to create state database replica
#metabd –a –f c0t0d0s1
Unix interview questions and answers
how to create state database replica
#metabd –a –f c0t0d0s1
Unix interview questions and answers
solaris interview questions and answers
Q) what are raid0,raid1 and raid5
A) Raid 0 is concatenation or stripping
Concatenation means writing data in disk one after another
Stripping means writing data of 32kbs interlease value in to disk
Raid 1 – mirroring that means writing data on two disk parallely or duplicatiung the data on two disk.
Raid 5 – stipping with parity the data of 2 disk is duplicated in the third disk with parity information
A) Raid 0 is concatenation or stripping
Concatenation means writing data in disk one after another
Stripping means writing data of 32kbs interlease value in to disk
Raid 1 – mirroring that means writing data on two disk parallely or duplicatiung the data on two disk.
Raid 5 – stipping with parity the data of 2 disk is duplicated in the third disk with parity information
Thursday, September 11, 2008
solaris interview questions and answers
solaris interview questions and answers
How to configure newly attached hardware like hardsik network card.
# devfsadm
Or drvconfig
Unix interview questions and answers
How to configure newly attached hardware like hardsik network card.
# devfsadm
Or drvconfig
Unix interview questions and answers
Monday, September 8, 2008
solaris interview questions and answers
solaris interview questions and answers
How to set environment variable in NVRAM
# nvalias /pci---/rarp – to set scsi for booting of client
# nvalias net dhcp – to boot from dhcp
# nvunalias net – remove the alias
unix interview questions and answers
How to set environment variable in NVRAM
# nvalias /pci---/rarp – to set scsi for booting of client
# nvalias net dhcp – to boot from dhcp
# nvunalias net – remove the alias
unix interview questions and answers
Friday, September 5, 2008
solaris interview questions and answers
solaris interview questions and answers
How to check the check the clock devices from OBP
Ok>netwatch-clock
unix interview questions and answers
How to check the check the clock devices from OBP
Ok>netwatch-clock
unix interview questions and answers
Friday, August 29, 2008
solaris interview questions and answers
solaris interview questions and answers
How do you check your loop back or network devices from Open boot prom
ok> test net
unix interview questions and answers
How do you check your loop back or network devices from Open boot prom
ok> test net
unix interview questions and answers
Tuesday, August 19, 2008
solaris interview questions and answers
solaris interview questions and answers
How to see the physical disk connected to the system from Open Boot Command OBP
ok>probe-scsi
Unix interview questions and answers
How to see the physical disk connected to the system from Open Boot Command OBP
ok>probe-scsi
Unix interview questions and answers
solaris interview questions and answers
solaris interview questions and answers
How to see all the informations of the hardware related from bootprom(OBP)
# banner
or
# prtconf
unix interview questions and answers
How to see all the informations of the hardware related from bootprom(OBP)
# banner
or
# prtconf
unix interview questions and answers
Monday, August 18, 2008
solaris interview questions and answers
solaris interview questions and answers
How do you set a deafaulr boot device from the boot prom
# setenv boot-device disk
Boot-device=disk
# reset - To make the changes.
Unix interview questions and answers
How do you set a deafaulr boot device from the boot prom
# setenv boot-device disk
Boot-device=disk
# reset - To make the changes.
Unix interview questions and answers
Wednesday, August 13, 2008
solaris interview questions and answers
solaris interview questions and answers
How to see the default boot device from the boot prom or OBP
ok> prtenv boot-device
Unix interview questions and answers
How to see the default boot device from the boot prom or OBP
ok> prtenv boot-device
Unix interview questions and answers
Tuesday, August 12, 2008
solaris interview questions and answers
solaris interview questions and answers
How to see which kernel version and artitecture used by the syste.
# isainfo -v :- To see kernal version and 32 bit or 64 bit system and artictect
Unix interview questions and answers
How to see which kernel version and artitecture used by the syste.
# isainfo -v :- To see kernal version and 32 bit or 64 bit system and artictect
Unix interview questions and answers
solaris interview questions and answers
solaris interview questions and answers
How to make processor 3 online when you have more then 4 processor and processor 3 is offline?
# psrinfo –v:- To see the status of all processors
# psrinfo –a 3 online :- To make processor 3 online
Unix interview questions and answers
How to make processor 3 online when you have more then 4 processor and processor 3 is offline?
# psrinfo –v:- To see the status of all processors
# psrinfo –a 3 online :- To make processor 3 online
Unix interview questions and answers
Monday, August 11, 2008
solaris interview questions and answers
solaris interview questions and answers
How to make processor 4 number offline when you have more then 4 processors.
# psrinfo –V :- To check the status and then
# psradm –f 4 offline - To make processor number 4 offline
Unix interview questions and answers
How to make processor 4 number offline when you have more then 4 processors.
# psrinfo –V :- To check the status and then
# psradm –f 4 offline - To make processor number 4 offline
Unix interview questions and answers
Friday, August 8, 2008
solaris interview questions and answers
solaris interview questions and answers
How to change processor operation status in solaris
# psradm –a –n :- To set all processor available on the system to online
# psradm –f 2 3 :- To make processor 2 and 3 offline, if you have multiple processors
Unix interview questions and answers
How to change processor operation status in solaris
# psradm –a –n :- To set all processor available on the system to online
# psradm –f 2 3 :- To make processor 2 and 3 offline, if you have multiple processors
Unix interview questions and answers
solaris interview questions and answers
1)How to do see the processor information in solaris 8/9/10
# psrinfo
# psrinfo –v :- To see which processors are online and offline.
If you have multipl processors.
Unix interview questions and answers.
# psrinfo
# psrinfo –v :- To see which processors are online and offline.
If you have multipl processors.
Unix interview questions and answers.
Subscribe to:
Posts (Atom)
Custom Search
Feeds from my other blog
Samsung S2 Brand new for 25900 White piece sealed box
For Sale, Mobile Phones - Accessories in India, Andhra Pradesh, Hyderabad. Date September 17