Friday, August 20, 2010

Command to delete file by inode number

To find the inode number:

$ ls -il

Output:
781956 drwx------  3 viv viv 4096 2006-01-27 15:05 gconfd-viv
781964 drwx------ 2 viv viv 4096 2006-01-27 15:05 keyring-pKracm
782049 srwxr-xr-x 1 viv viv 0 2006-01-27 15:05 mapping-viv
781939 drwx------ 2 viv viv 4096 2006-01-27 15:31 orbit-viv
781922 drwx------ 2 viv viv 4096 2006-01-27 15:05 ssh-cnaOtj4013
Command to delete file by inode number:

$ find . -inum 781922 -exec rm -i {} \;

Sunday, August 15, 2010

Solaris Run Level

Default Solaris Run Level

  • init S : Single user state (useful for recovery)
  • init 0 : Access Sun Firmware ( ok> prompt)
  • init 1 : System administrator mode
  • init 2 : Multi-user w/o NFS
  • init 3 : Multi-user with NFS
  • init 4 : Unused
  • init 5 : Completely shutdown the host (like performing a power-off @ OBP) [ thanks to Marco ]
  • init 6 : Reboot but depend upon initdefault entry in /etc/inittab

To find out current runlevel use who command:

$ who -r

Wednesday, August 4, 2010

To add a new disk and migrate the new disk and remove old

There are many ways to do. I have preferred this way.
  • cfgmgr
  • extendvg vgname newdisk
  • mirrorvg vgname newdisk
  • unmirrorvg vgname olddisk
  • reducevg vgname olddisk
  • rmdev –Rdl olddisk
Other way
  • cfgmgr
  • extendvg vgname newdisk
  • migratepv olddisk newdisk
  • rmdev –Rdl olddisk

Monday, August 2, 2010

JFS2 MAJOR MINOR DEVICE NUMBER

errpt command show the error message complaining about filesystem is full (df command shows some 10 filesystems is being 100% used). . The detailed report gives the major/minor device number: 000A 000F.

The characters: 000A 000F on the message are hexadecimal numbers. convert them to decimal numbers( 10 and 15) respectively. So, go to directory /dev and issue the command:

For instance,

#cd /dev
#ls -al | grep 10, 15

crw-rw---- 1 root system 10, 15 Apr 22 08:27 rtemplv
brw-rw---- 1 root system 10, 15 Apr 22 08:27 templv


Look on the 5th and 6th columns for an entry such as: 10, 15 and that will be the device with the issue

From this we can come to know which filesystem is full.


Questions and suggestions are welcome. Thanks