- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Block size
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
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
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
03-06-2006 07:19 AM
03-06-2006 07:19 AM
I understand the concept of the 512 or 1024 block sizes or so I think. If while using the du -ak command the file size comes back as 280 then logic tells me that 1024 * 280 = 286720 bytes. But when I check the same file using Windows I get 184380 bytes or 192512 bytes as the size on disk which makes sense because of the block size. But 192512 does not equal 286720 why?
Thanks,
Conrad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 07:32 AM
03-06-2006 07:32 AM
Re: Block size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 08:02 AM
03-06-2006 08:02 AM
Re: Block size
For example:
ls -la
-rw-r--r-- 1 ferreiri ferreiri 119 Jan 16 18:53 test
du -ak test
1 test
The file has 119 bytes but it uses a whole disk block. It cannot use less than one full disk block.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 08:05 AM
03-06-2006 08:05 AM
Re: Block size
pfwpg02:/mbr_lib/bas/a31/4_/mb $ ls -l a314_mb
total 544
-rwxrwxr-x 1 lewisr lib 2304 Mar 18 1999 aat.adf
-rwxrwxr-x 1 lewisr lib 170772 Mar 18 1999 arc.adf
-rwxrwxr-x 1 lewisr lib 676 Mar 18 1999 arx.adf
-rwxrwxr-x 1 lewisr lib 1152 Mar 18 1999 cnt.adf
-rwxrwxr-x 1 lewisr lib 364 Mar 18 1999 cnx.adf
-rwxrwxr-x 1 lewisr lib 32 Mar 18 1999 dblbnd.adf
-rwxrwxr-x 1 lewisr lib 80 Mar 18 1999 dbltic.adf
-rwxrwxr-x 1 lewisr lib 1892 Mar 18 1999 lab.adf
-rwxrwxr-x 1 lewisr lib 1539 Mar 18 1999 log
-rwxrwxr-x 1 lewisr lib 3292 Mar 18 1999 pal.adf
-rwxrwxr-x 1 lewisr lib 260 Mar 18 1999 par.adf
-rwxrwxr-x 1 lewisr lib 924 Mar 18 1999 pat.adf
-rwxrwxr-x 1 lewisr lib 364 Mar 18 1999 pax.adf
-rwxrwxr-x 1 lewisr lib 729 Mar 18 1999 prj.adf
Which totals 184830.
In windows I'm just using windows explorer and right clicking on the file and selecting properties. Which represents what windows is indicating for the file size not the size on the disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 08:06 AM
03-06-2006 08:06 AM
Re: Block size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 08:07 AM
03-06-2006 08:07 AM
Re: Block size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 08:26 AM
03-06-2006 08:26 AM
Re: Block size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 08:45 AM
03-06-2006 08:45 AM
Re: Block size
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2006 09:44 AM
03-06-2006 09:44 AM
SolutionThis means that a 19, 190, and 1024 byte file will occupy 1 filesystem block -- assuming the vxfs filesystem's 1K block size.
It really gets complicated when sparse files come into the picture.
Consider writing 'X' at offset 0 and then doing a lseek to offset 999,999 and writing another 'X'. A total of two bytes of data will have been written. Because these crossed block boundaries, 2 filesystem blocks will have been written and 2 will be ported by du -ak, but ls -l will report 1,000,000 as the file length. All of these are "correct". Sparse files also make it possible to tremendously overcommit a filesystem so that like much more data (as totaled by ls -l) might be there than the filesystem could actually hold. When sparse files are read, the "missing" data are filled in with ASCII NUL's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 12:46 AM
03-07-2006 12:46 AM
Re: Block size
Cheers,
Conrad