Pages

Wednesday, 13 March 2013

Cannot reduce filesystem size

Cannot reduce filesystem size

Cannot reduce fs size

I have little issue reducing the fs on AIX .5.3. Here is what I get

root@dccccc-svc/etc>df -g /data/edw/init_stg

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/init_stg_lv01 793.00 425.25 47% 1081 1%

/data/edw/init_stg

root@dccccc-svc/etc>oslevel -s

5300-08-03-0831

root@dccccc-svc/etc>

root@dccccc-svc/etc>chfs -a size=-10G /data/edw/init_stg

chfs: There is not enough free space to shrink the file system.

System Model: IBM,9131-52A

Machine Serial Number: 0xxxxxxxxxx

Processor Type: PowerPC_POWER5

Processor Implementation Mode: POWER 5

Processor Version: PV_5_3

Number Of Processors: 4

Processor Clock Speed: 1648 MHz

CPU Type: 64-bit

Kernel Type: 64-bit

LPAR Info: 3 dccccc-normal

Memory Size: 32000 MB

Good Memory Size: 32000 MB

Platform Firmware level: SF240_332

Firmware Version: IBM,SF240_332




That happens when you try to reduce a big chunk of data (in this case

10G) that may not be contiguous in the filesystem because you have files

scattered everywhere.

1. Try to defrag the FS

#defragfs -s /data/edw/init_stg

2. If you still can't reduce it after this. Try reducing the FS in

smaller chunks.

Instead of 10G at a time, try reducing 1 or 2 gigs. Then, repeat the

operation.

3. Try looking for files large using the find cmd and move them out

temporarily, just to see if we can shrink the fs without them:

#find /<filesystem> -xdev -size +2048 -ls|sort -r +6|pg

4. Sometimes processes open big files and use lots of temporary space in

those filesystem.

You could check processes/applications running against the filesystem

and stop them temporarily, if you can.

#fuser -cu[x] <filsystem>

Please, let me know if this works.

------------------------------------------

Explanations to the behavior of shrinkfs:
In the beginning of the JFS2 filesystem, there is the superblock, the

superblock backup, and then the data and metadata of the filesystem. At

the end is the inline log (if there is one), and the fsck working area.


The way the filesystem shrink works is this: When chfs is run and a

size is given (either -NUM or an absolute NUM size) AIX calculates where

that exists within the filesystem. This marker is known as "the fence".

The system then calculates how much data is left outside the fence, that

