Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [filesystems]

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

11
votes
2answers
1k views

Why the “ls” command is showing the 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
2answers
17 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 ...
2
votes
0answers
42 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
64 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 ...
-1
votes
0answers
10 views

Mount overlayfs on top of another overlayfs or change existing upperdir on the fly

I have this crazy idea of running a live linux distro from an USB stick. The stick has 4 partitions: boot, EFI, rootfs (contains squashfs image) and a CoW partition which is mounted to root (/) during ...
1
vote
0answers
15 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
20 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
29 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
29 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
18 views

Tracking host-wide file changes created or modified during an install process

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, ...
0
votes
0answers
18 views

Questions related to VFS [on hold]

1) If we are doing a read operation, then after we find the pointers to the actual physical address we check with the content in the cache and if it same then continue with the operation, else suspend ...
11
votes
1answer
627 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 ...
1
vote
0answers
9 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
23 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
30 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
22 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
22 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
21 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
22 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
36 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
18 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
35 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
52 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
29 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
529 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
36 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
33 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 ...
5
votes
2answers
601 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 ...
3
votes
0answers
27 views

Portable, race-free equivalent of mv -T DIR1 DIR2?

It seems mv -T is a GNU extension to mv. Is there a robust way (race-free, portable, and otherwise without "gotchas") to do the equivalent of mv -T dir1 dir2? To be clear: I DO NOT want this to ...
0
votes
2answers
64 views

Why does Linux allow a symbolic link to itself?

Because of a typo I found out that this is allowed: ln -s useless useless. Then, as expected ls useless/* triggers this error message: ls: cannot access 'useless/*': Too many levels of symbolic ...
0
votes
1answer
34 views

Default file system when mounting a partition

When I attach an SD card with multiple partitions to a Debian computer for example and use the mount command to mount a partition to the file system without specifying the file system type, which file ...
-1
votes
2answers
29 views

Data recovery after dd on a sda partition

I had installed opensuse in UEFI mode in my computer but having a legacy Windows so it did not appear in boot menu. Following a weird tutorial on the internet I dd the Windows partition of my sda. I ...
-1
votes
1answer
39 views

How shall I better calcuate the target sizes for shrinking a LV and filesystem?

I had a LV with a ext4 filesystem. lubuntu@lubuntu:~$ sudo parted -l Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/lubuntu--vg-root: 499GB Sector size (logical/physical): 512B/512B ...
1
vote
1answer
28 views

Significance of /sys/block/sd*/sd*/size

Disk size /sys/block/sda/size is always correct but the partition size /sys/block/sda/sda2/size is not correct if the partition type is extended, boot, etc, due to this I rely on reading MBR to get ...
0
votes
1answer
18 views

When boot into a live Lubuntu from a bootable flash drive, what filesystems on the disk are mounted automatically?

Assume a computer has Lubuntu installed on its disk. Booting into a live Lubuntu from a bootable flash drive is often a way to access filesystems on the disk that are required to be not mounted. So I ...
0
votes
1answer
41 views

How can you umount `/home`?

When log in Lubuntu, I can't $ sudo umount /home umount: /home: target is busy. where /home itself is a mount point of a filesystem. How can you umount /home? / can't be umounted, because OS is ...
0
votes
1answer
40 views

Can't log in desktop environment after moving `/` and `/home` into different LVs and enlarge swap

I enlarged LV swap from 1G to 4G. I also moved / and /home in a single PV to two different LVs, by shrinking LV root and create LV home on the freed space, and then following https://askubuntu....
-2
votes
2answers
66 views

How can I make `fsck` actually check the healthiness of my disk, partitions, filesystems, and LVs?

I want to check the healthiness of my disk, partitions, filesystems, and LVs. So I run fsck. I heard to use fsck on a filesystem, I need to boot into a live Lubuntu from a bootable flash drive and ...
-1
votes
0answers
16 views

How can I move `/home` to LV `home` and mount LV `home` at `/home`?

Currently / and /home are both in LV root. I would like to move /home to LV home and mount LV home at /home. How shall I do it? Thanks. $ sudo lvs LV VG Attr LSize Pool Origin ...
1
vote
1answer
42 views

How can I find out the used size of an umounted filesystem?

Is there a way to find out the used size of an umounted filesystem? I want to resize the ext4 / filesystem, so I boot into a live Lubuntu using a Lubuntu bootable flash drive. Since the / filesystem ...
1
vote
2answers
56 views

Will the kernel ensure filesystems be in a clean state when restart/poweroff?

What does reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF, NULL) syscall do with filesystems exactly? I know some still cache-in-memory data will be lost, but if I never ...
0
votes
0answers
26 views

mount failing when mounting ewf1 as a loop device

I am trying to mount an EWF image on Debian. From the original E01 format, I used ewfmount to mount it and it worked fine. Now, I need to mount the ewf1 file, and it claims that I do not have the ...
0
votes
3answers
84 views

How to check if partition is Extended/Primary in Linux

Below is the info I get using (g)parted or fdisk command. Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 196265983 196263936 93.6G 83 Linux /dev/sda2 ...
0
votes
2answers
56 views

Can a filesystem ever be specified by its mount point?

Is it correct that for an umounted filesystem, the only way to specify it is to specify its underlying partition? For a mounted filesystem, can we specify it by either specifying its underlying ...
0
votes
3answers
32 views

Does `resize2fs` by default do nothing?

For resize2fs, If ``size parameter is not specified, it will default to the size of the partition The size of a filesystem is by default the size of its underlying partition. So by default, ...
-1
votes
2answers
104 views

bash: cd: <path> : No such file or directory [duplicate]

I upgraded to the latest version of Kali Linux and all of a sudden I can't open up files. The file manager shows the files exist and I can get in them through the file manager but cannot do so through ...
2
votes
2answers
101 views

File system compatibility with CIFS

I've been using my Raspberry Pi as a music file server, but I'm not happy with it. The current setup uses a samba server on my RPi with a WD Passport USB drive formatted as vfat. This serves as the ...
0
votes
0answers
33 views

Are partition and filesystem specified and identified in the same ways?

How is a filesystem identified or specified? Some commands such as resize2fs expect a filesystem as an argument. The mount directory of a file system doesn't work. Does name such as /dev/sda3 ...
1
vote
5answers
60 views

Stop program from writing to a deleted file

One of our systems has a growing log file (we will be addressing) but currently the application owner will delete the file with rm then wait for the next maintenance window to reboot. I find myself ...
1
vote
1answer
32 views

Aren't block and sector different concepts?

Understanding the Linux Kernel says The first block in each Ext2 partition is never managed by the Ext2 filesystem, because it is reserved for the partition boot sector. As far as I heard, a ...