Friday, May 15, 2020

What is my LVM version in HPUX

vgdisplay will show you the version of  the LVM HPUX system is currently using in the line "VG Version"

# vgdisplay vg00
VG Version                  1.0       
VG Max Size                 33553920m  
VG Max Extents              524280 

# vgdisplay vg01
VG Version 2.0
VG Max Size 16t
VG Max Extents 2097152 

Version 1 and Version 2 having different VG Max Size and VG Max Extents


# strings /etc/lvmtab > it will show you all your VG and PV which are LVM version-1
# string /etc/lvmtab_p > It wil show you all your VG and PV which are LVM version-1


When creating a new volume group, vgcreate defaults to Version 1.0.

Create LVM v1 volume group
 vgcreate -s 8 -l 3 -p 16 -e 63535 /dev/vg01 /dev/dsk/c3t4d0

Create LVM v1 volume group
# vgcreate v2.0 -s 32 -S 1p /dev/vg01 /dev/disk/disk50 


Your can refer below pdf link for futher information on LVM-2
https://community.hpe.com/hpeb/attachments/hpeb/itrc-151/38516/1/365967.pdf

Saturday, July 14, 2018

Monday, June 18, 2018

Create a new instance in Racktabels

cp -r RackTables-0.20.14/wwwroot/* /var/www/html/oldracktables/

In browser type as below and follow the instructions
http://xyzracktables.xyz.com/oldracktables

In the browser you need to configure all basic things

You must create New_Database, User, and password. Also provide full privilege to the new user and root user to the new_database.

Racktables mysql Database management

https://www.ntu.edu.sg/home/ehchua/programming/sql/MySQL_Beginner.html
to connect mysql, it will prompt for password
mysql -u root -p

http://g2pc1.bu.edu/~qzpeng/manual/MySQL%20Commands.htm
show databases;
use db_name
show tables;
select * from table_name

to take backup of all databases:-
mysqldump -u root -p --all-databases > all_database.sql

to restore only one database from all databse backup
mysql -u root -p racktables < all_database.sql

to restore only one database from one databse backup
mysql -u root -p racktables < ./racktables.db-Tue-17-10-2017:03:00:01.sql

-------------------------------------------------------------------------
Path of data directory

mysql> show variables where Variable_Name LIKE "%dir"

----------------------------------------------
Create new database and provide priviledges:-
CREATE DATABASE old_racktables_db CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER oldrackuser@localhost ;
GRANT ALL PRIVILEGES ON old_racktables_db.* TO oldrackuser@localhost;
flush privileges;

View privileges on database:-
show grants for oldrackuser@localhost


import databse:-
mysql -u root -p old_racktables_db < ./racktables.db-Sun-10-12-2017\:22\:26\:34_new.sql

____________________________________________________________
MySQL Maintenance Task

Backup database
Check
Optimize
Analyze

$ mysqldump -u root -p --create-options --routines --triggers dbname > ./db.dmp
# note these cause LOCKS, so be careful on your production server!
$ mysqlcheck -u root -p --check --databases dbname
$ mysqlcheck -u root -p --optimize --databases dbname
$ mysqlcheck -u root -p --analyze --databases dbname

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In Case Importing Database to same system or another system but USER Name and DATABSE NAME are different than the original, then need to edit the SQL dump file useing vi editor and modify the old databse name and the User Name in the dump before import. Just search the old database name and modify with the new database name and same for the user name too.  Other wise you will receive below Error

Error similar to :- SQLSTATE[HY000]: General error: 1356 View 'racktables.RackObject' references
invalid table(s) or column(s) or function(s) or definer/invoker of view lack
rights to use them (HY000)

Ref:-
https://www.freelists.org/post/racktables-users/export-import-racktable-data-from-old-database-to-new-database,2

Hi.

If I remember correctly I had similar errors one time when I was exporting the
Racktables database and importing it to another database on the same server
with a different database username.

I had to edit the SQL dump files before I imported them to the new database.
The dump had references to the old database name and username.  Take a look at
lines with "DEFINER" and "ALTER" in the sql dump.

Hope this helps,
____________________________________________________________________

Sunday, May 6, 2012

New iPad Hotspot configuration


Please follow below steps to enable hotspot in New iPad
( Carrier is the Data/Sim service provider)

1. Check the carrier, it should 12.1 as below
     A) Setting>General>About>Carrier  .....  It should be "Carrier12.0"
     B) Click on "Carrier12.0", it should show "PRL 1"
2. Carrer should be 3G ..... Left hand side top corner will show that or contact with your carrier to enable it.
3. Now reset network setting as below
     A) Setting>General>Reset>Reset Network Settings.... Provide the password if you have (unlock password)
     B) It will reset, wait till come up.
4. Set the APN as below
     A) Settings>Cellular Data>APN Settings
     B) Type your carrier name in "APN" below "Cellular Data"
     C) Type again carrier name in "APN" below "Internet Tethering" on same screen.
     (I believe  even it should work if you will type anything, but both should same or may be different.)
5. Now you will see personal hotspot in below place
    A) Setting>General>Network>Personal Hotspot
6. Now switch on Hotspot and set wifi password
7. Enjoy

It work for me with Airtel (India) carrier . Do some RnD, you may omit few steps.

Thanks,
Umakanta
Usamantaray@gmail.com

Monday, April 6, 2009

Remote System service tag

1. Get DELL Service Tag on remote Windows system
Login to the Windows remote-host using VNC or remote desktop connection. Use WMIC on Windows to get service tag as shown below.

C:\>wmic bios get serialnumber
SerialNumber
ABCDEF1Following WMIC command will give make and model number along with service tag.

C:\>wmic csproduct get vendor,name,identifyingnumber
IdentifyingNumber Name Vendor
ABCDEF1 PowerEdge 2950 Dell Inc.If VNC or remote desktop connection to the remote-host is not available, execute the following from the local-host to get the service tag of the remote-host.

C:\>wmic /user:administrator /node:remote-host bios get serialnumber
SerialNumber
ABCDEF1
[Note: Replace remote-host with the machine name of your remote-host.]

2. Get DELL Service Tag on remote Linux system
Login to the Linux remote-host using SSH. Use dmidecode on Linux to get service tag as shown below

# /usr/sbin/dmidecode
# dmidecode -s system-serial-number

Wednesday, April 1, 2009

Incremental backup using tar

#!/bin/bash
# Umaknta Samantaray
# Date 20/02/2009
# This script will keep backup of home directory on sunday and incremental on other days. Delete the 14 days files daily.
# mount -t smbfs //172.16.66.116/unixbackup /mnt/samba/ -o rw,username=usamantaray/flagstonere,gid=users,dmask=777,fmask=777
# /home/usamantaray/MYSCRIPTS/mysqldbbackup.sh

fullbackup() {
cat /dev/null > ${BACKUPDIR}/incriment.snapshot
tar -g ${BACKUPDIR}/incriment.snapshot -zcf ${BACKUPDIR}/${NEWDIR}${1}.home.tz $SDIR/${1}
}
incrimbackup() {
tar -g ${BACKUPDIR}/incriment.snapshot -zcf ${BACKUPDIR}/${NEWDIR}${1}.home.incr.tz $SDIR/${1}
}

DATE=`date +%Y%m%d`
NEWDIR=`hostname -s`.$DATE.home
BACKDIR=/export/backup
SDIR=/export/home

USERNAME=(`ls -1 ${SDIR}`)
#USERNAME=(`cd ${SDIR} && find . -maxdepth 1 -type d \! -name . | cut -d / -f 2`)
cd ${BACKDIR} && find ${BACKUPDIR} -maxdepth 1 -name '2[0-9][0-9][0-9][0-9][0-9][0-9][0-9]'\
-type d -mtime +14 -exec rm -rf {} \;

for n in "${USERNAME[@]}"; do

if [ "`date +"%a"`" = "Sun" ] ; then
fullbackup $n
else
incrimbackup $n
fi
done

exit