must be moved inside it (since we don't want to lose data). It

calculates the free space available, and subtracts a minimal amount for

the fsck working area and inline log (if any) that must go at the tail

end of the filesystem.

What chfs has to do is some complex calculating: in the area outside the

fence, is there any data to be saved and moved inside? In the area

inside the fence, how much data is there? Is it contiguous? How much

free space is there we have to play with? Is there enough space to move

the data from outside the fence inside it to save it? And lastly, is

there enough space to move the fsck working area and inline logs inside

also along with these?

It does not try to reorganize the data in any way. If a large file

outside the fence is make up of contiguous extents, then AIX looks for

an equivalent contiguous free space area inside the fence to move the

file to. If it can't find one, either due to a lack of space or free

space fragmentation, it fails this operation and won't shrink the

filesystem. The chfs shrink will also not purposely fragment a file to

force it to fit within fragmented free space.

In some cases running defragfs on the filesystem to defragment the files

will help, but many times it doesn't. The reason is because the purpose

of defragfs is to coalesce files into more contiguous extents, but not

to coalesce the free space in between them.

If non-contiguous free space is the issue, the only way to get them to

coalesce into large enough regions is to back up the data, remove it,

and restore it. Then the filesystem shrink may find enough contiguous

free space when chfs is run to move the data outside the fence into.

There's a limit to how much chfs can shrink a filesystem. This is

because chfs has to take into account not only the data you are

moving around, but it tries to keep the contiguous blocks of data in

files still contiguous. So if you have a filesystem with a lot of

space that is broken up into small areas, but you are moving around

large files it may fail even though it looks like you have a lot of

space left to shrink.

The free space reported by the df command is not necessary the space

that can be truncated by a shrinkFS request due to filesystem

fragmentation. A fragmented filesystem may not be shrunk if it does

not have enough free space for an object to be moved out of the region

to be truncated, and shrinkFS does not perform filesystem

defragmentation. In this case, the chfs command should fail with the

returned message: chfs: There is not enough free space to shrink the

file system - return code 28 (ENOSPC).

One of the common areas we see that limits customers is the

inclusion of large, unfragmented files in a filesystem, such as binary

database files. If a filesystem consists of a few, but extremely large

files, depending on how these are laid out the chfs may fail to find

enough space to move the data from outside the fence into it if it were

to attempt to shrink the filesystem.

Saturday, 10 November 2012

VIO Short Note

VIO Short Note
PowerVM: It allows to increase the utilization of servers. Power VM includes Logical partitioning, Micro Partitioning, Systems Virtualization, VIO, hypervisor and so on.


Simultaneous Multi Threading : SMT is an IBM microprocessor technology that allows 2 separate H/W instruction streams to run concurrently on the same physical processor.


Virtual Ethernet : VLAN allows secure connection between logical partitions without the need for a physical IO adapter or cabling. The ability to securely share Ethernet bandwidth across multiple partitions increases H/W utilization.


Virtual SCSI: VSCSI provides secure communication between the partitions and VIO server.The combination of VSCSI and VIO capabilities allows you to share storage adapter bandwidth and to subdivide single large disks into smaller segments. The adapters and disks can shared across multiple partitions, increase utilization.


VIO server : Physical resources allows you to share the group of partitions.The VIO server can use both virtualized storage and network adapters, making use of VSCSI and virtual Ethernet.


Redundant VIO server: AIX or linux partitions can be a client of one or more VIO servers at the same time. A good strategy to improve availability for sets of client partitions is to connect them to 2 VIO servers. The reason for redundancy is ability to upgrade latest technologies without affecting production workloads.


Micro Partitioning: Sharing the processing capacity from one or more logical partitions. The benefit of Micro Partitioning is that it allows significantly increased overall utilization . n of processor resources. A micro partition must have 0.1 processing units. Maximum no.of partitions on any system P server is 254.


Uncapped Mode : The processing capacity can exceed the entitled capacity when resources are available in the shared processor pool and the micro partition is eligible to run.


Capped Mode : The processing capacity can never exceed the entitled capacity.


Virtual Processors :A virtual processor is a representation of a physical processor that is presented to the operating system running in a micro partition.


If a micro partition is having 1.60 processing units , and 2 virtual processors. Each virtual processor will have 0.80 processing units.


Dedicated processors : Dedicated processors are whole processors that are assigned to dedicated LPARs . The minimum processor allocation for an LPAR is one.


IVM(Integrated virtualization manager): IVM is a h/w management solution that performs a subset of the HMC features for a single server, avoiding the need of a dedicated HMC server.


Live partition Mobility: Allows you to move running AIX or Linux partitions from one physical Power6 server to another without disturb.


VIO


Version for VIO 1.5


For VIO command line interface is IOSCLI


The environment for VIO is oem_setup_env


The command for configuration through smit is cfgassist


Initial login to the VIO server is padmin


Help for vio commands ex: help errlog


Hardware requirements for creating VIO :
Power 5 or 6
HMC
At least one storage adapter
If you want to share Physical disk then one big Physical disk
Ethernet adapter
At least 512 MB memory


Latest version for vio is 2.1 fixpack 23


Copying the virtual IO server DVD media to a NIM server:


Mount /cdrom


Cd /cdrom


Cp /cdrom/bosinst.data /nim/resources


Execute the smitty installios command


Using smitty installios you can install the VIO S/w.


Topas –cecdisp flag shows the detailed disk statistics


Viostat –extdisk flag shows detailed disk statistics.


Wklmgr and wkldagent for handling workload manager. They can be used to record performance data and that can be viewed by wkldout.


Chtcpip command for changing tcpip parameters


Viosecure command for handling the secure settings


Mksp : to create a storage pool


Chsp: Adds or removes physical volumes from the storage pool


Lssp: lists information about storage pool


Mkbdsp: Attaches storage from storage pool to virtual SCSI adapter


Rmbdsp: removes storage from virtual scsi adapter and return it to storage pool


Default storage pool is rootvg


Creation of VIO server using HMC version 7 :


Select the managed system -> Configuration -> Create Logical Partition -> VIO server


Enter the partition name and ID.


Check the mover service box if the VIO server partition to be created will be supporting partition mobility.


Give a partition profile name ex:default


Processors : You can assign entire processors to your partition for dedicated use, or you can assign partial processors units from the shared processor pool. Select shared.


Specify the minimum, desired and maximum processing units.


Specify minimum, desired and maximum virtual processors. And select the uncapped weight is 191


The system will try to allocate the desired values


The partition will not start if the managed system cannot provide the minimum amount of processing units.


You cannot dynamically increase the amount of processing units to more than the maximum,


Assign the memory also min, desired and max.


The ratio between minimum and maximum amount of memory cannot be more than 1/64


IO selects the physical IO adapters for the partition. Required means the partition will not be able to start unless these are available in this partition. Desired means that the partition can start also without these adapters. A required adapter can not be moved in a dynamic LPAR operation.


VIO server partition requires a fiber channel adapter to attach SAN disks for the client partitions. It also requires an Ethernet adapter for shared Ethernet adapter bridging to external networks.


VIO requires minimum of 30GB of disk space.


Create Virtual Ethernet and SCSI adapters: increase the maximum no of virtual adapters to 100


The maximum no of adapters must not set more than 1024.


In actions -> select create -> Ethernet adapter give Adapter ID and VLAN id.


Select Access External Network Check Box to use this adapter as a gateway between internal and external network.


And also create SCSI adapter also.


VIO server S/W installation :
Place the CD/DVD in P5 Box
Activate the VIO server by clicking the activate. Select the default partition
Then check the Open terminal window or console section and click the advanced. And OK.
Under the boot mode drop down list select SMS.


After installation is complete login with padmin and press a(for s/w maintenance agreement terms)


License –accept for accepting the license.


Creating a shared Ethernet adapter
lsdev –virtual ( check the virtual Ethernet adapter)
lsdev –type adapter ( Check the physical Ethernet adapter)
you use the lsmap –all –net command to check the slot numbers of the virtual Ethernet adapter.
mkvdev –sea ent0 –vadapter ent2 –default ent2 –defaultid 1
lsmap –all –net
use the cfgassist or mktcpip command configure the tcp/ip or
mktcpip –hostname vio_server1 –inetaddr 9.3.5.196 –interface ent3 –netmask 255.255.244.0 –gateway 9.3.4.1


Defining virtual disks


Virtual disks can either be whole physical disks, logical volumes or files. The physical disks can be local or SAN disks.


Create the virtual disks
login to the padmin and run cfgdev command to rebuild the list of visible devices.
lsdev –virtual (make sure virtual scsi server adapters available ex:vhost0)
lsmap –all à to check the slot numbers and vhost adapter numbers.
mkvg –f –vg rootvg_clients hdisk2 à Creating rootvg_clients vg.
mklv –lv dbsrv_rvg rootvg_clients 10G


Creating virtual device mappings:
lsdev –vpd |grep vhost
mkvdev –vdev dbsrv_rvg -vadapter vhost2 –dev dbsrv_rvg
lsdev –virtual
lsmap –all


fget_config –Av command provided on the IBM DS4000 series for a listing of LUN names.


Virtual SCSI Optical devices:


A dvd or cd device can be virtualized and assigned to client partitions. Only one VIO client can access the device at a time.


Steps :
let the DVD drive assign to VIO server
Create a server SCSI adapter using the HMC.
Run the cfgdev command to get the new vhost adapter. Check using lsdev –virtual
Create the virtual device for the DVD drive.(mkvdev –vdev cd0 –vadapter vhost3 –dev vcd)
Create a client scsi adapter in each lpar using the HMC.
Run the cfgmgr


Moving the drive :
Find the vscsi adapter using lscfg |grep Cn(n is the slot number)
rmdev –Rl vscsin
run the cfgmgr in target LPAR


Through dsh command find which lpar is currently holding the drive.


Unconfiguring the dvd drive :
rmdev –dev vcd –ucfg
lsdev –slots
rmdev –dev pci5 –recursive –ucfg
cfgdev
lsdev –virtual


Mirroring the VIO rootvg:
chvg –factor 6 rootvg (rootvg can include upto 5 PVs with 6096 PPs)
extendvg –f rootvg hdisk2
lspv
mirrorios –f hdisk2
lsvg –lv rootvg
bootlist –mode –normal –ls


Creating Partitions :
Create new partition using HMC with AIX/linux
give partition ID and Partition name
Give proper memory settings(min/max/desired)
Skip the physical IO
give proper processing units (min/desired/max)
Create virtual ethernet adapter ( give adapter ID and VLAN id)
Create virtual SCSI adapter
In optional settings
· Enable connection monitoring
· Automatically start with managed system
· Enable redundant error path reporting
bootmodes select normal


Advanced Virtualization:


Providing continuous availability of VIO servers : use multiple VIO servers for providing highly available virtual scsi and shared Ethernet services.


IVM supports a single VIO server.


Virtual scsi redundancy can be achieved by using MPIO and LVM mirroring at client partition and VIO server level.


Continuous availability for VIO
Shared Ethernet adapter failover
Network interface backup in the client
MPIO in the client with SAN
LVM Mirroring


Virtual Scsi Redundancy:


Virtual scsi redundancy can be achieved using MPIO and LVM mirroring.


Client is using MPIO to access a SAN disk, and LVM mirroring to access 2 scsi disks.


MPIO: MPIO for highly available virtual scsi configuration. The disks on the storage are assigned to both virtual IO servers. The MPIO for virtual scsi devices only supports failover mode.


Configuring MPIO:
Create 2 virtual IO server partitions
Install both VIO servers
Change fc_err_recov( to fast_fail and dyntrk(AIX tolerate cabling changes) to yes. ( chdev –dev fscsi0 –attr fc_err_recov=fast_fail dyntrk=yes –perm
Reboot the VIO servers
Create the client partitions. Add virtual Ethernet adapters
Use the fget_config(fget_config –vA) command to get the LUN to hdisk mappings.
Use the lsdev –dev hdisk –vpd command to retrieve the information.
The reserve_policy for each disk must be set to no_reserve.(chdev –dev hdisk2 –attr reserve_policy=no_reserve)
Map the hdisks to vhost adapters.( mkvdev –vdev hdisk2 –vadapter vhost0 –dev app_server)
Install the client partitions.
Configure the client partitions
Testing MPIO


Configure the client partitions:
Check the MPIO configuration (lspv, lsdev –Cc disk)
Run lspath
Enable the health check mode (chdev –l hdisk0 –a hcheck_interval=50 –P
Enable the vscsi client adapter path timeout ( chdev –l vscsi0 –a vscsi_path_to=30 –P)
Changing the priority of a path( chpath –l hdisk0 –p vscsi0 –a priority=2)


Testing MPIO:
Lspath
Shutdown VIO2
Lspath
Start the vio2
Lspath


LVM Mirroring: This is for setting up highly available virtual scsi configuration. The client partitions are configured with 2 virtual scsi adapters. Each of these virtual scsi adapters is connected to a different VIO server and provides one disk to the client partition.


Configuring LVM Mirroring:
Create 2 virtual IO partitions, select one Ethernet adapter and one storage adapter
Install both VIO servers
Configure the virtual scsi adapters on both servers
Create client partitions. Each client partition needs to be configured with 2 virtual scsi adapters.
Add one or two virtual Ethernet adapters
Create the volume group and logical volumes on VIO1 and VIO2
A logical volume from the rootvg_clients VG should be mapped to each of the 4 vhost devices.( mkvdev –vdev nimsrv_rvg –vadapter vhost0 –dev vnimsrv_rvg)
Lsmap –all
When you bring up the client partitions you should have hdisk0 and hdisk1. Mirror the rootvg.
Lspv
Lsdev –Cc disk
Extendvg rootvg hdisk1
Mirrorvg –m rootvg hdisk1
Test LVM mirroring


Testing LVM mirroring:
Lsvg –l rootvg
Shutdown VIO2
Lspv hdisk1 (check the pvstate, stale partitions)
Reactivate VIO and varyonvg rootvg
Lspv hdisk1
Lsvg –l rootvg


Shared Ethernet adapter: It can be used to connect a physical network to a virtual Ethernet network. Several client partitions to share one physical adapter.


Shared Ethernet Redundancy: This is for temporary failure of communication with external networks. Approaches to achieve continuous availability:
Shared Ethernet adapter failover
Network interface backup


Shared Ethernet adapter failover: It offers Ethernet redundancy. In a SEA failover configuration 2 VIO servers have the bridging functionality of the SEA. They use a control channel to determine which of them is supplying the Ethernet service to the client. The client partition gets one virtual Ethernet adapter bridged by 2 VIO servers.


Requirements for configuring SEA failover:
One SEA on one VIOs acts as the primary adapter and the second SEA on the second VIOs acts as a backup adapter.
Each SEA must have at least one virtual Ethernet adapter with the “access external network flag(trunk flag) checked. This enables the SEA to provide bridging functionality between the 2 VIO servers.
This adapter on both the SEA’s has the same pvid
Priority value defines which of the 2 SEA’s will be the primary and which is the secondary. An adapter with priority 1 will have the highest priority.


Procedure for configuring SEA failover:
Configure a virtual Ethernet adapter via DLPAR. (ent2)
Select the VIOàClick task buttonàchoose DLPARàvirtual adapters
Click actionsàCreateàEthernet adapter
Enter Slot number for the virtual Ethernet adapter into adapter ID
Enter the Port virtual Lan ID(PVID). The PVID allows the virtual Ethernet adapter to communicate with other virtual Ethernet adapters that have the same PVID.
Select IEEE 802.1
Check the box “access external network”
Give the virtual adapter a low trunk priority
Click OK.
Create another virtual adapter to be used as a control channel on VIOS1.( give another VLAN ID, do not check the box “access external network” (ent3)
Create SEA on VIO1 with failover attribute. ( mkvdev –sea ent0 –vadapter ent2 –default ent2 –defaultid 1 –attr ha_mode=auto ctl_chan=ent3. Ex: ent4
Create VLAN Ethernet adapter on the SEA to communicate to the external VLAN tagged network ( mkvdev –vlan ent4 –tagid 222) Ex:ent5
Assign an IP address to SEA VLAN adapter on VIOS1. using mktcpip
Same steps to VIO2 also. ( give the higher trunk priority:2)


Client LPAR Procedure:
Create client LPAR same as above.


Network interface backup : NIB can be used to provide redundant access to external networks when 2 VIO servers used.


Configuring NIB:
Create 2 VIO server partitions
Install both VIO servers
Configure each VIO server with one virtual Ethernet adapter. Each VIO server needs to be a different VLAN.
Define SEA with the correct VLAN ID
Add virtual Scsi adapters
Create client partitions
Define the ether channel using smitty etherchannel


Configuring multiple shared processor pools:


ConfigurationàShared processor pool management àSelect the pool nameà


VIOs Security:


Enable basic firewall settings: viosecure –firewall on


view all open ports on firewall configuration: viosecure –firewall view


To view current security settings: viosecure –view nonint


Change system security settings to default: viosecure –level default


List all failed logins : lsfailedlogin


Dump the global command log: lsgcl


Backup:


Create a mksysb file of the system on a nfs mount: backupios –file /mnt/vios.mksysb –mksysb


Create a backup of all structures of VGs and/or storage pools: savevgstruct vdiskvg ( data will be stored to /home/ios/vgbackups)


List all backups made with savevgstruct: restorevgstruct –ls


Backup the system to a NFS mounted file system: backupios –file /mnt


Performance Monitoring:


Retrieve statistics for ent0: entstat –all ent0


Reset the statistics for ent0: entstat –reset ent0


View disk statistics: viostat 2


Show summary for the system in stats: viostat –sys 2


Show disk stats by adapter: viostat –adapter 2


Turn on disk performance counters: chdev –dev sys0 –attr iostat=true


Topas –cecdisp


Link aggregation on the VIO server:


Link aggregation means you can give one IP address to two network cards and connect to two different switches for redundancy purpose. One network card will be active on one time.


Devices à communication à Etherchannel/IEEE 802.3 ad Link Aggregation à Add an etherchannel / Link aggregation


Select ent0 and mode 8023ad


Select backup adapter as redundancy ex: ent1


Automatically virtual adapter will be created named ent2.


Then put IP address : smitty tcpip à Minimum configuration and startup à select ent2 à Put IP address

Tuesday, 16 October 2012

how to install relocatable packages on AIX


how to install relocatable packages on AIX

1. create Volumegroup, filesystem and directory

2. create relocation path (the path that should be used instead of the ./) This can be any valid path that
is not "/" and has a size no greater than 512 characters
mkusil -R <desired_path>

3. check if location is properly created
lsusil -R ALL

4. copy packages to be installed into any folder on the box and perform inutoc_r

5. install required packages using installp_r -R
installp_r -R <desired_path> -ad <package_location> <rte package name>

6. check if installation had been successful
lslpp_r -R ALL -Lc




availabel commands:

mkusil -R creates a relocation path - Usage: mkusil -R <RelocatePath> -c <Comments> [XFa]
-a = Attach an existing installation as a USIL instance
-c = Comments to include in the USIL definition (visible with lsusil)
-R = Path to new USIL location. Must be valid directory.
-X = Automatically expand of space needed


lsusil -R lists available relocation paths - Usage: lsusil [-R <RelocatePath> | "ALL"]
-R = Path to existing USIL location.


rmusil -R removes relocation path - Usage: rmusil -R <RelocatePath>
-R = Path to existing USIL location.

chusil -R changes an attribute of an existing USIL instance - Usage: chusil -R <RelocatePath> -c <NewComments> [X]
-c = New comments to include in the USIL definition (visible with lsusil)
-R = Path to existing USIL location.
-X = Automatically expand of space needed

inutoc_r creates .toc file
inulag_r manages license agreements
instfix_r installs filesets associated with keywords or fixes
installp_r installs files into relocation path
lppchk_r verifies files of an installable software product
lslpp_r lists files

AIX Error logging


 AIX Error logging

To display a complete summary report, enter:
errpt

To display a complete detailed report, enter:
errpt -a

To display a detailed report of all errors logged for the error identifier E19E094F, enter:
errpt -a -j E19E094F

To list error-record templates for which logging is turned off for any error-log entries, enter:
errpt -t -F log=0

To view all entries from the alternate error-log file /var/adm/ras/errlog.alternate, enter:
errpt -i /var/adm/ras/errlog.alternate

To view all hardware entries from the error-log file enter:
errpt -d H

To view all software entries from the error-log file enter:
errpt -d S

To display a detailed report of all errors logged for the error label ERRLOG_ON, enter:
errpt -a -J ERRLOG_ON

To display a detailed report of all errors and group duplicate errors, enter:
errpt -aD

To display the error-record template repository, enter:
errpt -t

To disable the reporting of the ERRLOG_OFF event (error ID 192AC071), type the following:
errupdate <Enter>
=192AC071: <Enter>
Report=False <Enter>
<Ctrl-D>
<Ctrl-D>

To enable the reporting of the ERRLOG_OFF event (error ID 192AC071) in case it was turned off, type the following:
errupdate <Enter>
=192AC071: <Enter>
Report=True <Enter>
<Ctrl-D>
<Ctrl-D>

To delete the ERRLOG_OFF event (error ID 192AC071) from the Error Record Template Repository, type the following:
errupdate <Enter>
-192AC071:
<Ctrl-D>
<Ctrl-D>

To disable the logging of the ERRLOG_OFF event (error ID 192AC071), type the following:
errupdate <Enter>
=192AC071: <Enter>
Log=False <Enter>
<Ctrl-D>
<Ctrl-D>

To delete all entries from the error log, enter:
errclear 0

To delete all entries from the error log older than 3 days, enter:
errclear 3

To create an operator message for system drive reconfiguration, enter:
errlogger system drive reconfigured

To delete all entries in the error log classified as software errors, enter:
errclear -d S 0

To clear all entries from the alternate error-log file /var/adm/ras/errlog.alternate, enter:
errclear -i /var/adm/ras/errlog.alternate 0

Removing ODM information of a logical volume


Removing ODM information of a logical volume

Sometimes situations occur where a logical volume is deleted, but the ODM is not up to date. E.g. when lsvg doesn't show you the logical volume, but the lslv command can still show information about the logical volume.

To resolve this issue, first try: synclvodm -v [volume group name].

If this doesn't work, try this: (in the example below logical volume hd7 is used)

Save the ODM information of the logical volume:
odmget -q name=hd7 CuDv | tee -a /tmp/CuDv.hd7.out
odmget -q name=hd7 CuAt | tee -a /tmp/CuAt.hd7.out
(If you mess things up, you can allways use odmadd /tmp/[filename] to restore the ODM information).

Delete the ODM information of the logical volume:
odmdelete -o CuDv -q name=hd7
odmdelete -o CuAt -q name=hd7

Then, remove the device entry of the logical volume in /dev directory (if present at all)

change hostname on AIX


How to change hostname on AIX, “Cleanly”

Changing the hostname at a Windows Server will require a reboot. However, changing a hostname on a Unix/Linux server do not require a reboot! But, it is not so straightforward to change the hostname of a server online. This is because you will need to change a couple of things, like the entry in ODM, nodename and current hostname.

oldhostname:/:>chdev -l inet0 -a hostname=newhostname

inet0 changed

oldhostname:/:>uname -S newhostname => Change the network name of this machine.

oldhostname:/:>hostname newhostname => Sets the name of the current host system.

newhostname

oldhostname:/:>su -

newhostname:/:>exit



Backing up HMC Data


Backing up HMC Data

Backing up critical HMC data - Using the Command Line Interface

Use the command :

bkconsdata -r dvd



Backing up partition profile data - Using the Command Line Interface

Use the command:-

bkprofdata -m <MTMS> -f dvd

where <MTMS> is the machine type and serial number of the managed system.



Backing up critical HMC data - Using the GUI (WebSM) Interface

Describes how to back up important console information to DVD, a remote system mounted to the HMC file system (such as NFS), or a remote site through FTP.

Using the HMC, you can back up all important data, such as the following:

· User-preference files
· User information
· HMC platform-configuration files
· HMC log files
· HMC updates via Install Corrective Service

Note: The archived data should be used only in conjunction with a reinstallation of the HMC from the product CDs. For information about how to reinstall the HMC, see Reinstalling the HMC machine code.
The Backup function saves the HMC data stored on the HMC hard disk to DVD, a remote system mounted to the HMC file system (such as NFS), or a remote site through FTP. Back up the HMC after you have made changes to the HMC or to the information associated with logical partitions.

Note: The DVD must be formatted in the DVD-RAM format before data can be saved to the DVD.
To back up the HMC, you must be a member of one of the following roles:

· super administrator
· operator
· service representative

To back up the HMC, do the following:

1) In the Navigation area, click the Licensed Internal Code Maintenance icon.
2) In the Contents area, click the HMC Code Update icon.
3) Select Back up Critical Console Data.
4) Select an archive option. You can back up to DVD on the HMC, back up to a remote system mounted to the HMC file system (such as NFS), or a remote site through FTP.
5) Follow the instructions on the panel to back up the data.




Backing up partition profile data - Using the GUI (WebSM) Interface
Describes how to back up profile data on the HMC.

To back up partition profile data, you must be a member of one of the following roles:

· super administrator
· service representative

To back up partition profile data, do the following:

1) In the Contents area, select the managed system.
2) From the menu, click Selected > Profile Data > Backup.
3) Type the name you want to use for this backup file.
4) Click OK.



