Extend filesystem in Linux

Verify free space in volume group.

# vgdisplay appvg

Extend the filesystem with 50Gb of space

# lvextend -L +50G /dev/mapper/appvg-backup

Resize the filesystem to expand the actual size online and verify.

# resize2fs /dev/mapper/appvg-backup
# df -kh /dev/mapper/appvg-backup

Extend filesystem in AIX

Check the size and the logical volume name of the file system

# df -g /usr/WebSphere

Check the which volume group the logical volume belongs

# lslv lv_name

Check the volume group for free space

# lsvg vg_name | grep FREE

Extend the filesystem with 5Gb e.g. /usr/WebSphere

# chfs -a size=+5G /usr/WebSphere

Verify

# df -g /usr/WebSphere

Mkitab

To add a new record to the /etc/inittab file, telling the init command to handle a login on tty2, enter:

# mkitab “tty002:2:respawn:/usr/sbin/getty /dev/tty2”

To add a new record to the /etc/inittab file, telling the init command to execute the /etc/rc.tcpip file after the /usr/sbin/srcmstr file is started, enter:

# mkitab -i srcmstr “rctcpip:2:wait:/etc/rc.tcpip > /dev/console”

To add a new record to the /etc/inittab file, telling the init command to execute the /etc/rc file and send its output to the boot log, enter:

# mkitab ((rc:2:wait:/etc/rc 2>&1 | alog -tboot > /dev/console))

Create filesystem in Solaris (Veritas)

Creating RAW FS

# vxassist -g appdg make sybtempfs 2g user=sybase group=sybaseg
# newfs /dev/vx/rdsk/appdg/sybtempfs

Mounted FS

# vxassist -g appdg make sybtempfs 2g user=sybase15 group=sybase
# vxprint -ht | grep sybtempfs
v  sybtempfs    –            ENABLED  ACTIVE   4194304  SELECT    –        fsgen
pl sybtempfs-01 sybtempfs    ENABLED  ACTIVE   4194304  CONCAT    –        RW
sd paili01_11-02 sybtempfs-01 paili01_11 37748544 4194304 0       c2t50060E8003AAC711d9 ENA
# mkfs -F vxfs -o largefiles /dev/vx/rdsk/appdg/sybtempfs

create the mount point and mount the file system
# mkdir <mount point>
# mount -F vxfs /dev/vx/dsk/appdg/sybtempfs /apps/sybtemp

chown before and after mounting

change vfstab
/dev/vx/dsk/appdg/sybtempfs /dev/vx/rdsk/appdg/sybtempfs /apps/sybtemp vxfs 3 yes –

Tar

To copy all of the files and subdirectories in the current working directory to the directory /target, use:

tar cf - * | ( cd /target; tar xfp -)

 
 

Create tar archive of file or folder

Tar -cvf /tmp/filename.tar /path/file

Include symbolic links

Tar -h -cvf /tmp/filename.tar /path/file