Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Moving Virtual Machine Files from one SSD to Another Post 302923829 by Corona688 on Tuesday 4th of November 2014 04:45:44 PM
Old 11-04-2014
If possible I would pick option 2, since that allows you to use the new ext4 filesystem, which supports online defragmentation. That can be important for virtual machines. But just copying the files has one problem.

There's very little "magic" about UNIX/Linux filesystems which won't be immaculately duplicated with a proper backup/restore, but sparse files is one of them. They will "explode" in size from all their sparse parts suddenly not being sparse anymore. Are your virtual machine disk images stored as sparse files? An easy way to check is to compare its size in ls -lh filename with its size in du -hs filename... A sparse file could be many gigabytes smaller according to du than ls since ls only knows its length.

Sparse files is also one of the times you'd really want ext4, since their random-ish patterns of use and writing can fragment worse than other files.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Is there any Virtual data center as we have Virtual Machine?

Do we have any Virtual Data Center software as we have Virtual Machine? I want to practice everything of Solaris practically but i don't have resources like data center which includes Servers, Data storages, switches, and other things. (2 Replies)
Discussion started by: karman0931
2 Replies

2. Shell Programming and Scripting

moving files from a dir in one machine to a dir in another machines

Hi, I am a unix newbie.I need to write a shell script to move my oracle READ WRITE datafiles from one serevr to another. I need to move it from /u01/oradata/W1KK/.. to /u01/oradata/W2KK, /u02/oradata/W1KK/.. to /u02/oradata/W2KK. That is, I actaully am moving my datafiles from one database to... (2 Replies)
Discussion started by: mathews
2 Replies

3. Red Hat

Virtual Machine

Hi All, In my Org we are using Xen Hypervisor on RHEL 5.Now now the biggest challenge for us is to take online snapshot of running VM Guests.But this feature is not available in Xen. So i am trying to figure it out with some of the blogs found on net,in one blog its saying to create... (0 Replies)
Discussion started by: ajaincv
0 Replies

4. Solaris

Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host

Trying to set or modify the randomly set hostID of a Solaris 10 virtual/guest machine that I installed on a Windows-XP host machine (using Virtual Box 4.1.12). I was able to set/modify the hostname of the Solaris 10 virtual/guest machine during installation as well as via the Virtual Box... (4 Replies)
Discussion started by: Matt_VB
4 Replies

5. Red Hat

My RHEL virtual Machine Does not have Virtual Machine Manager Desktop Tool

My RHEL virtual Machine Does not have Virtual Machine Manager Desktop Tool Hi, I don't seem to have the Virtual Machine Manager Desktop tool set up on my RHEL6 Machine. The Linux machine runs off VMWare player and I'm not sure whether it is a VMWare software issue or a problem with the RHEL6... (2 Replies)
Discussion started by: accipiter1
2 Replies

6. Red Hat

Moving boot SSD from a dead server to a new server

Hi all, We have a disk array that has the boot drive on an OCZ SSD on a PCIe card. Well, the motherboard died and we got a new motherboard. We moved the controllers, NICs, etc, to the exact same slots on the new motherboard, except now it won't boot. I guess it doesn't recognize the OS on the... (1 Reply)
Discussion started by: glowe57
1 Replies

7. UNIX for Advanced & Expert Users

Virtual machine

Can I please get some recommendations on virtual machine software? I am using Fedora. What do you think is the best software and why? I need a windows virtual machine to run some windows software. What do you think is the best Windows version to use and why (xp, vista, 7, 8, 8.1)? Is it hopefully... (2 Replies)
Discussion started by: cokedude
2 Replies

8. AIX

IBM Virtual Machine OS on intel x86 and x64? IBM AIX OS on IBM Virtual Machine?

Hi There, I have zero information and zero knowledge for IBM virtual machine except Amazon cloud and VMware ESXi (Only Linux OS available). Anyone could provide me the following answer - Can IBM VM been deploy on X86 and X64 (Intel Chip)? If answer is yes any chance to deploy AIX OS... (13 Replies)
Discussion started by: chenyung
13 Replies

9. SCO

Moving SCO Virtual Machine in VMWare Environment: Critical Licensing Error Messages

