March 10, 2008

Veritas Volume Manager Command Line Examples

Volume Manager CLI examples :
display disk listings:
# vxdisk list

display volume manager object listings
# vxprint -ht

display free space in a disk group
# vxdg -g <diskgroup> free

list all volume manager tasks currently running on the system
# vxtask list

add a disk to Volume Manager (devicename = cXtXdX) (prompt driven)
# vxdiskadd <devicename>

designate/remove a disk as a hot-relocation spare
# vxedit set spare=on <diskname>
# vxedit set spare=off <diskname>

rename a disk
# vxedit rename <old_diskname> <new_diskname>

reserve/unreserve a disk (space won’t be allocated unless specifically mentioned in vxassist)
# vxedit set reserve=on <diskname>
# vxedit set reserve=off <diskname>

take a disk offline (first remove the disk from its disk group) (devicename=cXtXdXs2)
#vxdisk offline <devicename>

remove a disk
(first, stop any applications associated with the volume,
unmount the volume, stop the volume,
if you need the data on the disk, move the volumes to another disk or back up volume)

–removing the disk from its disk group:
# vxdg -g <diskgroup> rmdisk <diskname>

–remove the disk from volume manager control (devicename=cXtXdXs2)
# vxdisk rm <devicename>

display multipath information
# vxdisk list <diskname>

create a disk group
(see ‘add a disk to volume manager – if the group does not exist, you will be prompted)

upgrade a disk group
–list disk group version
# vxdg list <diskgroup>
–upgrade disk group to highest version currently running
# vxdg upgrade <diskgroup>

destroy a disk group
# vxdg destroy <diskgroup>

display disk group information
# vxdg list
# vxdg list <diskgroup>

