File last access time. How to mount root filesystem with atime,norelatime [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've installed a simple LAMP system based on Debian 7.2.0 (32 bits). On my server I want to know when each of PHP files was used (accessed) by web server. When I check last access times of php files (with command ls -alu), they are wrong.
I've found that it is because of relatime option used for mounting of the root filesystem. I've tried to edit my /etc/fstab and to put norelatime,atime options there but it does not work. My current /etc/fstab is:
UUID=d4bb10f1-1428-4ee4-916c-55e800263c3f / ext4 atime,norelatime,errors=remount-ro 0 1
UUID=6db7a3c7-6ff9-43ac-b959-5175039bb84b none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
After a reboot, when I type mount, I get:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=127786,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=103240k,mode=755)
/dev/disk/by-uuid/d4bb10f1-1428-4ee4-916c-55e800263c3f on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=352700k)
All the partitions have relatime option. Any help?

http://www.linux-archive.org/fedora-development/120241-why-relatime-immune-remount.html and https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/582799 indicate that this does not work on Fedora or Ubuntu, and presumably the same is true for Debian. To quote from the first linked article:
You have to:
echo 0 > /proc/sys/fs/default_relatime
and then mount/remount with 'atime' and it should work.

Related

How can I understand how much space there is on a Linux hard drive? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I am not so into Linux and I have the following problem: I have to discover how much is the sapce of an hard drive of a server (it should be a virtual machine, I don't know if it makes some difference). I performed the following statment obtaining this output (I am absolutly not sure if it is the right way):
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 797M 912K 796M 1% /run
/dev/sda3 64G 5.3G 56G 9% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/loop0 87M 87M 0 100% /snap/core/4486
/dev/loop1 90M 90M 0 100% /snap/core/6818
tmpfs 797M 0 797M 0% /run/user/1021
I can only use terminal because I am connected vis SSH.
But I am not understanding what represents my storage drive? How can I understand it? What is it?
As I understand it, sda, sdb, sdc, etc. is referring to the physical/virtual hard drive. You can think of them like C:, E: etc. on Windows. The number '3' in this case is referring to a partition on the drive. Since this partition is mounted to root or '/' this is most likely the main partition on your drive.
So to answer your actual question on /dev/sda3 it looks like you have 56GB available out of 64GB.

write error disk full in EC2 Machine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have my EC2 linux instance where some softwares are installed.
I downloaded a new zip and was trying to unzip it.
I got this error write error (disk full?). Continue? (y/n/^C) n
The zip is not corrupted and I can unzip it from other instances.
I change instance type from small to medium and then large.Nothing worked.
I ran df -h .
$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 56K 16G 1% /dev
tmpfs 16G 0 16G 0% /dev/shm
/dev/xvda1 9.8G 9.7G 0 100% /
I think /dev/xvda1 is culprit. How can i increase the size of this?
What is this /dev/xvda1
It is not a matter of instance type. You must change the volume (EBS) size.
Go to console and select the EBS of that instance , click action dropdown menu , then click modify volume ( A form will appear with the current volume size, increase it )
Try to remove some kilobytes to be able to run (3). rm -rf /tmp/* for example.
Grow/Expand your filesystem :
sudo growpart /dev/xvda 1
sudo resize2fs /dev/xvda1
NOTES :
check Step(1) by lsblk command and check step (3 ) by df -h
Scale down your instance before receiving a huge billing the end of month 😅 ( Let it small as it was )

ubuntu 14.04 disk full [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
when i run df -h on my ubuntu 14.04 laptop i see the following:
pdp2907#pdp2907-Satellite-C655:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 933M 4.0K 933M 1% /dev
tmpfs 189M 1.1M 188M 1% /run
dev/mapper/ubuntu--vg-root 228G 215G 1.1G 100% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 943M 11M 933M 2% /run/shm
none 100M 36K 100M 1% /run/user
/dev/sda1 236M 44M 180M 20% /boot
the /dev/mapper/ubuntu--vg-root is full.
how do i correct the problem please.?
thanx for all your support
You need to know what data is on it. So far I assume you have a whole OS in / only. What you can do is, for example, move some content to anoter volume (disk) and either mount it or make a symbolic link. I personally place /usr to a separate volume, and my /opt is a link. Then the root partition does not need to be so huge. But in your case the root has over 200 Gb what seems a bit more than the OS only :). Explore the files over there, perhaps you also find some movies if the user's home directories are also there...
find / -size +100M
The command above might be helpful to search for files over 100 Mb size (normally should not appear in root filesystem)
In order to free up disk space in dev/mapper/ubuntu--vg-root you can remove cached files with the following command:
sudo apt-get clean
You still can free up more space by uninstalling packages that are not required anymore:
sudo apt-get autoremove

df -i and df-h , my server full weird issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have the following output when I use df-i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda3 17465344 17400194 65150 100% /
none 3085175 2 3085173 1% /sys/fs/cgroup
udev 3082347 440 3081907 1% /dev
tmpfs 3085175 409 3084766 1% /run
Then when i df -h
root#Ubuntu-1404-trusty-64-minimal /var/www/html/manga # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 263G 67G 183G 27% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 12G 4.0K 12G 1% /dev
tmpfs 2.4G 644K 2.4G 1% /run
The problem is df -i , it return a 100% full which causes my apache2 &mysql unable restart or working well due to lack of disk space. any idea how do I increase my /dev/sda3 size on df -i because my df -h show that I only use 67% of the same place.
Thanks
Your problem isn't related with python. Your filesystem is full of files, and the inodes are exhausted.
These questions are related with your problem: https://unix.stackexchange.com/questions/26598/how-can-i-increase-the-number-of-inodes-in-an-ext4-filesystem and https://serverfault.com/questions/593298/how-to-increase-inodes.
I'm sorry for my English, a long time ago than I don't write in English.
This isn't a correct answer, probably a comment, but I'm not allowed to make comments.

Why can't I save a VI file after entering data? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am new to linux, when I typed "vi FILE1" I was able to open VI editor. I added some data and I want to save the file and I tried :w but it threw me an error.
"file1" E212: Can't open file for writing
Press ENTER or type command to continue
why I am not able to save it?
The directory in which I am creating file has following permissions:
drwxr-xr-x 4 pentaho pentaho 4096 Mar 12 2013 master
I am logging using root user and password.
Output of mount command :
/dev/sda1 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/sdb1 on /etl type ext4 (rw)
/dev/sdc1 on /oracle type ext4 (rw)
/dev/sdd1 on /export type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
You can also get this error if the directory you are trying to save to does not exist. Even the root user will get this error.
When you log in linux with your common user, you are logged with the user you created, but you are not superuser (you do not have all permissions). To execute a program with root priviliges (and therefore have all permissions), you have to add the command sudo. So you should run: $> sudo vi FILE1. This will ask you for the password and then you use vi normally
If you are facing issue in vi, try to create directory manually and edit the file. May be you don't have access to create directory/file.

Resources