Some years ago our company chose to run a critical proprietary app under SCO Unix. My predecessor tried to move A SCO Unix virtual machine from our dedicated VMWare environment to a shared Cloud VMWare environment. My predecessor received licensing messages from these critical servers so... (2 Replies)
Discussion started by: timfox1234
2 Replies

10. UNIX for Beginners Questions & Answers

Providing virtual machine priority in kvm based virtual machines

Hi All, Is there any way I can prioritize my VMs when there is resource crunch in host machine so that some VMs will be allocated more vcpu, more memory than other VMs in kvm/qemu hypervisor based virtual machines? Lets say in my cloud environment my Ubuntu 16 compute hosts are running some... (0 Replies)
Discussion started by: SanjayK
0 Replies
FALLOCATE(1)							   User Commands						      FALLOCATE(1)

NAME
fallocate - preallocate or deallocate space to a file SYNOPSIS
fallocate [-c|-p|-z] [-o offset] -l length [-n] filename fallocate -d [-o offset] [-l length] filename fallocate -x [-o offset] -l length filename DESCRIPTION
fallocate is used to manipulate the allocated disk space for a file, either to deallocate or preallocate it. For filesystems which support the fallocate system call, preallocation is done quickly by allocating blocks and marking them as uninitialized, requiring no IO to the data blocks. This is much faster than creating a file by filling it with zeroes. The exit code returned by fallocate is 0 on success and 1 on failure. OPTIONS
The length and offset arguments may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB. The options --collapse-range, --dig-holes, --punch-hole and --zero-range are mutually exclusive. -c, --collapse-range Removes a byte range from a file, without leaving a hole. The byte range to be collapsed starts at offset and continues for length bytes. At the completion of the operation, the contents of the file starting at the location offset+length will be appended at the location offset, and the file will be length bytes smaller. The option --keep-size may not be specified for the collapse-range operation. Available since Linux 3.15 for ext4 (only for extent-based files) and XFS. -d, --dig-holes Detect and dig holes. This makes the file sparse in-place, without using extra disk space. The minimum size of the hole depends on filesystem I/O block size (usually 4096 bytes). Also, when using this option, --keep-size is implied. If no range is specified by --offset and --length, then the entire file is analyzed for holes. You can think of this option as doing a "cp --sparse" and then renaming the destination file to the original, without the need for extra disk space. See --punch-hole for a list of supported filesystems. -i, --insert-range Insert a hole of length bytes from offset, shifting existing data. -l, --length length Specifies the length of the range, in bytes. -n, --keep-size Do not modify the apparent length of the file. This may effectively allocate blocks past EOF, which can be removed with a truncate. -o, --offset offset Specifies the beginning offset of the range, in bytes. -p, --punch-hole Deallocates space (i.e., creates a hole) in the byte range starting at offset and continuing for length bytes. Within the specified range, partial filesystem blocks are zeroed, and whole filesystem blocks are removed from the file. After a successful call, subse- quent reads from this range will return zeroes. This option may not be specified at the same time as the --zero-range option. Also, when using this option, --keep-size is implied. Supported for XFS (since Linux 2.6.38), ext4 (since Linux 3.0), Btrfs (since Linux 3.7) and tmpfs (since Linux 3.5). -v, --verbose Enable verbose mode. -x, --posix Enable POSIX operation mode. In that mode allocation operation always completes, but it may take longer time when fast allocation is not supported by the underlying filesystem. -z, --zero-range Zeroes space in the byte range starting at offset and continuing for length bytes. Within the specified range, blocks are preallo- cated for the regions that span the holes in the file. After a successful call, subsequent reads from this range will return zeroes. Zeroing is done within the filesystem preferably by converting the range into unwritten extents. This approach means that the spec- ified range will not be physically zeroed out on the device (except for partial blocks at the either end of the range), and I/O is (otherwise) required only to update metadata. Option --keep-size can be specified to prevent file length modification. Available since Linux 3.14 for ext4 (only for extent-based files) and XFS. -V, --version Display version information and exit. -h, --help Display help text and exit. AUTHORS
Eric Sandeen <sandeen@redhat.com> Karel Zak <kzak@redhat.com> SEE ALSO
truncate(1), fallocate(2), posix_fallocate(3) AVAILABILITY
The fallocate command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux April 2014 FALLOCATE(1)
All times are GMT -4. The time now is 01:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy