File: create_filesystem

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 (43 lines) | stat: -rwxr-xr-x 569 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#
# Use the EVMS CLI to add a filesystem to a volume.

fs=$1
volume=$2

if [ -z $volume ]; then
	echo "USAGE: `basename $0` ext2|ext3|reiser|jfs|xfs|swap volume"
	exit 1
fi

case "$fs" in
	ext2)
		plugin=Ext2/3
		args="journal=FALSE"
		;;
	ext3)
		plugin=Ext2/3
		args="journal=TRUE"
		;;
	reiser)
		plugin=ReiserFS
		;;
	jfs)
		plugin=JFS
		;;
	xfs)
		plugin=XFS
		;;
	swap)
		plugin=SWAPFS
		;;
	*)
		echo "USAGE: `basename $0` ext2|ext3|reiser|jfs|xfs|swap volume"
		exit 1
		;;
esac

evms -s << EOF > /dev/null
format:${plugin}={${args}},${volume}
EOF