Hard disks sizes are limited by the number of bits used in the cylinder/head/sector.
In the distant past (ie 10years ago) you had to go to all sorts of lengths to remap CHS and extended LBA schemes so you could use a drive larger than 32mb than larger than 512Mb etc
Filesizes are limited by the number of bits used to specify the size. In FAT32 it's 32bits and so 4Gb files, in NTFS it's 64bits so very-very-very huge files (18Exabytes?). Sun's ZFS can store files of 256 pebi-zebibytes which is probably more than there are atoms to make the disk out of.
This is possible because disks are so much slower than memory it's not a problem to store a size in number longer than 32bits because the time needed by the CPU to read the parts of the number and add them together is so much less than the access time.
You could do this for memory and have a 64bit address space on a 32bit machine by storing each address in two values - it would be slow, but it's what we had to do to address 64K of memory on an 8bit machine.