Add a disk to a Linux VM - azure

I want to start geth on a new VM. I already have geth running in archival mode in another VM. I have synced up to 6 million blocks on the existing VM. Is there a way I can take the data disk from the existing VM and attach it to the new VM. So that when I start geth on the new VM it will take the latest block synced from the disk and start after 6 millionth block.
I have tried shutting of my VM and taking a snapshot of the data disk and then attaching it to the new VM. But after mounting the disk on the new VM, it seems like the chaindata has been erased. Am I missing something while attaching the disk ?
I have followed the following documentation to attach the disk:
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/add-disk
Also I am using Azure platform for my VM and the VMs have Linux Operating systems.
Thanks!

For your issue, I test the data disk copy and it works well with nothing disappear. The steps below.
Dettach the data disk which you want to copy.
Create a snapshot from the data disk.
Create a data disk copy from the snapshot.
Attach the copy data disk to the new VM.
Try it again following the steps above.

Related

Record of mount points when restoring from a snapshot?

Let's say I have an ec2 instance with a boot disk and an additional volume mounted somewhere.
I take a snapshot of the boot disk and spin up a new instance using that snapshot to create the boot disk. Does linux (specifically AL2 in my case) have any record of where the other volume was mounted? I know /var/log/messages has logs showing the mount but I'm curious if there is a definitive list.

How do I check the trend of disk utilization in linux(centos specifically)

I have a centos server which are running MySQL, kafka, and other services, I have separate LVM disks mounted to each of these services.
How do I get the trend of disk utilization for these services? Is there any specific command in Linux through which I can check?
I want to make sure I will not be out of disk space in the coming days.
Thanks.
The df command will output the info you desire. you may create a periodic script that checks on it.

Azure D4 Disk Size below advertised

Azure VM D4 is advertised as having 400GB of SSD backed storage. Provisioning the VM I end up with 127GB for the OS and 400GB for temp storage.
Is this normal? I need the full 400GB on the OS drive and dont see an obvious way to reconfigure storage.
That is correct. However, because the local SSD is not guaranteed to be persistent, you will not want this to be responsible for your OS drive.
In the D-series announcements, http://azure.microsoft.com/blog/2014/09/22/new-d-series-virtual-machine-sizes/
"Local Storage SSD Drive
On these new sizes, the temporary drive (D:\ on Windows, /mnt or /mnt/resource on Linux) are local SSDs. This high-speed local disk is best used for workloads that replicate across multiple instances, like MongoDB, or can leverage this high I/O disk for a local and temporary cache, like SQL Server 2014’s Buffer Pool Extensions. Note, these drives are not guaranteed to be persistent. Thus, while physical hardware failure is rare, when it occurs, the data on this disk may be lost, unlike your OS disk and any attached durable disks that are persisted in Azure Storage." (emphasis mine)
Found this post that explains how this is normal for the OS drive.
https://azure.microsoft.com/blog/2015/03/25/azure-vm-os-drive-limit-octupled/
So for marketplace images the guidance is to provision new data drives.

Attach new disk to Azure Linux VM

I have installed mysql in a A4 Linux VM in Azure and I'm running out of disk space. I saw that the primary disk space is 29GB only and the temporary disk space is 600GB, but I don't want to store mysql's data to the temporary disk because of the possibility of losing them.
I want to attach a new disk to my VM and I have two questions:
1) What type of storage is the best for my case?
2) If I attach a disk, will mysql data be distributed to this disk automatically when the primary disk space runs out or should I make further adjustments (i.e. change mysql's data_dir or something)?
You can attach a new data disk to your VM. The steps are described here in the Azure documentation: http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-tutorial/#attachdisk
No, the newly attached disk won't expand the existing one.

AWS Amazon offers 160GB space for small instance. On booting Suse linux the total root partition space is

AWS Amazon offers 160GB space for small instance. On booting Suse linux the total root partition space I got is 10GB. On df -h I only see/dev/sda1 with 10GB space. Where is rest 150GB? How can I claim this space? I dont want to use EBS as it cost extra and 160GB space suffice my need. Please help.
The extra 150GB is given as an ephemeral storage, e.g. data on this storage won't survive reboots in contrast to the data on your root storage. During launching, you can select where your ephemeral disks should be made available as a device in your machine (this is the -boption when using the command line or in the "Instance Storage" tab when launching via the S3 console. You can then simply mount it in your running instance.

Resources