move a disk group
(stop any applications associated with all volumes in the disk group,
unmount and stop all volumes in the disk group:

–deport (disable local access) the disk group to be moved on first system
# vxdg deport <diskgroup>

–import (enable local access) the disk group and its disks from the second system
# vxdg import <diskgroup>

–start all volumes in the disk group on the second system
# vxrecover -g <diskgroup> -sb

or # vxvol -g <diskgroup> startall

estimating maximum volume size (any_valid_type = raid5, stripe, mirror)
# vxassist -g <diskgroup> maxsize layout=<any_valid_type>

create a concatenated volume (length examples = 15g, 15m)
# vxassist -g <diskgroup> make <volumename> <length> <diskname> <diskname>

create a striped volume (length examples = 15g, 15m)
# vxassist -g <diskgroup> make <volumename> <length> layout=stripe <diskname> \
<diskname>

create a raid5 volume (without logging) (length examples = 15g, 15m)
# vxassist -g <diskgroup> make <volumename> <length> layout=raid5,nolog <diskname> \
<diskname> <diskname> <diskname>

create a raid5 volume (with logging) (length examples = 15g, 15m)
# vxassist -g <diskgroup> make <volumename> <length> layout=raid5,log <diskname> \
<diskname> <diskname> <diskname>

create a mirrored volume (without DRL) (length examples = 15g, 15m)
# vxassist -g <diskgroup> make <volumename> <length> layout=mirror,nolog <diskname> \
<diskname>

create a mirrored volume (with DRL) (length examples = 15g, 15m)
# vxassist -g <diskgroup> make <volumename> <length> layout=mirror,log <diskname> \
<diskname>

mirror an existing volume
# vxassist mirror <volumename> <diskname_of_disk_to_be_mirrored>

mirror all volumes within a disk group
# vxmirror -g <diskgroup> -a

mirror the root (boot) disk
EEPROM variable “use-nvramrc?” must be set to true
# vxrootmir -v <medianame>

remove a mirror (use ‘vxprint -g <diskgroup> -ht’ to get plexname)
# vxplex -o rm dis <plexname>

add a log to an existing volume
# vxassist addlog <volumename> <diskname>

remove a log from an existing volume
# vxassist remove log <volumename>

create a raid 0+1 volume (without DRL)
# vxassist -g <diskgroup> make <volumename> <length> layout=mirror-stripe,nolog \
nmirror=# nstripe=# <diskname> <diskname> <diskname>

create a raid 1+0 volume (without DRL)
# vxassist -g <diskgroup> make <volumename> <length> layout=stripe-mirror,nolog \
nmirror=# nstripe=# <diskname> <diskname> <diskname>

resize a volume
# vxassist -g <diskgroup> growto <volumename> <length>
# vxassist -g <diskgroup> growby <volumename> <length>
# vxassist -g <diskgroup> shrinkto <volumename> <length>
# vxassist -g <diskgroup> shrinkby <volumename> <length>

estimate how much a volume can grow
# vxassist -g <diskgroup> maxgrow <volumename>

remove a volume
(stop all applications associated with the volume,
unmount volume (remove /etc/vfstab entry))

–stop volume
# vxvol stop <volumename>

– remove volume (for raid 1+0, use ‘rf-rm’)
# vxedit -r rm <volumename>

or # vxassist remove volume <volumename>

change the volume read policy
# vxvol rdpol <policy> <volumename>
# vxvol rdpol prefer <volumename> <preferred_plex_name>

change volume attributes
# vxedit set <field>=<value> <volumename>

resize a filesystem (ufs cannot be shrunk, only grown)
# vxresize -g <diskgroup> <volumename> + <size>
# vxresize -g <diskgroup> <volumename> – <size>

join subdisks (must be in the order of offset on disks)
# vxsd join <subdisk> <subdisk> <subdisk>


March 6, 2008

Hari ini, tanggal 6 March 2008

Setelah 2 hari berturut-turut ngotak-atik….server SFV215 buat install OSnya lewat Jumpstart.

akhirnya terselesaikan (solved) juga, semua cuma gara – gara koneksi network kantor gw yang ga memenuhi

standarisasi ISO….sahhhh elahhhh “ISO SAPI KALEEE”.

Akhirnya gw pasang aja pake kabel crossing buat instalasi jumpstartnya….eh….ocreee deh…hehehe :D

Ternyata….Bagaikan pribahasa “Gajah di pelupuk tampak, semut di seberang tak nampak” maaf klo salah…

maklum pelajaran BhsIndonesianya agak jeblok.


March 5, 2008

Mirror Available On Solaris 10

————-SNIP————
#!/bin/sh
#Mirrorme.sh
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s – /dev/rdsk/c1t1d0s2
metadb -a -f -c2 /dev/dsk/c1t0d0s3 /dev/dsk/c1t1d0s3
metadb -a -f -c2 /dev/dsk/c1t0d0s4 /dev/dsk/c1t1d0s4 (UPDATED “Problems With Multiple MetaDB Partitions“)

# / Filesystem
metainit -f d10 1 1 c1t0d0s0
metainit d20 1 1 c1t1d0s0
metainit d30 -m d10
metaroot d30

# Swap Filesystem
metainit -f d11 1 1 c1t0d0s1
metainit d21 1 1 c1t1d0s1
metainit d31 -m d11

# /usr filesystem:
metainit -f d12 1 1 c1t0d0s5
metainit d22 1 1 c1t1d0s5
metainit d32 -m d12

# /var filesystem:
metainit -f d13 1 1 c1t0d0s6
metainit d23 1 1 c1t1d0s6
metainit d33 -m d13

# /opt filesystem:
metainit -f d14 1 1 c1t0d0s7
metainit d24 1 1 c1t1d0s7
metainit d34 -m d14
metainit hsp001

echo “Do a lockfs -fa, and then an init 6?
————-SNIP————
If you are unsure of what these commands are doing, please read the man pages on them. Change the drive and controller numbers based on your server, run this script, and reboot the system.
After the system has come back up, it’s time to attach the mirror partitions to the metadevices. This next script will take care of that for you.

————-SNIP————
#!/bin/sh
#Mirrormemore.sh
metattach d30 d20
metattach d31 d21
metattach d32 d22
metattach d33 d23
metattach d34 d24

echo “Don’t forget to make the new mirror bootable”echo ” # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0?echo “Making darn sure this is pointed towards the mirror drive!”
————-SNIP————


March 5, 2008

Jumpstart Available

Read the rest of this entry »