[root@localhost ~]# touch sample
touch: cannot touch ‘sample’: Read-only file system
[root@localhost ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvda2 ext3 25G 1.7G 22G 8% /
devtmpfs devtmpfs 908M 0 908M 0% /dev
tmpfs tmpfs 917M 0 917M 0% /dev/shm
tmpfs tmpfs 917M 25M 893M 3% /run
tmpfs tmpfs 917M 0 917M 0% /sys/fs/cgroup
/dev/xvda1 ext3 240M 199M 29M 88% /boot
tmpfs tmpfs 184M 0 184M 0% /run/user/1002
[root@localhost ~]# fsck /dev/xvda2
fsck from util-linux 2.23.2
e2fsck 1.42.9 (28-Dec-2013)
/dev/xvda2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (5923324, counted=5928007).
Fix? yes
Free inodes count wrong (1576667, counted=1576966).
Fix? yes
/dev/xvda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/xvda2: ***** REBOOT LINUX *****
/dev/xvda2: 45050/1622016 files (9.0% non-contiguous), 559801/6487808 blocks
[root@localhost ~]# fsck /dev/xvda2
fsck from util-linux 2.23.2
e2fsck 1.42.9 (28-Dec-2013)
/dev/xvda2: clean, 45050/1622016 files, 559801/6487808 blocks
[root@localhost ~]# reboot
[root@localhost ~]# touch test
[root@localhost ~]# stat test
File: ‘test’
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: ca02h/51714d Inode: 925711 Links: 1
Access: (0644/-rw-r–r–) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-02-19 00:36:12.095415000 -0500
Modify: 2018-02-19 00:36:12.095415000 -0500
Change: 2018-02-19 00:36:12.095415000 -0500
Birth: –
