- Fixes bug 1049553.
Change-Id: I9fef93d25512c014dfb882adf0e169487bf877d8
| ... | ... |
@@ -107,16 +107,17 @@ function configure_swift() {
|
| 107 | 107 |
if [[ -e ${SWIFT_DATA_DIR}/drives/images/swift.img ]]; then
|
| 108 | 108 |
if egrep -q ${SWIFT_DATA_DIR}/drives/sdb1 /proc/mounts; then
|
| 109 | 109 |
sudo umount ${SWIFT_DATA_DIR}/drives/sdb1
|
| 110 |
+ sudo rm -f ${SWIFT_DATA_DIR}/drives/images/swift.img
|
|
| 110 | 111 |
fi |
| 111 |
- else |
|
| 112 |
- mkdir -p ${SWIFT_DATA_DIR}/drives/images
|
|
| 113 |
- sudo touch ${SWIFT_DATA_DIR}/drives/images/swift.img
|
|
| 114 |
- sudo chown $USER: ${SWIFT_DATA_DIR}/drives/images/swift.img
|
|
| 115 |
- |
|
| 116 |
- dd if=/dev/zero of=${SWIFT_DATA_DIR}/drives/images/swift.img \
|
|
| 117 |
- bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
|
|
| 118 | 112 |
fi |
| 119 | 113 |
|
| 114 |
+ mkdir -p ${SWIFT_DATA_DIR}/drives/images
|
|
| 115 |
+ sudo touch ${SWIFT_DATA_DIR}/drives/images/swift.img
|
|
| 116 |
+ sudo chown $USER: ${SWIFT_DATA_DIR}/drives/images/swift.img
|
|
| 117 |
+ |
|
| 118 |
+ dd if=/dev/zero of=${SWIFT_DATA_DIR}/drives/images/swift.img \
|
|
| 119 |
+ bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
|
|
| 120 |
+ |
|
| 120 | 121 |
# Make a fresh XFS filesystem |
| 121 | 122 |
mkfs.xfs -f -i size=1024 ${SWIFT_DATA_DIR}/drives/images/swift.img
|
| 122 | 123 |
|