Saturday, November 3, 2012

How to find Filesystem type in Redhat Linux?

Three ways to find as shown below:

Method 1:
[root@client1 ~]# file -s /dev/vdb1
/dev/vdb1: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents)
[root@client1 ~]#
[root@client1 ~]# file -s /dev/vdb2
/dev/vdb2: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
[root@client1 ~]#
[root@client1 ~]# file -s /dev/vdb3
/dev/vdb3: Linux rev 1.0 ext2 filesystem data (mounted or unclean)


Method 2:
[root@client1 ~]# df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg_client1-lv_root
              ext4    18102140   6189956  10992632  37% /
tmpfs        tmpfs      510416        88    510328   1% /dev/shm
/dev/vda1     ext4      495844     32891    437353   7% /boot
/dev/vdb1     ext4       46601      4875     39320  12% /VDB1
/dev/vdb2     ext3       38669      4592     32081  13% /VDB2
/dev/vdb3     ext2       91219      1550     84959   2% /VDB3



Method 3:
[root@client1 ~]# mount
/dev/mapper/vg_client1-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/vda1 on /boot type ext4 (rw)
/dev/vdb1 on /VDB1 type ext4 (rw)
/dev/vdb2 on /VDB2 type ext3 (rw)
/dev/vdb3 on /VDB3 type ext2 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

No comments: