IBM AIX-System Administration

Monday 29 December 2014

AIX Interview Questions- AIX File Syatem Interview Questions

Can you reduce size of /usr file system?
Yes, you can in AIX 5L V5.3
Default file system is JFS2

How will you create file system in raw hard disk?
cfgmgr to identify the disk
extendvg- extend VG (add new disk to existing VG)
mklv - to create LV
crfs- to create file system

How do you create a file system on a given LV?
# crfs -v jfs -d /dev/lv_name -m/mount_point

What is Journaled File System (JFS)?
It maintains log in corresponding log device before communicating any changes to LV and thus maintains integrity of file system
whar are diffrences between JFS and JFS2 file system
                             JFS                                                                    JFS2
1) Inode allocation while creating file system is static    1) inode allocation is dynamic
2) Maximum file system size is 1 TB                              2) Maximum file system size is 4 PB
3) Inode size is 128 bytes                                                3) inode size is 512 bytes
4) log file system resides                                                4) inline logfile system
5) GUID= Yes                                                                5) GUID=No

What are the file resposible to tell about the file systems?
/ect/filesystems

How will you trouble shoot the file system problem?
I will go in maintenance mode and run fsck and logform file system command

What exprotfs -a command does?
It reads entries from /etc/exports and updates from /etc/xtab
What is inode?
It is index node and points to the other inode or datablock
it contains control information about the file such as type, size, owner and the date & time of the file created/modified/last accessed.

What is super block?
Frist block of any file system and contains meta data of its like no of inodes and free list of inodes..etc

How do you list file systems?
# lsfs

What are the stanazs in /etc/filesystems?
dev=
mount=
log=
vfs=
check=
type=

What is /porc file system?
Contains processor related information of all processes which are presently running.

What is NBPI?
Number of Bytes Per  bytes
Default nbpi value is 4096 bytes

How to increase the file system size in one particular PV?
# extendlv lvname lps pvname
# chfr -a size= no. lps filesystem name  (chfs - a size=+8192/test)
File system size can be reduce in AIX 5.3 but not in AIX 5.1

How do you recover corrupted filesystem?
run fsck and if need then logform it the logdevice is inconsistent

What is fsck -y and fsck -f?
fsck -f: performs the fast check it will bot check that filesystem were unmounted successfully
fsck -y: Assumed a yes respose to all question asked by the fsck command.

What are the 4 steps in fsck -y?
Check blocks and sizes
Check pathnames
Check connectivity
Check reference counts
Check inode map and block map
What is difference between the inode of file and directory?
While showing the 9 bit permissions it shows "d" in the first bit for directory
"-" for a file. This information collect from inode block

How will you increase fily system in AIX?
# chfs -a size=no.lps

How will you repair a file system?
using fsck and logform

What are the permissions in AIX?
read, write,execute ,SUID,SGID, Sticky bit

What is sticky bit?
sticky bit is special permission, if we have set sticky bit to a directory, other user can read & write files on that directory, but owner can delete the directory

How to check which file system is available on which PV?
First check on which LV filesystem exists,say lv00, now use command lslv -m lv00

What is the use of mkszfile?
Saves the system state for reinstallation on the current system or another system.  The  mkszfile command overwrites an existing /image.data file with new information.

How to unmount a filesystem and if it is not able to unmount what are the steps?
# umount <filesystem>
File systems - nbpi, etc., read the theory
nbpi – number of bytes per inode.
nbpi – number of bytes per inode.

 This feature of filesystem is used when fragmentation of files are set. If a filesystem contains small files , then it is advantageous to keep the fragment size small ,
 so that space is not wasted. Normally there is one inode created for every possible file in a filesystem. However in actual practice the number of inodes required are
 quite less. Therefore to save on space allocated for inodes ,
we specify the nbpi value.

What is SPOT?  Or  Explain SPOT? Is it part of NIM?

The SPOT contains the directory structure for an installed /usr file system. It also contains subdirectories for the "root" parts of installed filesets. Since the SPOT
contains both usr and root files, software maintenance must be performed on the SPOT in order to update the software that is running on the clients. Such actions
must be performed using the NIM cust and maint operations.
 Spot is used by the client during NIM install or boot.  The following operations are performed to manage the software for diskless and dataless clients:

1. The /usr files are installed in the SPOT. These files are automatically seen by all the clients that mount the SPOT as their    /usr file systems.
2. The root files are installed in special subdirectories in the SPOT.
3. After all the filesets have been installed in the SPOT, the root files are copied to the  directories of any diskless or  dataless clients that have been initialized with the  SPOT

How do I shrink /usr?

1) Remove any unneeded files from /usr.

2) Make sure all filesystems in the root volume group are mounted. If not, they will not be included in the
 re-installed system.

3) Type mkszfile. This will create /image.data that contains a list of  the active filesystems in the root volume group that will be included in the installation procedure.

4) Edit /image.data. Change the size of /usr to what you want.

IMPORTANT: Make sure that you DO NOT enter a value which is less than the size of the filesystem required to contain the current data.
Doing so will cause the re-installation procedure to fail.

  5) chdev -l rmt0 -a block=512 -T

 6) Unmount all filesystems that are NOT in the root volume group.

  7) Varyoff all user-defined volume groups, if any

         # varyoffvg VGname

          8) Export the user-defined volume groups, if any

         # exportvg VGname

  9) With a tape in the tape drive, type

        # mksysb /dev/rmt0

     This will do a complete system backup, which will include information (in the /image.data file) for the installation procedure on how large the filesystems are to be created.

  10) Install the backup .

  11) When the installation is complete, you may then import any user-defined volume groups.

          # importvg -y VGname PVname

     where "VGname" is the name of the volume group, and "PVname" is  the name of any one of the physical volumes in the volume group.

  12) Varyon your user-defined volume groups
          # varyonvg VGname

 The reduction of the filesystems is now complete.

What are the limits on a file, filesystem?
 File      jfs-Filesystem
3.2.5    2 GB        2 GB
4.1.x    2 GB        1 TB
4.2      6 4GB        1 TB
4.3      6 4 GB        1 TB
5.x      1 Tb           4 PT
What is difference between hardlink and softlink?
Hardlink: original file and link file having same inode no, if original file delete we can access link file
Softlink: original file and link file having different inode no, if original file delete we can't access link file

How do you create a file system in AIX?
# crfs -v jfs -d /dev/lv_name -m/mount_point

What is the command to create filesystem?
# crfs -v jfs/jfs2 -d lvname or -g vgname -m /mount point

What is mount? Which file read by mount command?
This is a mount point where we can mount filesystem, /etc/filesystem is the file to read.
What you will do while filesystem corrupted, if problem with log device?
Logfrom <name of the log device>

No comments:

Post a Comment

Disclaimer

Disclaimer : All trademarks or copy rights belongs to their original owners, I have collected the data from net and different books, All the information presented on this blog is provided on the basis of as is and is meant for reference purpose only without any expressed or implied warranty. Use of the information and its application in any form is sole discretion and responsibility of the user. adminaix.blogspot.com is not responsible for any damage or loss arising out of use of information presented here. This web site has links to external web sites and adminaix.blogspot.com is not responsible for the contents at those sites.

Comments

Contact Us

Name

Email *

Message *