Questions tagged [filesystems]

A filesystem is a way to organize and store computer files with their data.

Filter by
Sorted by
Tagged with
1
vote
1answer
51 views

unlink/rm target of an open symlink

I've come across an issue where processes that load symlinked .so files crash if I update the .so while the processes are still running. I have long-running processes that load shared libraries (.so)...
2
votes
1answer
33 views

“File” backed by running program?

My clients have many programs that read and write files of a certain format. They do it by sending regular old system calls, so libraries like gio aren't (in the general case) involved. I would like ...
4
votes
0answers
99 views

Why do ext2 inodes only have 12 direct blocks?

I'm currently writing a hobby file-system for fun. I was wondering if anyone knows why or where I could get information on the design philosophy of ext2. Specifically, I was wondering why each inode ...
0
votes
1answer
69 views

What units are the values in /proc/partitions and /sys/dev/block/<block>/size?

I have a sample emmc block info from an android device From /proc/partitions major minor #blocks name 179 1 5120 mmcblk0p1 Using my little intelligence I am assuming /proc/partitions ...
1
vote
1answer
35 views

How to enlarge this partition?

Inside vmware ESXI I have a CentOS virtual machine, and I resized the virtual disk from around 30 GB to 120 GB using vmware "edit" vm menu. Then I booted using a gparted bootable ISO and resized the ...
1
vote
0answers
47 views

How to wipe a partition quickly with value zero? [duplicate]

I want to wipe a partition quickly.I search the answer in website. such as: dd if=/dev/zero of=/dev/sda1 bs=16M count=96 shred -v -z -n 1 /dev/sda1 But: All the commandline,will overwrite with ...
0
votes
2answers
167 views

4TB drive formatted with ext4 can't mount due to wrong fs type

I had someone plug in a brand new 4TB drive via usb in an external enclosure in a data centre. I remotely used disk to create a partition with the default parameters to use up the entire drive. I then ...
0
votes
1answer
42 views

Snap RAID and LVM

I have multiple physical disks of different sizes that I wish to create one large pool of storage space on. The purpose of this large pool of space is to store a large encrypted file which is too ...
1
vote
1answer
91 views

How to flush writes to disk aggressively?

I'm using Ubuntu 18.04 on x86_64 devices. I have been haunted for months by a mysterious issue that I couldn't reproduce myself in which our application's configuration files were getting corrupted. ...
1
vote
0answers
32 views

Missing folders, where else should I look

When I first configured a server I created a set of folders and an additional drive. Today it was reported that these folders are now missing. After looking through /log/messages I see this line, ...
2
votes
2answers
127 views

How to mount a device of gpt type?

In Linux Mint 18.3 which boots from an HDD, I want to mount an external SSD. When I run the command sudo fdisk -l, I get all the drives and partitions as well as the SSD and when I run sudo blkid, I ...
1
vote
1answer
85 views

Why is /opt backed up separately from /?

I am working with a script that does system back up. One part of the script backs up /, /opt, and /usr/local. But isn't /opt and /usr/local under /? So why would the script back these up separately? I ...
3
votes
1answer
277 views

Unrecoverable Btrfs filesystem after a power failure?

I've been writing to a 3TB USB external hard drive (WD MyBook) with a Btrfs filesystem, when accidentally I've switched the power off to the drive's power brick. What is strange - the write ...
3
votes
1answer
59 views

Can ZFS subvolumes contain other filesystems?

I want to format a subvolume with a filesystem other than ZFS, since a program I use needs certain File System features ZFS doesn't have (Portal 2 on macOS has File System constraints). APFS has a ...
1
vote
1answer
40 views

short way to perform efsck when we have huge number of disks

we need to do e2fsck on all our disks ( redhat linux - 7.2 ). Since on each machines we have 22 disks ( ext4 file-system ) it will take time to do it on each disk as all know when doing e2fsck need ...
2
votes
0answers
27 views

Are released blocks logged in the journal for ext4?

Suppose we have a simple case: ext4 file system with journaling a single file named file, which has no other hard links the inode for file has associated with it only 1 data block My understanding ...
0
votes
1answer
35 views

How to log recently files accessed in Linux for data mining

How to get the list of files accessed in linux based on certain folde . lets say we have a folder name /data .. i want to know which files accessed when . One option is to run # find . -atime xyz ....
2
votes
1answer
27 views

