Hello, Thanks. That did it. I neglected to mention this isn't a boot drive, it's a data-only drive, in this case large compilations, which is why I ran out of space. What I did was created a new virtual disk, partitioned and formatted it, mounted it under /tmp/new then did the above rsync command to copy over the data. I then removed the fstab reference, shut down the vm, deleted the old virtual disk file, rebooted the vm, and remounted the drive and made sure the fstab reference was right. Thanks. Dave. On 12/26/17, John G Heim <jheim@math.wisc.edu> wrote:
Good job of answering the question asked. I'd be interested in hearing if this works though.
If you run out of space on your hard drive and solve that problem by adding a second disk, the solution has nothing to do with it being a virtual machine. The time honored way to deal with this is to install linux on the second, bigger drive, boot from it, and manually copy files off the old drive as needed. Once you're sure you've got everything, you can remove the old hard drive.
I was tempted to not answer the question as asked and instead to suggest a virtual disk related solution. You can enlarge a virtual disk and then get the guest operating system to recognize it. If you used LVM originally, you can actually resize the root partition of a virtual machine while the vm is running. I've done it, it works. But the safer way is to boot from a live ISO image and resize the partition.
On 12/26/2017 11:54 AM, Jason White via Blind-sysadmins wrote:
I would achieve this as follows, but there may be better solutions. 1. Create a partition and a file system on the new drive. Mount the new file system somewhere, e.g., /tmp/new
2. If the old partition is currently mounted as your root file system, bind mount the partition on the old drive, e.g., Mkdir /tmp/partition Mount --bind / /tmp/partition
This will ensure that any device files (e.g., under /dev, used during the boot process) are properly available for copying.
3. Use rsync to copy the files over. Recommended rsync options are rsync -qaHAXS /tmp/partition/ /tmp/new/ See section 4 of https://wiki.archlinux.org/index.php/Rsync
4. Install a boot loader on the new drive, if necessary, using grub-install or whatever is appropriate.
Warning: I haven't done this, so please correct and adjust as necessary to make it work.
-----Original Message----- From: Blind-sysadmins [mailto:blind-sysadmins-bounces@lists.hodgsonfamily.org] On Behalf Of David Mehler Sent: Tuesday, December 26, 2017 12:33 PM To: blind-sysadmins <blind-sysadmins@lists.hodgsonfamily.org> Subject: [Blind-sysadmins] cloning a vm virtual drive
Hello,
I'm using VMware workstation and have a vm with a separate virtual drive. It is now full. What I'm wanting to do is add a new virtual hard drive, a larger one, this I can do. I'm then needing to clone the smaller drive to the larger one growing the partition size. So say a 40gb drive to a 60gb drive, the partition would be sixty gb in size. For reference this is on a Ubuntu 17.04 vm. I'd like to use Linux tools.
Any help appreciated. Thanks. Dave.
_______________________________________________ Blind-sysadmins mailing list Blind-sysadmins@lists.hodgsonfamily.org https://lists.hodgsonfamily.org/listinfo/blind-sysadmins
_______________________________________________ Blind-sysadmins mailing list Blind-sysadmins@lists.hodgsonfamily.org https://lists.hodgsonfamily.org/listinfo/blind-sysadmins
_______________________________________________ Blind-sysadmins mailing list Blind-sysadmins@lists.hodgsonfamily.org https://lists.hodgsonfamily.org/listinfo/blind-sysadmins