What's the filesystem story, morning-glory?
May 6, 2008 3:25 PM   Subscribe

Is there a utility to tell me what kind of filesystem my current working directory is, and it's limits?

At home, I have lots of PCs networked together, under a variety of OSs. These machines tend to have a lot of network shares mounted between each other. The actual mounted filesystems are usually one of NTFS, Fat32, or ext3/4. Knowing where where-you-are-now is physically at is not always obvious. More than once I've had problems because I'll start an operation on a 7gb local file, writing to a remote mount/drive, only to have it crap out once the remote filesize reaches ~4gb.

Is there a simple command line tool I can use to tell me what the filesystem limits are in my current directory?

Bonus question, do you know if using samba/cifs as sharing mechanism will interfere with large files even when the remote filesystem is otherwise capable?
posted by nomisxid to Computers & Internet (7 answers total)
 
On Unix systems (Mac OS X too) try "df directory-name" for free space, and "mount" shows you everything that's currently mounted on the system.
posted by phliar at 4:06 PM on May 6, 2008


Response by poster: df doesn't report max filesize, only available freespace.
mount doesn't tell you anything about what type of filesystem a remote mount is, only what type of network you used, aka cifs.
posted by nomisxid at 4:16 PM on May 6, 2008


Someone who knows more about network storage might be more helpful, but I have doubts this is even possible for network shares. There would have to be some sort of support in the protocol you're using (smb, nfs, whatever) to query for the filesystem type and space available. If this isn't exposed by your OS, I'm guessing the reason is that there is no way to expose the information.
posted by zixyer at 4:56 PM on May 6, 2008


Response by poster: 1. not "space available", max FILESIZE
2. I know that cifs does provide this information between remote systems, you can get a windows error message that specifically states the remote filesystem isn't compatible with your filesize, which is different than the error message it gives when there isn't sufficient free space.
posted by nomisxid at 5:06 PM on May 6, 2008


I think that the only information easily available on unix is easily available through the stat(1) command:

$ stat -f /
File: "/"
ID: 51e2c86b028235be Namelen: 255 Type: ext2/ext3
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 22217081 Free: 1769390 Available: 640824
Inodes: Total: 11288576 Free: 11002846


this specifically doesn't include maximum file size, as you probably noticed.
posted by jepler at 5:46 PM on May 6, 2008


there's also pathconf(3) / getconf(1) but this API also doesn't include maximum file size.
posted by jepler at 5:49 PM on May 6, 2008


The easiest and most reliable way to determine whether a filesystem can support a file of a particular size is to try to create one. On any filesystem you are likely to encounter, this will require next to no time and very little disk space, because only blocks written to will actually be allocated.
posted by kindall at 12:09 AM on May 7, 2008


« Older Undelete a T-Mobile voicemail?   |   Drinking on the highrise? Newer »
This thread is closed to new comments.