HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ll command list the same size in files between two...
Operating System - HP-UX
1835272
Members
2436
Online
110078
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
02-09-2007 04:53 AM
02-09-2007 04:53 AM
I have two itanium servers, one primary and the other backup, they have almost the same data. There is one directory in both servers, containing the same files, ll command show in the first line the total size of the directory and the size of every file, the servers show the same size for every file, but a very different amount about the total size between both servers (about 20 times more in one server). I used lsof command, but there are not files of this directory in the list. bdf command show a difference about 15% between both servers, and du command show differences too. What can i do if i need the same physical size of the files in both servers?
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2007 05:04 AM
02-09-2007 05:04 AM
Solution
First, don't be concerned about differences in sizes of directories, that is to be expected as one directory may have many deleted entries while the other may have few. What you are seeing is almost cerinly the result of sparse files. Consider a file that writes 1 byte at offset 0 and then does an lseek to offset 1024*1024 -1 and writes one bytes. You now have a file that has 2 real bytes but ls -l will show the size as 1MiB. When a sparse file is read, the "missing" bytes are silently filled in with ASCII NUL's. If you copy a sparse file to another file, the holes are filled in and the new file actually uses all the space. To "fix" your problem (which really isn't a problem), you need to copy your files and then copy them back to the original locations or use a transfer mechanism liker fbackup which can preserve the sparse data.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2007 05:05 AM
02-09-2007 05:05 AM
Re: ll command list the same size in files between two servers but different total size
Hi:
I am not surprised by your observations. As files are added to a directory, the space consumed for the directory's metadata (the information *about* its contents) increases. As files are deleted, however, the directory's allocated space is not returned; rather only freed for reuse.
A very common observation is to copy a directory and all of its contents to a new directory and find taht the the overall size of the new directory and its contents is less than the old one.
If you wish to assure yourself that the contents of two directories are equal, checksum every file therein in both directories. An equality in the checksums of every file assures you that the directories are "equivalent". Size matters not.
Regards!
...JRF...
I am not surprised by your observations. As files are added to a directory, the space consumed for the directory's metadata (the information *about* its contents) increases. As files are deleted, however, the directory's allocated space is not returned; rather only freed for reuse.
A very common observation is to copy a directory and all of its contents to a new directory and find taht the the overall size of the new directory and its contents is less than the old one.
If you wish to assure yourself that the contents of two directories are equal, checksum every file therein in both directories. An equality in the checksums of every file assures you that the directories are "equivalent". Size matters not.
Regards!
...JRF...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP