Showing posts with label Mirroring. Show all posts
Showing posts with label Mirroring. Show all posts

Tuesday, May 5, 2009

LVM and User administration commands on aix

LVM commands

1. Adding LUN.

#extendvg vg name pv name

2. creating Volume Group.

#mkvg –y vg name physical volume

3. creating Logical volume.

#mklv –y lv name -t file system volume group number of LP physical volume


4. creating file system.

#crfs –v file system type -g volume group -a size= size in M -m mt point

5. increasing & Decreasing file system.

#chfs -a size= +4194304 MOUNT_POINT

#chfs -a size=-16M MOUNT POINT

6. file integrating checking.

#fsck file

7. mount /umount the file systems.

# mount /dev/fslv02 /test
# umount /test

8. File permission /ownership changes.

#chmod u=permission,g=permission,o=permission file
#chown –R owner:group file

9. Rootvg mirroring

#mirrorvg rootvg new and empty pv

OR

#mklvcopy lvname copy pv


User Administration Commands

1) Create the user

To create the user account with the default values in /usr/lib/security/mkuser.default

#mkuser username

To create the user account as an administrator

#mkuser –a username

2) Remove the user

To remove the user from the local system

#rmuser username

To remove the user with its attributes including user authentication information.,

#rmuser –p username

3) To reset a password

#passwd username

4) To unlock the user Id

#chuser “account_locked=false” userid

5) To set a non expiry password for the user

#chsec –f /etc/security/user –a maxage=0

6) To change the characteristics of the user

#chuser –a attribute=value

Mirroring rootvg in aix

Mirroring the root volume group should be done very carefully. Because If we don’t do it properly then the server will not boot properly. Do the following steps which will be useful for mirroring the root volume group.

Step 1:
For mirroring the rootvg, the vg should contain an empty hard disk i.e an empty physical volume. This can be done by the following command
#extendvg rootvg hdisk1

Step 2:
Then use the command: #mirrorvg rootvg hdisk1

Step 3:
If we don’t need to backup all the logical volume, then we can use the following command.
#mklvcopy hdisk1

Step 4:
When we use mklvcopy command, we need to issue the command #syncvg.

Step 5:
Initialize all the boot records by issuing the command #bosboot –a

Step 6:
Initialize the bootlist
#bootlist -m normal hdisk01 hdisk11