New answers tagged

1

If a program has a file open when you delete it, the kernel only marks it as deleted, but doesn't free the disc space, to avoid breaking the program (it's can't know if the file is important to the function of the program). When the program closes the file the disc space is freed. When that happens you will see the "(deleted)" when you look at ...


0

I suspect transmission saves the file to a location unknown to you when downloading. After it is finished it creates a hardlink to that same file in your download folder, but still keeps the hardlink in it's own directory(probably ~/.transmission or something like that). You can find all hardlinks to the finished download as explained in How to find all ...


1

As you can see, what you're trying to do is not possible as you're moving files that are still open by another process, so they will continue to get updated properly, avoiding space that is already used by them. The free space reported is actually right, even if you don't see the files in the directory listing anymore. As long as the file is open by a ...


1

The read-only test only reads. That's basically the default testing method for just about everything and pretty much the same what disks do for SMART self-tests. The non-destructive read-write test works by overwriting data, then reading to verify, and then writing the original data back afterwards. The only way to verify that writing data works is by ...


1

This is because the device files you find in /dev aren't actually mount points *. They're just handy filesystem-based references to access the devices themselves. You can see a similar sort of hierarchy under /sys — particularly, look in /sys/block. Why is something like /dev/sda a special type of file rather than a directory under which there are ...


1

I believe Unix V1 would be run from a single disk. It had no real VFS. You can find the system filesystem at the root of the namespace, /. No indirection required; no SYSTEMROOT = c:/windows variable. Remember this was hand-written assembly code. Minimalist ideas were very useful. The ideas here are often described in terms of their elegance. I want to run ...


0

It's a convention. Simply called Filesystem Hierarchy Standard. There is nothing more to it. http://www.pathname.com/fhs/


3

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 ...


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

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

an inode wil store only one file. try find /xxx -xdev -inum 1234 -print where /xxx is mounting point -inum 1234 search for an inode number 1234 -print self explainatory This suppose /xxx is mounted an healthy.


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 ...


-2

Generally, all moderm OSes 'll have a system call for writing data to a file (in Linux we have write system call). And because all system call should be atomic. So writing the entire block size (using only 1 system call) will be atomic.


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 ...


1

There's a haskell project called "dotfs" that does something like what you're describing. This may be defunct, however. It would be easy to put something together in python using fusepy. I've attached a gist (based on fusepy-base) which does almost what you're asking, by simply running the contents of each file through a bash echo, and expanding everything ...


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 ...


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 ...


0

Do they just mark the space as "free"? Yes. "Removing" the file would take extra work and is in most cases unnecessary.


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.


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 ...


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.


0

As /u/jiliagre mentioned, you cat force O_SYNC with the file-open or at mount-time via -o sync flag, per device (you can remount most open mountpoints with mount -o remount,sync <mtpt>. Alternatively, you can tell the system to immediately schedule a flush every time it does a write (which "dirties a page"). When sync mode is not enabled, the ...


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).


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 ...


0

Ok, so i think i figured it out. Speaking about performance, BTRFS did the best job. I tried multiple linux based NAS, made all with the same hardware but with different filesystem. I used FIO (http://freecode.com/projects/fio) to run benchmarks as suggested by a Veeam Software white paper since I'm using their backup product ...


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 ...


0

rm -rf directory or rm -rf * of course is the fastest method unless your local rm implementation is broken. Using find gives no advantages. Whether this is fast or slow mainly depends on the filesystem and OS implementation. So the question seems to be inappropriate. UFS and ZFS on Solaris are known to be very fast with this kind of task as both ...


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.


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 ...


0

Here is a trick I found to set the default UID and GID of the Windows client to match the UID and GID of the nfs share. Here is a link to the full article Windows 7: Client for NFS and User Name Mapping without AD, SUA and here are the basic steps. 1) Run regedit on the Windows machine and locate ...


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 ...


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.


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 ...


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 ...


0

It looks like the only disk that remembers the "diskpool" pool is ata-ST8000AS0002-1NA17Z_Z840DG92, so what you can do is overwrite the label on that disk: # zpool create -f foo ata-ST8000AS0002-1NA17Z_Z840DG92 # zpool destroy foo That should prevent the "zpool import" command from seeing the long-defunct diskpool. Be careful to make sure that ...


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


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


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 ...


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 ...


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 ...


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 ...


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 ...


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 ...


0

Ok, found an answer on this very site: List the files accessed by a program explains that one can use LoggedFS or the Linux audit subsystem.


1

If you call a user script in the users home (editable by the user) with root permissions, that effectively means the user is root. From a security / principle of least privilege point of view, that's a very bad thing to do. Of course, in your case it might not matter. As long as you know what you are doing and what the possible repercussions are, and if you ...


1

This question is primarily opinion, but I'll go ahead and give you mine. In this case, I don't think it could be considered "bad practice", but in a larger (i.e. corporate) environment, it probably would be. On an RPi at home, go for it - if it were a corporate server that I were a co-admin on, I'd have to object to doing so.


0

Actually im learning about how to program using python and usually making many shell scripts for many purposes for many scenarios. And I have installed a Debian based distro with zfs and it work as well. I have an IDE disk drive with 120GB and a CPU Pentium IV up to 2.4 Ghz and belive me, it works very fast. I hope it will work for you. Just try it and ...


-2

There are two kinds of fsck, "normal" sudo fsck /dev/sdx and "full" sudo fsck -f /dev/sdx Your computer runs a normal fsck at every boot, which is really fast. fsck -f obviously takes longer, but in newer filesystems (ext4) it's still quite fast. With SSD might as well double that, and your fsck -f shouldn't take long at all. Warning: Never run ...


0

ReiserFS always performed well back in the day, when all we had were slow drives. I think ReiserFS has fallen out of favor, since Hans Reiser was convicted of murder, and it's not well-maintained, but it never had that many problems to begin with.



Top 50 recent answers are included