Sponsored Content
Full Discussion: tar 2GB limit
Special Forums Hardware Filesystems, Disks and Memory tar 2GB limit Post 302098490 by SLKRR on Monday 4th of December 2006 02:19:40 PM
Old 12-04-2006
Quote:
Originally Posted by Perderabo
The output device does not affect whether or not it is possible. In your 15 GB filesystem all of the individual files were smaller than 2 GB. Add a single 3 GB file to your filesystem and then try tar. It will fail. But if you are on Solaris and use the -E flag, it may succeed. The problem is not the total size of the stuff to be tarred. It all has to do with how big the biggest file is. tar has a header that it must write for each file. That header does not have space for a number larger than 2 GB in the size field. Redirecting the output from tape to disk will not help that header hold a larger number.
-E

That appears to have done the trick. Guess I need to read the man files a little more closely... Smilie

Thanks everybody!
 

10 More Discussions You Might Find Interesting

1. Solaris

SUN Solaris 9 - Is there a 2GB file size limit?

Hi I am using SUN/Solaris 9 and I was told that some unix versions have 2GB size limit. Does this applies to SUN/Solaris 9? Thanks. (2 Replies)
Discussion started by: GMMike
2 Replies

2. Shell Programming and Scripting

cpio - files > 2gb

Hi, Currently a backup script copies compressed files to tape using cpio command (on AIX 5.2). Recently we've had a compressed file which has gone over 2 GB in size resulting in an error while copying this file onto the tape using cpio. Any suggestions on relevant workarounds would be much... (2 Replies)
Discussion started by: dnicky
2 Replies

3. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

4. Linux

Compress files >2GB

Hi folks, I'm trying to compress a certain number of files from a cifs mount to a xfs mount, but cannot do it when the total size of the files is bigger than 2GB. Is there any limitation for above 2GB? OS is SLES 64bit The files are maximum 1MB, so there are aprox. 2000 files to compress... (2 Replies)
Discussion started by: xavix
2 Replies

5. UNIX for Advanced & Expert Users

How to create a file more than 2GB

Hi, I am executing a SQL query and the output is more than 2GB. Hence the process is failing. How can I have a file created more than 2GB ? Thanks, Risshanth (1 Reply)
Discussion started by: risshanth
1 Replies

6. AIX

Tar files larger than 2GB

Hi, Does anyone know if it is possible to tar files larger than 2GB? The reason being is they want me to dump a single file (which is around 20GB) to a tape drive and they will restore it on a Solaris box. I know the tar have a limitation of 2GB so I am thinking of a way how to overcome this.... (11 Replies)
Discussion started by: depam
11 Replies

7. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

8. HP-UX

2GB file size limit

Greetings, I'm attempting to dump a filesystem from a RHEL5 Linux server to a VXFS filesystem on an HP-UX server. The VXFS filesystem is large file enabled and I've confirmed that I can copy/scp a file >2GB to the filesystem. # fsadm -F vxfs /os_dumps largefiles # mkfs -F vxfs -m... (12 Replies)
Discussion started by: bkimura
12 Replies

9. Solaris

Limit: stacksize: Can't remove limit

Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine? Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies

10. Solaris

zip -r <directory> failing due to 2GB limit - Just asking opinion

Hi, Am trying to run zip -r on a 2.4G directory and it is failing with the error below. I believe this is because of the 2G limit of the zip program. server101(oper01)/u01/temp$: date Thu Mar 15 12:53:44 NZDT 2012 server101(oper01)/u01/temp$: ls -l total 8 drwxr-x--x 4 oracle dba ... (1 Reply)
Discussion started by: newbie_01
1 Replies
virt-make-fs(1) 					      Virtualization Support						   virt-make-fs(1)

