Hot answers tagged

60

An ISO file isn't a file system. It contains a file system. From a usage point of view, it functions the same way as a hard disk or USB device or DVD - you need to have a mount point, i.e. a place in your file system where you can mount it in order to get at the contents.


37

There are three separate concepts here: A block device, which is a physical or virtual device that represents a series of equal sized data blocks. HDDs are block devices. So are data CDs. A filesystem, which defines a way of storing data in a block device that represents a series of files and directories and other filesystem information. ext3 is a file ...


10

No, the ISO image file is not a file system in its own right. Just like a partition can contain a file system, but isn't a file system, does an ISO image file contain a file system, but it isn't a file system. But you need a file system for two things: a place to store the .iso file (assuming if it doesn't come as a shiny silver disc) a directory where to ...


8

Given that this is a log file, here's the most likely explanation: There is a process that has the file open and keeps appending to it. Currently that's process 22252, there may have been other processes in the past (previous instances of the same application). At some point in the past, someone truncated the file. Truncating the file to a certain position ...


8

If you want to prevent disk writes as much as possible, you can do this with Laptop Mode. One of the features of laptop mode is to allow a disk to spin down and to prevent the kernel from writing to it until memory gets full or until a timeout occurs (or until the disk needs to spin up in order to read data from it). See also the Arch Wiki. You'll presumably ...


5

Do not add yourself to the root group, this many have many unintended side effects granting more than you intended. These directories are intentionally not writable by normal users. In the event you need to make manual changes to them (which will be rare), you can perform those operations as root via sudo.


4

By default, all writes are asynchronous. You can configure them to be synchronous at the application level O_DIRECT|O_SYNC open(2) flags, or at the file system one (-o sync option of the mount command).


4

It's probably a sparse file, i.e. a file that is largely empty, and where not all the disc blocks needed for the full size have been allocated. Using dd if=/dev/zero bs=1 count=1 seek=1E of=sparse I just made a file with an apparent size of 1 EB and I don't have that much disc space: grove@cassiopeia> ls -lh sparse -rw-r--r-- 1 grove grove 1.1E Apr 10 ...


3

From your output, the disk /var/dev/ada0p6 seems to be so full that you are now using "reserved space". Usually, 8-10% of disk space are "reserved" (i.e. only root processes can allocate space once disk usage exceeds 90%). Once this happens, free space is reported as a negative number.


3

A disk should grant that a sector is written atomically. The sector size was 512 bytes and today is typically 4096 bytes for larger disks. In order to get no problem from partially written "blocks", it is important to write everything in a special order. Note that the only reason why there could be a partially written part in the filesystem is a power ...


3

ZFS detects disks not by their name in the filesystem, but by their UUID that is written onto the disk (or at least something similar -- not 100% sure that it's actually a UUID). When zpool import runs, the disks are enumerated, ZFS rebuilds all the pools, and then uses the device name (without actually including any directory IME, usually it's something ...


2

You can use bind mount to simulate hard linking directories sudo mount --bind /some/existing_real_contents /else/dummy_but_existing_directory sudo umount /else/dummy_but_existing_directory


2

The code that generates this file is in the unix_seq_show() function in net/unix/af_unix.c in the kernel source. Looking at include/net/af_unix.h is also helpful, to see the data structures in use. The socket path is always the last column in the output, and the Android kernel source matches the stock kernel in this respect. So unless I'm mistaken, that ...


2

Strictly speaking stat -f doesn't differentiate between ext2, ext3 and ext4. Instead, it just shows them as ext2/ext3 and probably ext2/ext3/ext4. So, it is not good ideat to use stat -f to check specific ext type file-system. You can use df -T from coreutils for such purpose. From manpage: NAME df - report file system disk space usage ...


2

I think what happened is you did try to reduce lvm size before getting filesystem shrink. Should do resize2fs to shrink filesystem before lvmreduce Do not mount it. You might end up getting filesystem corruption. Check if you have vg metadata backup it is under /etc/lvm/ when you modify vg it puts there as default since you have access to there check it ...


2

The c in the first column of the ls output means this is a character device file. It is not a regular file and it doesn't really have "contents". When you open and read from a regular file, the kernel runs standard code that fetches the file's data from your hard drive (or similar storage). But when you access a device file, the kernel runs code (the ...


2

The Unix/Linux system offers the POSIX system calls open(2)/close(2)/read(2)/write(2) and stat(2) and some higher-level functions like opendir(3)/closedir(3)/readdir(3), which are enough to write the tools stated (it is easier using the C wrappers). Part of the hard job of the kernel is precisely to make them work on the various filesystems offered, and make ...


2

No. The mount options trump all. That's what they're for: to ensure that nothing ever gets executed directly from that filesystem. To counter noexec, you can run most programs indirectly by invoking their launcher: If the program is a script (starting with a shebang), invoke the interpreter and pass it the script as its first argument. If the program is a ...


2

This is normal behaviour. Mounted filesystems are normally not re-exported by nfs. You have to share both. E.g. you can add this to MachineA exports: /data/Storage MachineB(rw,sync,no_subtree_check,no_root_squash) You might also need to add crossmnt option into the /data options in exports of MachineA or nohide to /data/Storage options in order ...


2

Umm... it's pretty simple: a queue. One disk: one queue. It doesn't matter whether two tasks are trying to access different files in one partition, or two different partitions; both requests go into a queue and the disk driver services them one at a time.


2

According to Red Hat's (rather old) page 12.5. Verifying Asynchronous I/O Usage, asynchronous I/O is supported using libaio. Applications either are, or are not linked with that library. There is nothing mentioned about enabling or disabling: applications simply use the library. The page says you can verify usage by inspecting /proc/slabinfo. In my ...


1

Good morning! Following the advices of @Guido, I saw that I need to reboot the system (error 2) and that's what I did. The only problem that I got was that the server wasn't booting anymore which leads me to the @frostschutz's comment (call your hoster). And it works, they allowed me new temp inodes and the restart made my inode count back to 256 000 (or ...


1

The answer above is correct in that the reserved space is being subtracted from that available, leaving you with a negative amount of space usable by non-root users. You ask how to remove the error. You can either— free disk space; expand the filesystem; or reduce the size of the reserved area. On an ext3/4 filesystem you use tune2fs to set this ...


1

Yes, it's perfectly safe. It's mentioned in the manpage for mount(). Since Linux 2.4 a single filesystem can be visible at multiple mount points, and multiple mounts can be stacked on the same mount point. I think mmp is something else. Something about mounting a block device which is shared between multiple computers. So it's not ...


1

That depends on the underlying storage technology. Some storage allows a certain block size to be stored atomically, typically a power of 2 which is at least 256 and usually in the 1kB—4kB range. If that's the case, then the filesystem layer can replace blocks in place, provided that the replacement of the block yields a valid system state. This is fine ...


1

If you have a ext2/3/4 filesystem you can use debugfs for a low-level look at an inode. For example, to play without being root: $ truncate -s 1M myfile $ mkfs.ext2 -F myfile $ debugfs -w myfile debugfs: stat <2> Inode: 2 Type: directory Mode: 0755 Flags: 0x0 Generation: 0 Version: 0x00000000 User: 0 Group: 0 Size: ...


1

Thanks for Edouard Fazenda and thrig. I have solved this problem with their help. I mounted my /home with fourth field rw,relation,user. After read some doc,I use fourth field rw,relation,exec,suid. Now everything goes fine!Thanks again.


1

On any POSIX system, the interface between applications and the kernel is a few function calls: open, read, write, close, etc. An application such as cat calls those functions; it doesn't care how the functions are implemented under the hood. On Unix systems, those functions are actually system calls: the application calls the kernel. Inside the kernel, a ...


1

For most tools, the underlying layer is the C Standard Library ("libc"). libc provides a number of low-level file handling routines, such as open, read, and write. These routines in turn interface to the filesystem layer in the kernel, which sits on top of the kernel's block device layer, the device drivers, and finally the hardware. One implementation of ...


1

sounds like a job for eatmydata ( http://www.makelinux.net/man/1/E/eatmydata ) in debian, try something like apt-get install eatmydata; printf "\nLD_PRELOAD=libeatmydata.so" >> /etc/ld.so.preload reboot



Only top voted, non community-wiki answers of a minimum length are eligible