Veritas: Mirroring The Root Disk

Create the mirrors
1. Give veritas control of a disk to create the mirror on
/usr/lib/vxvm/bin/vxdisksetup -i solaris-disk-name

2. Add the new disk to the rootdg disk group and give it a veritas name
vxdg -g rootdg adddisk rootmirror=solaris-disk-name
3. Mirror the root partition
/etc/vx/bin/vxrootmir rootmirror

4. Mirror the swap space
vxassist -g rootdg mirror swapvol rootmirror
5. Mirror the var volume
vxassist -g rootdg mirror var rootmirror
6. Mirror the opt volume
vxassist -g rootdg mirror opt rootmirror
Ensure that each volume on the rootdisk is tied to a hard partition
1. Identify which hard partition on the disk you wish to tie volume to by checking out /etc/vfstab. See what lines volume manager commented out.

2. Identify which subdisk each volume is on that you want to tie back to the hard partition

3. Run the command to link the subdisk to a hard partition
a. for swap
vxmksdpart –g rootdg subdisk hard-partition 0x03 0x01
b. for var
vxmksdpart –g rootdg subdisk hard-partition 0x07 0x00
c. for opt
vxmksdpart –g rootdg subdisk hard-partition 0x00 0x00
d. for /
vxmksdpart –g rootdg subdisk hard-partition 0x02 0x00

Veritas: Remove A Disk Group

1. remove any volumes from the disks
a. vxassist –g disk-group remove volume volume-name
b. repeat the above procedure for each volume on the disk

2. remove disks from the disk group
a. vxdg –g disk-group rmdisk vxvm-disk-name
b. repeat the above procedure until there is one disk remaining in the disk group; you cannot remove the last disk from a disk group. At this point you will just need to remove the disk group itself.

3. remove the disk group
a. vxdg destroy disk-group

Veritas: Commands To Defrag The File System

1. Some options worth noting
a. –D : report on directory fragmentation
b. –E : report on extent reorganization
c. –d : defragment the directory structure
d. –e : reorganize extent structure
e. –s : report with a summary of work completed
f. –v : report on reorganization activity

2. Example commands
/usr/lib/fs/vxfs/fsadm –F vxfs –D –E –s –v –d –e mount-point
/usr/lib/fs/vxfs/fsadm –F vxfs –s –d –e mount-point

Veritas: Volume Relayout

1. It is possible to relayout volumes/filesystems on the fly with veritas
a.example:
# vxassist –g disk-group-name relayout volume-name
layout=layout-type ncol=number-of-columns alloc=”disks
to use” stripeunit=stripe-width

b. where alloc defines the disks to build the new layout on, ncol is the number columns to use, stripeunit is the size of the stripes (stripeunit is optional, default is 128), and where layout is the layout you are going to migrate to.
2. to check the relayout status vxrelayout status volume-name
3. to restart a hung or failed relayout vxrelayout start volume-name
4. to reverse a relayout vxrelayout reverse volume-name
5. after a relayout completes if you need to evacuate a disk to complete a new stripe set, or want to migrate data from one disk to a new disk vxevac –g disk-group-name current-disk new-disk
a. example:
vxevac –g testdg testdg01 testdg02
(this would move all data on testdg01 to testdg02)

How to mount and unmount a drive in linux

How To Mount A Drive In Linux

mount /dev/partitionId /some/mounting/point
eg. #mount /dev/sda2 /mnt

The mounting point path must already be created with proper permissions. So a more likely flow of commands would be

mkdir /some/mounting/point
chmod 777 /some/mounting/point
mount /dev/partitionId /some/mounting/point

How To Unmount A Drive In Linux

umount /dev/partitionId
eg. #umount /mnt

This command is very easy to type wrong. It is NOT unmount. Take another closer look if thats what you saw at first. It is umount — no n here!