Other permissions apart from filesystem access

Quoted from this answer about the difference between filesystem user id and effective user id of a process, it says that The FSUID is used for filesystem accesses, the EUID for other things. What ...
14
votes
4answers
2k views

How do I implement a file system driver driver in Linux? [closed]

Assume that I have invented a new file system, and now I want to create a file system driver for it. How would I implement this file system driver, is this done using a kernel module? And how can ...
3
votes
2answers
998 views

Can not upgrade Kali,not enough space in /var/cache/apt/archives

I installed Kali Linux on VM VirtualBox(my host is Ubuntu 18.04). I am newbee to Kali,but the two linked questions are not related to my problem. When I try to upgrade Kali apt upgrade 926 upgraded, ...
-1
votes
1answer
102 views

Why every device in Linux is a file or folder ? what are the advantages? [closed]

Why every device in Linux is a file or folder ? what are the advantages ? and what is the necessity of /dev/sda1 , /dev/sda2 or /dev/sda3 file ? it's size is 0 bytes .and after mounting the hard disk ...
19
votes
3answers
3k views

Does the Linux kernel need a file system to run?

My opinion is yes, it does, because all useful exposure to the outside world (non-priviledged processor mode) would first require a process running in the outside world. That would require a file ...
1
vote
2answers
33 views

What binaries are stored in /home/<username>/bin?

I have been reading an article from GeeksforGeeks that includes the following image of a unix filesystem layout: After some reading (mainly of this post) I was able to determine the difference ...
0
votes
1answer
18 views

After re-connecting hard disk, terminal commands stop working

The current working directors is, e.g. /media/username/ExtHDD/. When disconnecting and re-connecting that HDD, commands such as ls do not work properly anymore. $ -????????? ? ? ? ? ...
37
votes
3answers
4k views

Why is the “ls” command showing permissions of files in a FAT32 partition?

I believe that the FAT32 file system does not support file permissions, however when I do ls -l on a FAT32 partition, ls -l shows that the files have permissions: -rw-r--r-- 1 john john 11 Mar 20 15:...
0
votes
3answers
50 views

How to detect NTFS/exFAT filing system type fronm script

User has a (incremental) backup script using rsync, to external device. This was erroring on an SSD he had. Turns out (I had no idea) his device was formatted exFAT. Unfortunately that means I need ...
3
votes
1answer
57 views

How to trim down Amazon Linux OS for more free space?

I use EC2 on Amazon Web Services. The OS of the t2.micro instance is a customized “Amazon Linux” with 1 GiB RAM and 1 vCPU. When accessing this instance via their Cloud9 IDE I find that by default ...
3
votes
1answer
134 views

Some special files in Unix

Background There are lots types of special files in Unix, for example symlinks, device files and proc files (under /proc). /proc files are just normal files or even text files. But for the rest, I ...
2
votes
0answers
27 views

Record filesystem activity

I would like to record all filesystem activity so that I can later replay it at will (for benchmarking purposes). What's the best way of doing that? I considered strace, but rejected that because it ...
0
votes
0answers
87 views

How can I copy sparse files from a ext4 file system to an exfat file system and keep the apparent size?

My issue is that I am trying to copy files from my Ubuntu linux system which uses a ext4 file system to a Sandisk 1TB USB card, which uses an exFat system. In the ext4 system, the entire directory ...
1
vote
1answer
50 views

Unable to delete directory, imutable flag is not set, not mounted

So i have this directory that causes a lot of problems when trying to delete lxd via snap. The directory in question is /var/snap/lxd/common/lxd/storage-pools/default/. If I try to delete it with sudo ...
1
vote
1answer
74 views

Are btrfs advantages negated with over-the-top encryption?

Are the benefits of btrfs lost if one uses encryptFS on top? What advantages (over ext4) of btrfs remain intact with encryptFS? If I want to have the full benefits of btrfs with encryption, is LUKS ...
0
votes
1answer
42 views

Tracking all file changes in a unix host

I'm evaluating a tool and I need to identify all files (including system config files) added, changed or removed by this application (it is installed using pip). After installing on a external host, ...
11
votes
1answer
700 views

Does Linux have system calls to access all the features of the file systems it supports?

Linux supports many file systems (for example: ext3, NTFS, FAT32, etc.). The following diagram shows how Linux allows a process to access files: So assume that a process called the read() system ...
5
votes
4answers
149 views