NAME
virt-make-fs - Make a filesystem from a tar archive or files SYNOPSIS
virt-make-fs [--options] input.tar output.img virt-make-fs [--options] input.tar.gz output.img virt-make-fs [--options] directory output.img DESCRIPTION
Virt-make-fs is a command line tool for creating a filesystem from a tar archive or some files in a directory. It is similar to tools like mkisofs(1), genisoimage(1) and mksquashfs(1). Unlike those tools, it can create common filesystem types like ext2/3 or NTFS, which can be useful if you want to attach these filesystems to existing virtual machines (eg. to import large amounts of read-only data to a VM). To create blank disks, use virt-format(1). Basic usage is: virt-make-fs input output.img where "input" is either a directory containing files that you want to add, or a tar archive (either uncompressed tar or gzip-compressed tar); and "output.img" is a disk image. The input type is detected automatically. The output disk image defaults to a raw ext2 sparse image unless you specify extra flags (see "OPTIONS" below). FILESYSTEM TYPE The default filesystem type is "ext2". Just about any filesystem type that libguestfs supports can be used (but not read-only formats like ISO9660). Here are some of the more common choices: ext3 Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If you are not going to use the filesystem in a way that requires the journal, then this is just wasted overhead. ntfs or vfat Useful if exporting data to a Windows guest. Note for vfat: The tar archive or local directory must only contain files which are owned by root (ie. UID:GID = 0:0). The reason is that the tar program running within libguestfs is unable to change the ownership of non-root files, since vfat itself does not support this. minix Lower overhead than "ext2", but certain limitations on filename length and total filesystem size. EXAMPLE virt-make-fs --type=minix input minixfs.img TO PARTITION OR NOT TO PARTITION Optionally virt-make-fs can add a partition table to the output disk. Adding a partition can make the disk image more compatible with certain virtualized operating systems which don't expect to see a filesystem directly located on a block device (Linux doesn't care and will happily handle both types). On the other hand, if you have a partition table then the output image is no longer a straight filesystem. For example you cannot run fsck(8) directly on a partitioned disk image. (However libguestfs tools such as guestfish(1) and virt-resize(1) can still be used). EXAMPLE Add an MBR partition: virt-make-fs --partition -- input disk.img If the output disk image could be terabyte-sized or larger, it's better to use an EFI/GPT-compatible partition table: virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img EXTRA SPACE Unlike formats such as tar and squashfs, a filesystem does not "just fit" the files that it contains, but might have extra space. Depending on how you are going to use the output, you might think this extra space is wasted and want to minimize it, or you might want to leave space so that more files can be added later. Virt-make-fs defaults to minimizing the extra space, but you can use the --size flag to leave space in the filesystem if you want it. An alternative way to leave extra space but not make the output image any bigger is to use an alternative disk image format (instead of the default "raw" format). Using --format=qcow2 will use the native QEmu/KVM qcow2 image format (check your hypervisor supports this before using it). This allows you to choose a large --size but the extra space won't actually be allocated in the image until you try to store something in it. Don't forget that you can also use local commands including resize2fs(8) and virt-resize(1) to resize existing filesystems, or rerun virt- make-fs to build another image from scratch. EXAMPLE virt-make-fs --format=qcow2 --size=+200M input output.img OPTIONS
--help Display brief help. --version Display version number and exit. --debug Enable debugging information. --size=<N> --size=+<N> -s <N> -s +<N> Use the --size (or -s) option to choose the size of the output image. If this option is not given, then the output image will be just large enough to contain all the files, with not much wasted space. To choose a fixed size output disk, specify an absolute number followed by b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or Exabytes. This must be large enough to contain all the input files, else you will get an error. To leave extra space, specify "+" (plus sign) and a number followed by b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or Exabytes. For example: --size=+200M means enough space for the input files, and (approximately) an extra 200 MB free space. Note that virt-make-fs estimates free space, and therefore will not produce filesystems containing precisely the free space requested. (It is much more expensive and time-consuming to produce a filesystem which has precisely the desired free space). --format=<fmt> -F <fmt> Choose the output disk image format. The default is "raw" (raw sparse disk image). For other choices, see the qemu-img(1) manpage. The only other choice that would really make sense here is "qcow2". --type=<fs> -t <fs> Choose the output filesystem type. The default is "ext2". Any filesystem which is supported read-write by libguestfs can be used here. --partition --partition=<parttype> If specified, this flag adds an MBR partition table to the output disk image. You can change the partition table type, eg. --partition=gpt for large disks. Note that if you just use a lonesome --partition, the Perl option parser might consider the next parameter to be the partition type. For example: virt-make-fs --partition input.tar output.img would cause virt-make-fs to think you wanted to use a partition type of "input.tar" which is completely wrong. To avoid this, use -- (a double dash) between options and the input and output arguments: virt-make-fs --partition -- input.tar output.img For MBR, virt-make-fs sets the partition type byte automatically. SHELL QUOTING
Libvirt guest names can contain arbitrary characters, some of which have meaning to the shell such as "#" and space. You may need to quote or escape these characters on the command line. See the shell manual page sh(1) for details. SEE ALSO
guestfish(1), virt-format(1), virt-resize(1), virt-tar-in(1), mkisofs(1), genisoimage(1), mksquashfs(1), mke2fs(8), resize2fs(8), guestfs(3), Sys::Guestfs(3), <http://libguestfs.org/>. BUGS
When reporting bugs, please enable debugging and capture the complete output: export LIBGUESTFS_DEBUG=1 virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1 Attach /tmp/virt-make-fs.log to a new bug report at <https://bugzilla.redhat.com/> AUTHOR
Richard W.M. Jones <http://people.redhat.com/~rjones/> COPYRIGHT
Copyright (C) 2010-2012 Red Hat Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. libguestfs-1.18.1 2013-12-07 virt-make-fs(1)
All times are GMT -4. The time now is 11:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy