3
votes
1answer
47 views

Does “mount -o remount,ro” flush filesystem buffers?

On Linux, does mount -o remount,ro flush filesystem buffers/cache, or should I also run sync to achieve that?
0
votes
1answer
104 views

read only root filesystem

Somehow my Debian went to read only in root file system. I have no idea how this could have happened. For example when I am in /root folder and type command nano and after that press Tab to list ...
2
votes
0answers
14 views

how to migrate a squashfs system to another filesystem that's read/write

Well, basically what i want to do is copy all of my router's files (even the dev file (because i'm running busybox)) to my usb flash drive and let my router by default boot from the usb device. it ...
1
vote
1answer
53 views

Too many levels of symbolic links

I created this file structure: test/src test/firefox When I run this command: ln -s test/src test/firefox I would expect a symbolic link test/firefox/src to be created pointing to test/src, ...
1
vote
1answer
32 views

How to discard/TRIM a range in an open file ?

For an SSD, I can open the row device and discard a range of pages using ioctl() with BLKDISCARD command. My question is for an open file, how to discard a range of data? and Is that depends on the ...
4
votes
2answers
217 views

Why there are multiple folders for executable files in Linux? [duplicate]

I'm trying to understand Linux file system, and one of the question is: 1- Why there are multiple folders for executable files: /usr/bin, /usr/sbin/ and /usr/local/bin? Is there any differences ...
2
votes
1answer
72 views

What is type 'none' for mount points and why are mount points of the same type below /run?

In Ubuntu 14.04 when executing command mount I get following excerpt tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) ...
1
vote
2answers
60 views

Secure wipe (scrub) filesystem of VPS from VPS itself

I have a VPS I'm planning to delete. This particular cloud provider makes no guarantee that the data on the drive will be wiped before giving the disk to the next person. What's a best effort attempt ...
0
votes
1answer
63 views

What are the advantages / disadvantages Linux file hierarchy has in compare to other OSs? [duplicate]

does it make any difference whether a file system hierarchy chooses to sort files by types and put them all under one directory (like all the binaries are under bin) or on the other hand sort them by ...
0
votes
1answer
27 views

setfacl remove all write access

I want to remove all write access to files & directories for any user or group while preserving other permissions. Is this possible?
2
votes
3answers
75 views

Linux - preventing an application from failing due to lack of disk space

Due to an unpredicted scenario I am currently in need of finding a solution to the fact that an application (which I do not wish to kill) is slowly hogging the entire disk space. To give more context ...
1
vote
1answer
69 views

Why isn't sda1 showing up in dev and how can I fix that?

I have an embedded Linux device and I was trying to copy some files to it. I plugged in a USB stick, the dmesg shows that it was recognized, but for some reason /dev/sda1 never showed up. I'm trying ...
0
votes
1answer
25 views

btrfs snapshots without subvolumes?

I'm starting to use btrfs. I want to be able to snapshot certain directories but do not want to create sub-volumes. Is this possible?
1
vote
2answers
63 views

live dd over a mounted read-only root partiton

I'm trying to conceive a firmware update mechanism for a Linux-based embedded system without an additional initrd/initramfs/whatever. From within the running system which has a read-only mounted root ...
13
votes
4answers
99 views

Corruption-proof SD card filesystem for embedded Linux?

Recently we had a rather unpleasant situation with our customer - Raspberry Pi based "kiosk" used to display remote sensing data (nothing more fancy than a kiosk mode browser displaying a ...
5
votes
1answer
152 views

Kernel panic when passing noatime in bootargs

I have an embedded system using jffs2 and want to pass rootflags=noatime in the kernel bootargs parameter. This results in a kernel panic: jffs2: Error: unrecognized mount option 'noatime' or ...
3
votes
1answer
29 views

filesystem that works under qemu and I can mount on my host

I'm using qemu for different kind of tasks, I would like to pick a filesystem that is both qemu-compatible and easy to mount under my host. I already discarded both qcow and qcow2 because apparently ...
8
votes
3answers
799 views

EXT3: If block size is 4K, why does ls -l show file sizes below that?

If you run ls -l on a file that contains one letter, it will list as 2B in size. If your file system is in 4k blocks, I thought it rounded files up to the block size? Is it because ls -l actually ...
6
votes
1answer
395 views

“Converting” a filesystem from ext3 to ext4

I've read on some Q&A on this website that one can "convert" an ext3 filesystem to ext4 without formatting, by issuing tune2fs -O extents,uninit_bg,dir_index /dev/dev-name And then running ...
5
votes
3answers
115 views

What filesystem metadata operations are actually journaled in ext4 & xfs?

I can't find a simple, straight answer about which filesystem metadata operations are actually persisted to the ext4 & xfs filesystem journals. Note that I am not inquiring about what POSIX ...
1
vote
1answer
119 views

Best parameters for ext4 filesystem to handle virtualbox disk images

I have ext4 partition, which holds disk image files VirtualBox works with. They all are fixed-size images (i.e. files never change their size). They are defragmented as much as possible (with ...
1
vote
1answer
108 views

File has bytes - appears to be empty

I'm having the following problem: Some text files (also some binary files) on my system are listed with the correct file size but when I open them, they appear empty. >ls -la -rw-rw-r-- 1 user ...
4
votes
1answer
70 views

“hard-linking” parts of a big file in which only a small part has changed

I use rsync to make backups: rsync -a --link-dest=PATHTO/$PREVIOUSBACKUP $SOURCE $CURRENTBACKUP This way I save space due to using hard links. The problem appears when I need to backup a huge file ...
2
votes
2answers
222 views

Merging /usr/bin and /usr/sbin into /bin (GNU/Linux)

I've read quite a number of discussions about people wanting to merge /bin and /sbin into /usr/bin. The same cannot be said for doing it the other way around. Is there any technical reason why one ...
3
votes
2answers
200 views

File system that never breaks (data loss acceptable)

There're several existing topics revolving around this issue, but what I seek is slightly different. I have an sd card on an embedded Linux and it suffers from power loss. I might be able to modify ...
9
votes
2answers
400 views

On system memory… specifically the difference between `tmpfs,` `shm,` and `hugepages…`

I've been curious lately about the various Linux kernel memory based filesystems. Note: As far as I'm concerned, the questions below should be considered more or less optional when compared with a ...
1
vote
0answers
67 views

How to use fslint (in particular findnl) on the command line to actually mimic the behavior of the fslint-gui?

So I am trying the fslint tools. However, the help included in those tools as well as the man page don't indicate that the cleanup actions offered by the fslint-gui are also available through fslint ...
3
votes
1answer
72 views

ext4, why 70k file takes 88 blocks

[root@xx]# cat -n create_extents.sh 1 #!/bin/bash 2 3 if [ $# -ne 2 ] 4 then 5 echo "$0 [filename] [size in kb]" 6 exit 1 7 fi 8 9 ...
4
votes
3answers
221 views

Hidden Files&Directories in user's home directory [closed]

I am in my user's home directory, I do: ls -a Then it shows me large number of hidden files and directories in my user's directory. Which of them I am allowed to remove? Which ones are necessary ...
1
vote
1answer
95 views

File monitoring to pre-empt hacker

We have a hacker occasionally attempting to hack a site, and so far unsuccessful, but I would like a way to determine if the site has been compromised (i.e., files edited). The type of attacks are LFI ...
1
vote
0answers
69 views

How can i determine the block size of an vxfs filesystem?

I am looking for a way to see what the current blocksize of an filesystem is. Normaly i would use tune2fs -l | grep "Block size", but that doesn't work on vxfs. I googled a bit and found fstyp -v ...
0
votes
1answer
71 views

Recovering truncated file

I'm in a peculiar situation. While editing a Perl program I accidentally truncated the file to zero length (using an Emacs lisp code I was developing). I need to recover that program... How do I that ...
5
votes
1answer
348 views

Cannot delete broken symbolic link

I have a symbolic link formerly pointing to a Dropbox directory. I don't know what I did wrong, but apparently now it points to itself. hyper@mypi:/home/hyper/test$ ls -l total 1024 lrwxrwxrwx 1 ...
0
votes
1answer
37 views

mke2fs difference between -i and -I options

sudo mke2fs Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size] [-i bytes-per-inode] [-I inode-size] [-J journal-options] [-G flex-group-size] [-N number-of-inodes] [-m ...
4
votes
3answers
151 views

Linux file system that ages off older files when partition is full

I am wondering if there is a file system equivalent to a round-robin database, which for a fixed size, ages off the oldest files. It is pretty easy to implement with a simple cron job, which I have, ...
1
vote
2answers
62 views

Something like a symbolically linked file, but with change details attached?

Is there a file type or method for using files in which certain files look and behave like symbolically linked files, but contain extra meta information for changing the data when they are read? ...
2
votes
2answers
167 views

Resize vdi size doesn't work as supposed [duplicate]

I just installed the new one Debian xfce via VirtualBox, but decided to increase the vdi size from 8GB to 20GB (because it requires 42% of all disk space at this moment): VBoxManage.exe modifyhd ...
2
votes
4answers
523 views

What is the /dev/disk/by-uuid/ and why does it use all free space on the disk

I have the following Debian that works in Virtual Box: $ uname -a Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux Recently I notice that I don't have any free space: $ df ...
5
votes
2answers
271 views

How to create a fixed size Linux ramdisk which does never swap to disk?

I want to create a fixed size Linux ramdisk which never swaps to disk. Note that my question is not "why" I want to do this (let say, for example, that it's for an educative purpose or for research): ...
1
vote
1answer
90 views

Monitor file access count by user

I have written a script which is deployed just by putting it in a globally accessible location for all users. I want to log the usage of this script. Is there a way in Linux to find out how many ...
4
votes
2answers
764 views

Why is dd using direct slower writing to disk than to a file

I am trying to compare aggregate write rates when writing to a file in a GPFS file system, as compared to writing directly to a disk on a system with Red Hat Enterprise Linux Server release 6.4 ...
1
vote
1answer
561 views

fstrim trims more than half of partition size even though partition mounted with discard

When I installed my SSD I just mounted with discard and didn't sweat it. However today I was reading about the pros and cons of using fstrim instead and decided to run the program to get an idea of ...
3
votes
1answer
99 views

Something like VMware “Changed Block Tracking” (CBT) in linux

I'm wondering if is there any possibility to track changed blocks in linux with an ext3/ext4 filesystem (or a specific one supporting it). I mean a feture like the Changed Block Tracking (CBT) ...
0
votes
3answers
228 views

How are filesystem snapshots different from simply making a copy of the files?

by doing this, # btrfs subvolume snapshot /mnt/1 /mnt/1/snapshot # tree /mnt/1 /mnt/1 ├── a ├── snapshot │ ├── a │ └── subv └── subv └── b 3 directories, 3 files We can create snapshot ...
0
votes
0answers
43 views

Big file overwriten with a 0B file

I just opend for write (by mistake) a big file with data (about 200 MB). Now I have this file and it has 0B. I want to know If I can find raw data on disk for recovery... ?
0
votes
1answer
443 views

Elementary OS System Settings has disappeared

I don't know how this happen. Part of the system setting has disappeared. How have any idea to restore them ?
0
votes
3answers
245 views

noexec on /tmp and /var/tmp directory

Our client servers are running old version of jboss (Jboss 4.0) which has lots of known vulnerabilities. Result is that the server is hacked and we are seeing some unknown executables running from ...
6
votes
2answers
243 views

Linux File Versioning?

We are migrating from A VMS environment to a Linux environment for some old alpha servers we are decommissioning. The one challenge I have not been able to overcome is file versioning. VMS keeps ...
2
votes
1answer
88 views

Process overwrite access restriction

I want to run a program so that it can only create new files and not overwrite existing ones. Does something like this exist? $ fsaccess --can read,write --not overwrite --command bash -c 'echo ...
0
votes
1answer
50 views

Will stat() cause an actual harddisk access or is the information cached?

While optimising my PHP opcode caches, I tried alternating the stat setting ( = the opcode cache checks, whether a file was modified via stat(), before using the cached results). But I did not see ...