File: create_volume

package info (click to toggle)
evms 2.5.2-1.sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 14,248 kB
  • ctags: 15,488
  • sloc: ansic: 201,340; perl: 12,421; sh: 4,262; makefile: 1,516; yacc: 316; sed: 16
file content (23 lines) | stat: -rwxr-xr-x 391 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#
# Use the EVMS CLI to create a volume. Specifying a name will create an EVMS
# volume. Not specifying a name will create a compatibility volume.

object=$1
name=$2

if [ -z $object ]; then
	echo "USAGE: `basename $0` object [name]"
	exit 1
fi

if [ -z $name ]; then
	arg="Compatibility"
else
	arg="Name=$name"
fi

evms -s << EOF > /dev/null
create:volume,${object},${arg}
EOF