WD Red Drive 1Kb file takes up 1Mb on my fileserver
Hi All,
My first time, posting a question. Quick summary here, I have a 6Tb WD RED NAS drive that I am re-using as my data drive, just in a new Debian 9.6 system. My Problem: When I save a 1Kb text file on the HD, my windows PC reports "Size on Disk" as 1Mb Issue is I have done everything I understand is required to make the block size 4Kb for general file storage. If I run: sudo fdisk -l Code:
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors It returns 4096 As far as I know, this should mean that 1Kb file should take up 4Kb on the 6TB WD RED NAS drive. The filesystem I put on the sdb1 partition was ext4 and I did so with the following command: Code:
sudo mkfs.ext4 /dev/sdb1 Some additional information which may be relevant: This HD was used twice before. Once was in a ubuntu server system the same as this setup but I never noticed if the files were using 1Mb as a minimum. The second time was a Dell T610 server with a Dell Perc H700i RAID card with ESXI, I discovered that ESXI VMFS was limited to 1Mb block size by default and later decided that I was loosing too much space and that a virtualized file server through a normal RAID card that wasn't set for pass through probably wasn't the best idea versus a standalone dedicated file server. So during the setup of the ESXI Datastore I created and initialized the virtual disk as a single drive RAID 0, and given the 1Mb limit of the VMFS I might have set the stripe size as 1Mb during this process, however even if I did do it, as far as I know this stripe size should only affect the virtual disk which no longer exists as this HD is now in an old Dell Vostro 260 Desktop and is nowhere near the H700i RAID card. So is it possible I have overwritten the "geometry" of the hard drive with the RAID card? Any help is appreciated, Kind Regards, Velenon. |
What does
Code:
tune2fs -l /dev/sdb1 | grep "Block size" |
Hi Ser Olmy, thanks for the reply.
Returns Block Size: 4096 Would dump of the full file help? I compared the full file to the partition on my VPN server on my ESXI Box and it was pretty much the same, the following lines were different: WD RED Inodes per group: 4096 Inode blocks per group: 256 VPN Server Inodes per group: 8192 Inode blocks per group: 512 |
Just what, in Windows, is reporting that file size as 1 MB? Note that in Linux, a "du -m" command would also show that size as "1 MB" because it is answering the question, "How many blocks of size 1MB would it take to hold this file?"
|
Hi rknichols, thank you for raising some skepticism on the part of what is doing the reporting, it helped me find the answer.
I just automatically trusted the windows 10 folder properties window as correct. I did a test and made a 15 byte txt file and put it on both the SSD and the HD of the file server in question and checked it with my windows 10 PC and a Windows 7 PC on the network. The windows 10 PC reported size on disk as 1Mb but with the same file The windows 7 PC reported size on disk as 1Kb so it seems the issue isnt with the linux install this is a Windows 10 issue. Anyway I checked and my windows PC reports that my total actual combined file size in the share is 4.02Tb for /Data_1 and I ran "sudo df /dev/sdb1" on the fileserver and it reported blocks of 1K and the total used space as 4.03Tb so I'm happy that the linux system is functioning correctly. Thank you everyone for the help. |
All times are GMT -5. The time now is 03:38 PM. |