I have a Linux VM on Azure that originally came with a 30G OS disk. As I had an application that had accumulated a lot of data, I attached a new disk through the Azure Dashboard and here is how it looks like now:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 19G 9.2G 67% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 3.4G 12K 3.4G 1% /dev
tmpfs 698M 248K 697M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.5G 0 3.5G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sdb1 281G 63M 267G 1% /mnt/resource
So /mnt/resource
is the new disk that was attached. I moved all the application data to /mnt/resource
and created a symlink on the original location pointing to the new location:
tomcat@jenkins:~$ ll
lrwxrwxrwx 1 tomcat tomcat 21 Apr 18 22:14 .tomcat -> /mnt/resource/.tomcat/
My question is: Is the above a reliable solution, meaning that the attached disk and the data on it is always reliably available when the system starts, as it has to be mounted? Are there in general better solutions to solve the problem?