RAID 0 - Concatenation and striping.
This is the process whereby a number of disks are presented to the OS as a single disk
entity. RAID 0 provides no redundancy for the data, however, in the striping format
will produce a performance enhancement as the data can be written to multiple
spindles concurrently.

RAID 0 - Concatenation

RAID 0 - Concatenation
RAID 1 - Mirroring
This is the process whereby a single volume contains multiple copies of the data on
separate physical devices. RAID 1 provides redundancy, however there is no
performance improvement.
Raid1 - Mirroring
RAID 5 - Striping with Parity
In this level, a parity check sum is calculated from the data and this is then distributedacross the disks. This provides redundancy because any data lost when a disk diescan be reconstructed from the remaining data and the parity information. RAID 5 willgive a performance benefit for the read cycle but it is very slow on the write cycle dueto the requirement to calculate the parity. Usually 70% of disk is used for Actual data & 30% of disk is used for parity.
Raid5 - Striping with Parity
Other than this there are some some other type of Raid groups like (Raid 0+1 and Raid 1+0). This Documents is basically for for learners, so we will not go much into theory and start with basic BAU which are usually performed in company enviroment.
Some Basic Commands
1> Command to check Disk status in VXVM
# vxdisk list
2> Command to check diskgroup
# vxdisk –o alldgs list
If the diskgroup in the output of this is in () for eg ( newdg ), then the diskgroup in newdg is deported.
3> Command to Check Max size of the disk group
# vxassist –g DG_NAME maxsize
4> Command to check the size free in the Diskgroup
# vxdg free
5> Command to check upto what size a volume can be grown of a disk group
# vxassist –g DG_NAME maxgrow VOL_NAME
6> Command to check status of the volume.
# vxinfo –g DG_NAME
7> Command to check status of the task going in VXVM background
# vxtask list
8> Command to trace all i/o on the volume
# vxtrace -g DG_NAME VOL_NAME
9> Command to check Disk Statistics
# vxstat –g DG_NAME –d
10> Command to check if dynamic Multipathing for disk exist or not.
# vxdisk path egrep VX_DISNAME
Being a System admin one has to know, how to create the volume and need to decide which type of volume is required. for example if data is very important so we can use mirroring. but if io r/w is also important then we can use raid5. creation completely depends upon the business requirement. below are the for creating any volume and how to recover if any problem occurs..
How to create Striped Volume in veritas Volume manager
1> For creating Stripedvolume in Veritas Volume manager we will require minimum Two Disks. 2> First Step is to initialize both Disl into VXVM using below Command.
# cd /etc/vx/bin
#./vxdisksetup –i sde format=sliced
#./vxdisksetup –i sdf format=sliced
3> After initilizing the disk in error status will become online.
4> Now initialize the first to create a Disk Group using below command
# vxdg init newdg newdg01 =sde cds=off
Use below command to see the output
[root@myserver /]vxdisk list
DEVICE TYPE DISK GROUP STATUS
sda auto:none - - online invalid
sdb auto:none - - online invalid
sdc auto:none - - online invalid
sdd auto:none - - online invalid
sde auto:sliced newdg01 newdg online
Now create a volume using vxassist command. We are not creating subdisk and plex manulally as there may be confussion in naming conventions and also we have to be more precise while creating the plex and subdisk. Vxassist command will directly create subdisk, plex and volume. Kinldy see the command below.
# vxassist -g newdg make newvol01 100M layout=striped
5> Below command will display the Details of the created volume
# vxprint –g newdg –htq new newvol01
v newvol01 - ENABLED ACTIVE 4096000 SELECT newvol01-01 fsgen
pl newvol01-01 newvol01 ENABLED ACTIVE 4096000 STRIPE 2/128 RW
sd newdg01-01 newvol01-01 newdg01 0 2048000 0/0 sde ENA
sd newdg02-01 newvol01-01 newdg02 0 2048000 1/0 sdf ENA
6> Make the format the file system using below command
# mkfs –t vxfs /dev/vx/rdsk/newdg/newcol01
7> Make the mount pouint using below command
#mkdir /new2 8> Mount the filesystem using below command
# mount –t vxfs /dev/vx/dsk/newdg/newcol01 /new2
now use df -h command to see the the new filesystem named /new2. if u want the entry to be added permenantely, make the entry in /etc/fstab.
How to find if Disk is having problem and how to assign the new disk inthe same DG for Striped Volume.
1> Command to Check if Disk is failed.
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sda auto:none - - online invalid
sdb auto:none - - online invalid
sdc auto:none - - online invalid
sdd auto:none - - online invalid
sde auto:sliced newdg01 newdg online
- - newdg02 newdg failed was:sdf
2> Now we have to bring this disk as in vertias volume manager using below command
# cd /etc/vx/bin
# ./vxdisksetup –i sdf format=sliced
3> Now we have to assign sdf to veritas disk newdg02 using below command
# vxdiskadm
Volume Manager Support Operations
Menu:: VolumeManager/Disk
1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
21 Change/Display the default disk layouts
22 Mark a disk as allocator-reserved for a disk group
23 Turn off the allocator-reserved flag on a disklist List disk information
? Display help about menu
?? Display help about the menuing system
q Exit from menusSelect an operation to perform: 5
We have to select the operation number 5 (Replace a failed or removed disk).
will get below option when you select 5
Replace a failed or removed disk
Menu:: VolumeManager/Disk/ReplaceDisk
Use this menu operation to specify a replacement disk for a diskthat you removed with the "Remove a disk for replacement" menu operation, or that failed during use. You will be prompted fora disk name to replace and a disk device to use as a replacement.You can choose an uninitialized disk, in which case the disk willbe initialized, or you can choose a disk that you have alreadyinitialized using the Add or initialize a disk menu operation.
Select a removed or failed disk [,list,q,?] list
Disk group: newdg
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
dm newdg02 - - - - NODEVICE
Select a removed or failed disk [,list,q,?] newdg02
The following devices are available as replacements:sdf
You can choose one of these devices to replace newdg02.
Choose "none" to initialize another device to replace newdg02.
Choose a device, or select "none"[,none,q,?] (default: sdf)sdf
VxVM INFO V-5-2-382
The requested operation is to use the initialized device sdf
to replace the removed or failed disk newdg02 in disk group newdg.
Continue with operation? [y,n,q,?] (default: y) y
Use FMR for plex resync? [y,n,q,?] (default: n) n
VxVM INFO V-5-2-282
Replacement of disk newdg02 in group newdg with disk device
sdf completed successfully.Replace another disk? [y,n,q,?] (default: n) n
4> Use Below command to find if the related volume is startable or not.
# vxinfo -g newdg
newvol01 fsgen Unstartable
The above command shows that the volume is newvol01 is unstartable.
We need to recoverthe volume. Below is the procedure to check the status of the volume
5> # vxprint -g newdg -htq newvol01
v newvol01 - DISABLED ACTIVE 4096000 SELECT - fsgen
pl newvol01-01 newvol01 DISABLED RECOVER 4096000 STRIPE 2/128 RW
sd newdg01-01 newvol01-01 newdg01 0 2048000 0/0 sde ENA
sd newdg02-01 newvol01-01 newdg02 0 2048000 1/0 sdf ENA
Here it can be seen that status of the plex newvol01-01 of volume newvol01 is Disabled and recover.
6> The next step is to off the plex and then to start the plex. This will bring the plex in stale state.
# vxmend -g newdg -o force off newvol01-01
# vxprint -g newdg -htq newvol01
v newvol01 - DISABLED ACTIVE 4096000 SELECT - fsgen
pl newvol01-01 newvol01 DISABLED OFFLINE 4096000 STRIPE 2/128 RW
sd newdg01-01 newvol01-01 newdg01 0 2048000 0/0 sde ENA
sd newdg02-01 newvol01-01 newdg02 0 2048000 1/0 sdf ENA
In the above step the plex is brought offline
7> # vxmend -g newdg on newvol01-01
# vxprint -g newdg -htq newvol01
v newvol01 - DISABLED ACTIVE 4096000 SELECT - fsgen
pl newvol01-01 newvol01 DISABLED STALE 4096000 STRIPE 2/128 RW
sd newdg01-01 newvol01-01 newdg01 0 2048000 0/0 sde ENA
sd newdg02-01 newvol01-01 newdg02 0 2048000 1/0 sdf ENA
In the above command we have brought the plex in stale state.
8> Now we bring the plex in clean state from stale state using below command.
# vxmend -g newdg fix clean newvol01-01
# vxprint -g newdg -htq newvol01
v newvol01 - DISABLED ACTIVE 4096000 SELECT - fsgen
pl newvol01-01 newvol01 DISABLED CLEAN 4096000 STRIPE 2/128 RW
sd newdg01-01 newvol01-01 newdg01 0 2048000 0/0 sde ENA
sd newdg02-01 newvol01-01 newdg02 0 2048000 1/0 sdf ENA
9> Now the only step pending is to start the volume. This will solve our problem.
# vxvol -g newdg start newvol01
# vxprint -g newdg -htq newvol01
v newvol01 - ENABLED ACTIVE 4096000 SELECT newvol01-01 fsgen
pl newvol01-01 newvol01 ENABLED ACTIVE 4096000 STRIPE 2/128 RW
sd newdg01-01 newvol01-01 newdg01 0 2048000 0/0 sde ENA
sd newdg02-01 newvol01-01 newdg02 0 2048000 1/0 sdf ENA
10> Check the status of the volume using below command.
# vxinfo -g newdgnewvol01 fsgen Started
11> Before mounting the file system we need to perform the fsck on raw filesystem.
# fsck -t vxfs –o full –y /dev/vx/rdsk/newdg/newvol01
12> # now the filesystemUsing below command
# mount –a
/dev/vx/dsk/newdg/newvol01 2.0G 18M 1.9G 1% /new
The filesystem have been mounted.
The same way we can create mirriored volumes and Raid 5 volume. only thing we have to remember disk required for each layout and perform the steps accordingle. if still have problem for mirrored volumes mail me on sumedhkhobragade@gmail.com.