Protecting access to NFS shares in Docker

I would like people to access NFS shares from within Docker. Problem is inside of Docker they can become root, and then they can have write access to anyone's files by becoming that user. Is there a ...
0
votes
0answers
59 views

Using rm --one-file-system to only delete files on the local filesystem

I have a FUSE mount located in /media/writable, however, sometimes this FUSE mount disconnects, but some programs will still attempt to write to /media/writable. When I restart the FUSE mount service,...
0
votes
0answers
183 views

How to copy files from HDFS recursive to the local file system

How we can copy recursive jar files from HDFS ( jar files are under sub folders ) to local folder? Example export hdfs_folder=/app/lib export local_folder=/home/work_app while under /app/lib we ...
0
votes
1answer
40 views

How can I add support for a new file system type to an existing kernel?

I have an ARM device running an OpenEmbedded-based kernel. A new requirement is going to involve mounting an ISO 9660 file system, but that file system is not currently listed in /etc/filesystems. I ...
0
votes
0answers
33 views

Is a mmaped file considered an open file in linux/unix?

Hi I feel confused about open file and mmapped file. I know that if a file is accessed using system call such as read/write will return a file descriptor, and be considered as an open file? How about ...
1
vote
1answer
22 views

Is it wrong to fill the reserved space in an external USB drive for archiving purposes?

I have been filling a hard drive and a couple of backup drives with the family pictures and videos. Once a video goes into the archive, it remains there in a folder correctly labeled with the date. ...
1
vote
1answer
33 views

Can I stop a system call before it is executed using Stackable Filesystems? [closed]

Let's assume that I have an application X. I only track system calls that X issues. For example in systems like "CS-STILo". The system detects anomalous sequences of system calls to detect code reuse ...
-1
votes
1answer
42 views

How can I find what uses the space in a LV(logical volume)?

The logical volume(aka LV), centos-home is created automatically when installing CentOS 7 by default, but I didn't use it manually. Now, I have mounted an empty directory, work to centos-home. /home/...
0
votes
2answers
23 views

Navigate file easily in Linux GUI Apps?

This is not about File Manager as I can copy/paste or type the full path in the address bar. This question is about other apps, e.g. FeatherPad text editor. If you have a file buried deep within your ...
-1
votes
1answer
217 views

How to access external hard drive from Ubuntu Shell and Python code [duplicate]

I am running out of space in my local device. I have external hard disk. I want to point my python code to write to directory there. How can I know the full path for the hard disk? I tried to go to ...
-7
votes
1answer
54 views

What is a region inside a partition, not used by any filesystem, called?

gparted calls the region on a disk not belonging to any partition "unallocated", and region in a filesystem not occupied by any file or metadata, "unused". How do we call a region inside a partition ...
1
vote
0answers
47 views

Does `resize2fs` only move the end position of a filesystem?

man resize2fs says The size parameter specifies the requested new size of the filesystem. Does resize2fs only move the end position of a filesystem, not the beginning position of a filesystem (...
7
votes
1answer
537 views

Is there a Linux system call to create a “view” of a range of a file?

Does Linux provide a system call which can create a "view" of a limited byte range of a backing file? I'm envisioning something that for example would act on an open file descriptor and either modify ...
1
vote
1answer
92 views

How can I format a partition into a filesystem quickly?

In gparted, repartitioning a disk into one single partition and formatting the partition to a filesystem is very fast. It seems not write zeros to the partition. How can I achieve the same when ...
0
votes
0answers
35 views

How can I reduce the LVM space and assigned that reduced space to existing partition?

Had this condition, I really need a space in /dev/vda1, how can I reduce the size of my LVM in /dev/mapper/vg-data-lv_data by 10G and assign those 10G of space to my /dev/vda1 partition ? If it's ...
6
votes
2answers
694 views

Why is the size of a directory either 0 or 4096? [duplicate]

$ ls -l total 28 drwxrwxrwx 1 t t 4096 May 8 2018 dir1 drwxrwxrwx 1 t t 0 Mar 12 2015 dir2 drwxrwxrwx 1 t t 4096 Jan 17 2014 dir3 drwxrwxrwx 1 t t 4096 Jun 12 2017 dir4 drwxrwxrwx 1 t t ...