Solaris Volume Manager
Solaris Volume Manager
Solaris Volume Manager
Why SVM?
Without SVM
Each disk slice has its own physical and logical device File system cannot span more than one disk slice The maximum size of a file system is limited to the size of the disk even with large file summit support.
With SVM
disk slices can be grouped across several disks to appear as one or more volumes (metadevices) to the operating system
/dev/md/dsk/d0 /dev/md/rdsk/d0
RAID
Acronym for
Redundant Array of Independent Disks
formerly Redundant Array of Inexpensive Disks
Combine multiple disk drive components into a logical unit, where data is distributed across the drives in one of several ways called RAID levels Concept introduced at the University of California at Berkeley in 1987 by David Patterson, Garth Gibson and Randy Katz
RAID
RAID 0 RAID 1 RAID 0+1 RAID 1+0 RAID 2 RAID 3 RAID 4 RAID 5 RAID 6 - Striping or Concatenation - Mirroring - Striping with Mirroring - Mirroring with Striping - Hamming code correction - Striping with dedicated party disk - Independent reads and writes - Striping with distributed parity - RAID 5 with second parity calculation
RAID
RAID levels 2, 3, 4 and 6 not available in SVM
These RAID levels are not commonly implemented in commercial applications.
Advantages of RAID
The foremost advantage of using a RAID drive is that it increases the performance and/or reliability of a system. Two main types of RAID
Hardware RAID Software RAID
SVM is software RAID
Concatenation (RAID 0)
FS 1
FS 2
Virtual FS
FS 3
Concatenation (RAID 0)
Partition 10 mb
Concatenation (RAID 0)
Combines multiple stripes to create a large volume
No redundancy Can contain slices of different sizes because they are merely joined together.
Striping (RAID 0)
FS 1
FS 2
FS 1 FS 2 FS 3
FS 3
Striping (RAID 0)
Interlace2 interlace4 10 mb
Striping (RAID 0)
Used to increase read and write performance
by spreading data requests over multiple disks and controllers
Mirror (RAID 1)
Data
FS 1 FS 2 FS 3 FS 4 FS 1
FS 2 FS 3 FS 4
Mirror
Mirror (RAID 1)
Data1 Data2 10 mb
Mirror (RAID 1)
Used to guard against disk failure
Redundancy
FS 1
FS 2 FS 3 FS 4
FS 5 FS 6 FS 7
FS 8
FS 9 FS 10 FS 11 FS 12
RAID 5 D2 20% mb
The pattern of writing data and parity results in both data and parity spread across all the disks in the volume Parity protect against a single disk failure.
RAID 0+1
RAID 0+1
FS 1 FS 2 FS 3 FS 4 FS 5 FS 6 FS 7 FS 8 RAID Management Software Striping FS 1 FS 2 FS 3 FS 4 FS 5 FS 1 FS 6 FS 2 FS 7 FS 8 RAID Management Software Mirroring FS 3 FS 4 FS 5 FS 1 FS 2 FS 3 FS 4 FS 5 FS 6 FS 7 FS 8 RAID Management Software Striping FS 1 FS 2 FS 3 FS 4 FS 5 FS 6 FS 7 FS 8 FS 6 FS 7 FS 8
RAID 1+0
RAID Comparison
FEATURE
Redundant data Improve read performance Improve write performance
RAID 1
RAID 5
No
No
Yes
No
Yes
Yes
No
Yes
No
No
RAID Comparison
FEATURE RAID 1
RAID 5
NON-Redundant
Writes operations
Faster
Slower Neutral
Random read
Slower
Faster
Neutral
Hardware cost
Highest
Higher Lowest
Redundancy
Best
OK
Data loss
State Replicas
Are repositories of information on the state and configuration of each metadevice
Also known as Database State Replica or State Databases Store disk state, configuration, ownership and other information in special areas of a disk (slices/partitions) Minimum of 3 required One is designated as the master
System will not boot into multiuser unless a majority (half + 1, 51%) of the state replicas are available System will panic if more than half of the state replicas are corrupt
State Replicas
Replicas Store:
Disk configuration information State Information
* The -a and -f options are used together to create the initial replica * The -a option attaches a new database device and automatically edits the appropriate files * The -c2 option specifies that 2 replicas are to be created
SVM Volumes
A (logical) volume (metadevice) is a group of physical slices that appear to the operating system as a single device A volume is used to increase storage capacity and increase data availability SVM can support up to 8192 volumes
Volume names start with d followed by a number default configuration is 128 volumes
d0 to d127
SVM Volumes
You can create the following types of volumes
Concatenations Stripes Concatenated scripes Mirrors RAID5
RAID 0 Volumes
Create a concatenated volume: # metainit f d10 1 1 ctt0d0s3 Create a striped volume: # metainit f d10 1 3 c2t1d0s6 c2t2d0s6 c2d3d0s6 Monitor state of a volume: # metastat d10 # metastat -c d10 * The c option means output in concise format
Soft Partitions
A soft partition is a means of dividing a disk or volume into as many partitions (extents) as needed
Overcomes the eight slice limit Can be noncontiguous (hard must be contiguous)
This can cause I/O performance degradation
# metainit d10 p c2t1d0s6 * The p option specifies that the metadevice created will be a soft partition
Mirrors
Mirror:
Should be on different disks. Why? Slices should be the same size. Why?
Types of Mirrors:
One Way Two Way Three Way
Mirrors
A mirror is a volume that consists of 2 or more submirrors First create the submirrors: # metainit d11 1 1 c0t0d0s6; metainit d12 1 1 c0t0d1s6
Then create the mirror volume using one of the submirrors: # metainit d1 m d11
Then attach the second submirror: # metainit d1 d12
* The m option specifies that the volume created will be a mirror
Mirrors
To offline the d11 submirror of the d1 mirrored volume: # metaoffline d1 d11 To online the d11 submirror of the d1 mirrored volume: # metaonline d1 d11 To attach another submirror (d13) to the d1 mirrored volume: # metattach d1 d13 To detach submirror d13 from the d1 mirrored volume: # metadetach d1 d13
Delete Mirror
Detach a mirror metadevice
# metadetach d50 d5
42
Unmirror
To unmirror a non-critical filesystem (/test) which is based on a mirror d1 (d11 and d12 submirrors) # umount /test # metadetach d1 d12 # metaclear r d1 # metaclear d12 Then edit /etc/vsftab to replace the /test entry with a regular device instead a metadevice # mount /test