Checking the date & time that the last critical console data backup was performed
To display the date and time of the critical console data backup, use the lssvcevents command with the -t console option as shown below. Display the date and time when critical console data backup was performed :-


$ lssvcevents -t console -d 9999|grep 'backup of critical'

05/23/03 05:25:39 PM HSCE2062 A backup of critical console data was performed.
05/21/03 09:44:17 AM HSCE2062 A backup of critical console data was performed.
05/20/03 03:22:32 PM HSCE2062 A backup of critical console data was performed.
05/15/03 11:01:23 PM HSCE2062 A backup of critical console data was performed.
05/15/03 05:48:52 AM HSCE2062 A backup of critical console data was performed.



Checking the date & time that the last profile data backup was perfrormed
To display the date and time that the profile data backup was performed, use the lssvcevents command withthe -t console option as shown below. Display the date and time when profile data backup was performed :-


$ lssvcevents -t console -d 9999|grep 'Profile data'

05/20/03 02:44:32 PM HSCE2004 UserName hscroot Profile data of managed system ITSO_p690 has
been backup to file /var/hsc/profiles/7040-681*021768A/Theeraphong;
05/20/03 01:44:55 PM HSCE2004 UserName hscroot Profile data of managed system ITSO_p690 has
been backup to file /var/hsc/profiles/7040-681*021768A/Theeraphong;
05/20/03 12:05:41 PM HSCE2004 UserName hscroot Profile data of managed system ITSO_p690 has
been backup to file /var/hsc/profiles/7040-681*021768A/KoaTest;
Twitter Bird Gadget