- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do I create a large file (>2GB)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:45 AM
тАО08-27-2004 01:45 AM
I want to test the largefile option on my VxFS filesystem. How can I quickly create a large file >2GB?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:49 AM
тАО08-27-2004 01:49 AM
SolutionThis creates a 3 GB sparse file. IO error = no largefile capability. No IO error = normal completion. ll() file = 3gb file
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:52 AM
тАО08-27-2004 01:52 AM
Re: How do I create a large file (>2GB)
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:55 AM
тАО08-27-2004 01:55 AM
Re: How do I create a large file (>2GB)
Use the prealloc command to create a file of any size.
Since 2GB is 1024 * 1024 * 2 = 2,097,152 then it has to be larger - so
prealloc large_filename 2098000 would suffice
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:56 AM
тАО08-27-2004 01:56 AM
Re: How do I create a large file (>2GB)
dd if=/dev/zero of=/yourfile count=20
This will create a file 20*512 bytes.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:59 AM
тАО08-27-2004 01:59 AM
Re: How do I create a large file (>2GB)
prealloc filename 2100000
would be more appropriate!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 01:59 AM
тАО08-27-2004 01:59 AM
Re: How do I create a large file (>2GB)
2098000000
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 02:01 AM
тАО08-27-2004 02:01 AM
Re: How do I create a large file (>2GB)
prealloc testfile 25000000
prealloc(1) prealloc(1)
NAME
prealloc - preallocate disk storage
SYNOPSIS
prealloc name size
DESCRIPTION
prealloc preallocates at least size bytes of disk space for an
ordinary file name, creating the file if name does not already exist.
The space is allocated in an implementation-dependent fashion for fast
sequential reads and writes of the file.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 02:13 AM
тАО08-27-2004 02:13 AM
Re: How do I create a large file (>2GB)
My calculation *should* have been
1000 * 1024 * 1024 *2 = 2,097,152,000
Hence 2089000000 is correct & your 2100000000 would be OK.
Prealloc operates in bytes - not Kbytes
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 02:18 AM
тАО08-27-2004 02:18 AM
Re: How do I create a large file (>2GB)
;^)
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 02:20 AM
тАО08-27-2004 02:20 AM
Re: How do I create a large file (>2GB)
I also tried the dd option on my Solaris boxes (since prealloc is not available on SOlaris). It seems that Veritas VxFS filesystem has the largefile option already on by default because it is not bombing like it is on my HP boxes. Can anyone verify this? I am running Veritas 3.5.
Anthony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 02:23 AM
тАО08-27-2004 02:23 AM
Re: How do I create a large file (>2GB)
#fsadm /mnt_point
If it doesn't return largefiles - then it's not on.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 02:28 AM
тАО08-27-2004 02:28 AM
Re: How do I create a large file (>2GB)
Maintenance Commands mkfile(1M)
NAME
mkfile - create a file
SYNOPSIS
mkfile [ -nv ] size [k | b | m ] filename ...
DESCRIPTION
mkfile creates one or more files that are suitable for use
as NFS-mounted swap areas, or as local swap areas. When a
root user executes mkfile(), the sticky bit is set and the
file is padded with zeros by default. When non-root users
execute mkfile(), they must manually set the sticky bit
using chmod(1). The default size is in bytes, but it can be
flagged as kilobytes, blocks, or megabytes, with the k, b,
or m suffixes, respectively.
for a 4GB file:
mkfile testfile 4196M
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2004 06:46 AM
тАО08-27-2004 06:46 AM
Re: How do I create a large file (>2GB)
fsadm -F vxfs /var
fsadm -F vxfs /dev/vg00/rlvol8
(note the use of rlvol8, not lvol8). Note also that you need to add the largefiles option in fstab. This is also a check to make sure the filesystem supports largefiles..if it doesn't then mount will fail. You can change any vxfs filesystem to add support for largefiles with fsadm.
Bill Hassell, sysadmin