Remove references to old volume from fstab
On HP Cloud, /dev/vdb winds up in fstab, which leads us to having dupliate entries for /mnt. Change-Id: I2c0914fdcf149cd823d4c9833a6e21d2bca8a6e7
This commit is contained in:
parent
f490260de7
commit
61675716c4
@ -14,7 +14,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
# If we're running on a cloud server with no swap, fix that:
|
# If we're running on a cloud server with no swap, fix that:
|
||||||
if [ `grep SwapTotal /proc/meminfo | awk '{ print $2; }'` -eq 0 ]; then
|
if [ `grep SwapTotal /proc/meminfo | awk '{ print $2; }'` -eq 0 ]; then
|
||||||
if [ -b /dev/vdb ]; then
|
if [ -b /dev/vdb ]; then
|
||||||
@ -37,9 +36,9 @@ if [ `grep SwapTotal /proc/meminfo | awk '{ print $2; }'` -eq 0 ]; then
|
|||||||
mount ${DEV}2 /mnt
|
mount ${DEV}2 /mnt
|
||||||
rsync -a /opt/ /mnt/
|
rsync -a /opt/ /mnt/
|
||||||
umount /mnt
|
umount /mnt
|
||||||
|
perl -nle "m,${DEV}, || print" -i /etc/fstab
|
||||||
echo "${DEV}1 none swap sw 0 0" >> /etc/fstab
|
echo "${DEV}1 none swap sw 0 0" >> /etc/fstab
|
||||||
echo "${DEV}2 /opt ext4 errors=remount-ro,barrier=0 0 2" >> /etc/fstab
|
echo "${DEV}2 /opt ext4 errors=remount-ro,barrier=0 0 2" >> /etc/fstab
|
||||||
mount -a
|
mount -a
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user