filesystems

Why can't hard links reference files on other filesystems?

Why can't hard links reference files on other filesystems? I’m aware that this article exists: Why are hard links only valid within the same filesystem? But it unfortunately didn’t click with me. https://www.kernel.org/doc/html/latest/filesystems/ext4/directory.html I’m reading operating system concepts by Galvin and found some great beneficial resources like linux kernel documentation. There can be many directory …

Total answers: 5

Are there any filesystems with builtin data repairing via checksums?

Are there any filesystems with builtin data repairing via checksums? I’ve read that ZFS/BtrFS have a checksum check, but they don’t use it for data recovery, only for recovering data from a full local copy or a mirror copy. On the other hand, RAR archives support data redundancy for a long time, with a configurable …

Total answers: 2

Unix-esque partial-file-locking mechanism

Unix-esque partial-file-locking mechanism Linux and AFAIK most unixes expose the flock syscall for mandatory file-locking. My experience is admittedly limited with this, however am informed that it is kernel-enforced on the entire resource. But what if I wanted to only lock a part of a file mandatorily, such that read/writes to this resource are permitted, …

Total answers: 1

How to create ramfs on Arch Linux

How to create ramfs on Arch Linux I have 24 GB RAM and a 8 GB swapfile. I know that under Arch Linux there’s /dev/shm that uses tmpfs but I want to create a ramfs mount point because I want a place where I can temporary store sensitive files for work. It is very crucial …

Total answers: 2

Reading directory contents without "x" execute bit set

Reading directory contents without "x" execute bit set I have removed "x" execute permission and write permission for others on a directory /u/permtst/test/bits/. This directory details are user: permtst and group: permtst. permtst@localhost(nyc):~/test/bits> ls -la total 8 drwxrw-r– 2 permtst permtst 4096 Aug 3 12:51 . drwxrwsr-x 8 permtst permtst 4096 Aug 3 11:52 .. …

Total answers: 1

How to add a Logical Volume (LV) for /var/tmp?

How to add a Logical Volume (LV) for /var/tmp? I’ve got one physical volume and one volume group: /dev/mapper/nvme0n1p3_crypt VG Name ced-vg I’ve got five logical volumes: /dev/ced-vg/root /dev/ced-vg/var /dev/ced-vg/swap_1 /dev/ced-vg/tmp /dev/ced-vg/home I want to add a sixth logical volume on that same, unique, physical volume (I’m not adding any new SSD), which could maybe …

Total answers: 1

What is `~sys`? It lists the content of `/dev`

What is `~sys`? It lists the content of `/dev` In bash, when I type cd ~sys anywhere, I end up in /dev. In zsh it stays as ~sys in the prompt but contains /dev I’ve checked on Kubuntu 22.04, Ubuntu 20.04, Raspbian 9.13. Googling does not yield any results. Asked By: Daniel F || Source …

Total answers: 4

Minimalistic ext4 filesystem without journal and other advanced features

Minimalistic ext4 filesystem without journal and other advanced features I have a small "rescue" system (16 MB) that I boot into RAM as ramdisk. The initrd disk that I am preparing needs to be formatted. I think ext4 will do fine, but obviously, it doesn’t make any sense to use journal or other advanced ext4 features. …

Total answers: 3

Debugging strange EACCES (Permission denied) permission error

Debugging strange EACCES (Permission denied) permission error I have a symlink to a world-readable file that a c program is being unable to read. redshift is supposed to pick up configuration from $HOME/.config/redshift/redsihft.conf automatically, but it wasn’t. I tried tracing system calls to understand what files are being tried: debian-x1-7th][redshift-1.12][130]$ strace -fe trace=file redshift execve("/usr/bin/redshift", …

Total answers: 1

Making file metadata on a filesystem not supporting it

Making file metadata on a filesystem not supporting it I have here a storage without supporting the most important metadatas (permissions, owners, etc). I think, it would help a lot if I could somehow solve that I inject some type of metadata in the system from an external source. Last time as I have seen …

Total answers: 1

Is udev also a pseudo-filesystem type?

Is udev also a pseudo-filesystem type? On an embedded device running GNU/Linux with a custom BSP, when I type df /dev in Filesystem column I get devtmpfs ps -A | grep udev gives 224 ? 00:00:00 systemd-udevd In a PC running Ubuntu 22.04, the same commands give udev and 744 ? 00:00:02 systemd-udevd respectively. My …

Total answers: 1

Are symbolic links stored as files or just entries in directories?

Are symbolic links stored as files or just entries in directories? My question is related to the way symbolic links are implemented in Linux file systems. Are they regular files stored (inodes used) or are they just special entries in directories? If they are stored in file systems, how are they distinguished from binary files? …

Total answers: 1

How to enable data=journal ext4 fs mode?

How to enable data=journal ext4 fs mode? Preface (my 1st attempt ended badly): Fstab adding data=journal crashed my Linux' ext4 upon boot, how to fix? I can’t find some reliable step-by-step instructions on How to enable data=journal ext4 fs mode? (It is my root file system.) Can anyone help? Thank you! OS: Linux Mint 21.1 …

Total answers: 1

The inode and data block of a linux data file in different ext4 block groups

The inode and data block of a linux data file in different ext4 block groups during testing the Linux ext4 filesystem I notice that it assigned a regular data file an inode and multiple data blocks. But the inode is located in block group 0 and the data blocks in block group The data file …

Total answers: 1

Centos 8 LVM and partitions

Centos 8 LVM and partitions anyone can help to decode this? Two partitions with the same volume? Asked By: Vincenzo || Source You have a LVM volume group called cl on top of two partitions (in LVM terminology two physical volumes) /dev/sda3 and /dev/sda4. The cl volume group contains two logical volumes root and swap. …

Total answers: 1

Can't write to Live CD system

Can't write to Live CD system I am not new to Linux, but am new to creating my own virtual machine environment. I am using Linux to learn how to do penetration testing, and have been required to download lots of different software to do so. I added a virtual hard drive to my machine, …

Total answers: 1

Is '..' really a hard link?

Is '..' really a hard link? This is a bit of a theoretical question, but it’s important to use proper names for things. In UNIX/Linux file systems, .. points to the parent directory. However, we know that hard links cannot point to directories, because that has the potential to break the acyclic graph structure of …

Total answers: 5

Why is uncompressed tar much faster than rsync?

Why is uncompressed tar much faster than rsync? I’m currently looking for a way to improve my system backup performance and realized the following during some tests: Backing up my Ubuntu system from an SSD to an HDD (both ext4) using TAR without compression is much faster than rsyncing the same content from SSD to …

Total answers: 3

What is the max size limit for using split and cat combination?

What is the max size limit for using split and cat combination? I have backed up a file in zip format on Ubuntu whose size is 6.5GB. Trying to transfer it to a USB stick so needed to split since I got error “file size too large” while copying. (Ideally I want my USB to …

Total answers: 1

changes to /dev/shm mount options revert after reboot, ubuntu 18.04

changes to /dev/shm mount options revert after reboot, ubuntu 18.04 I use Ubuntu 18.04 on an embedded system. By default it has tmpfs mounted on /dev/shm with 3.8G (~half RAM size) and some mount options. I’m trying to change the /dev/shm size and mount options via the /etc/fstab. If I remount it, it works until …

Total answers: 1