0

By running df -hT that shows mounted file systems, how can I know if my default FS is ext4?

Also as mentioned by one of the MongoDB engineers in this video (@1:13) from M202: MONGODB ADVANCED DEPLOYMENT AND OPERATIONS (excellent class btw), one should not be getting "Filling with zeros" message in the log file, which I clearly see they're there.

And also, does /boot in Mounted On column below indicates that this /dev/sda1 FS is in fact default ext3 for mkdir /mongodb command?

**df -hT**

Filesystem                                   Type   Size  Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root                   ext4    97G  2.4G   90G   3% /
tmpfs                                        tmpfs  3.9G     0  3.9G   0% /dev/shm
/dev/sda1                                    ext3   194M   59M  125M  33% /boot
swdclinx1:/xenv                              nfs    2.5T  1.4T  1.1T  57% /xenv
stealth:/export1/home1.localhost/sw/Linux    nfs    1.4T  713G  712G  51% /net/stealth/export1/home1.localhost/sw/Linux
stealth:/export1/home1.localhost/sw/outbound nfs    909G  198G  712G  22% /net/stealth/export1/home1.localhost/sw/outbound
Ostati
  • 103
  • 2
  • 1
    Why do you care what the "default" is? Just specify whatever fs you want when creating it. – EEAA Jan 23 '15 at 04:10

1 Answers1

2

Based on the output you provided, we can surely state that:

  1. You have the /dev/sda1 partition containing an EXT3 filesystem mounted under the /boot mountpoint of your current folder tree (so, everything you'll store under "/boot" will be stored in an EXT3 filesystem). It's safe to assume that this partition has been used to "boot" your system;

  2. You have the /dev/mapper/rootvg-lv_root logical-volume, containing an EXT4 filesystem mounted as the root (/) of your folder tree (so, everything you'll store under "/" [...but not under other existing/defined mount-points, as "/boot" above], including /mongodb, will be stored under an EXT4 filesystem);

  3. you have also two other remote filesystems mounted under /net/... and accessed via the NFS protocol, as well as a tmpfs file system used for system specific tasks.

Having said that, please, let me add that:

  1. the concept of "default FS" that you mention twice in your question, is misleading: it does NOT exist a "default" filesystem: there are plenty of them EXT2, EXT3, EXT4, XFS, BTRFS (and lots of others, unix-related) as well as FAT16, FAT32, NTFS (tipically windows related), as well as HFS, HFS+ (tipically MACOS related). You will choose which one to use every time you "format" your data-container (be it an hard-drive partitions, a whole USB flash-disk, a logical volumes built on top of LVM utils, etc.)

  2. even if in some cases is possible to convert a filesystem to a different one (a classic windows-based examples is the convertion from FAT32 to NTFS), tipically this is not possible and to change the filesystem you need to save the contained data somewhere else, reformat the container with your desired filesystem and copy the data back;

A final note, that might help in better understanding the relationship between the filesystem and the containing device:

  1. every time you check the usage of your disk space, the information that you get back (as in the output of the df -hT you provided) refer exactly to the filesystem, and not to the related containing device. This means that:

    • it's perfectly possible to have a 1TB disk partition containing 100GB of data and with only 50GB of free space. This 'cause the filesystem contained on such 1TB partition has been explicitely sized to 150GB (and not to the maximun available space offered by the partition itself);

    • when you need to enlarge your filesystem 'cause it's getting full and you need further space, the preliminary step of enlarging the containing partition is... preliminary! Right after enlarging the partition, you need to "adapt" the filesystem so for it to be able to access the new available space.

Damiano Verzulli
  • 4,078
  • 1
  • 21
  • 33
  • Thanks for the going the extra mile. I want to see if someone can chime in and shed some light on "Filling with zeros" log messages... – Ostati Jan 23 '15 at 06:05