manila-test-image/server-files/usr/bin/manila-post-extend
Ben Swartzlander ec4efbe1bb Add shell scripts for use by nextgen generic driver
Change-Id: I96c10740f299ddc4bccdd7f538cf1417c8a09ea2
2017-10-26 18:14:44 +00:00

14 lines
229 B
Bash
Executable File

#!/bin/sh -e
# manila-post-extend <cookie> <device-path>
NUM=$1
DEVICE=$2
e2fsck -pf $DEVICE
resize2fs $DEVICE
UUID=$(cat /metadata/$NUM/UUID)
MNT_PATH=/shares/$NUM
echo UUID=$UUID $MNT_PATH ext2 rw 0 2 >> /etc/fstab
mount -a