date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,348,735,162,000 |
On a new external hard drive (Intenso 05-1204-18A), I made (with GParted) two partitions :
Disk /dev/sdc: 931.5 GiB, 1000204883968 bytes, 1953525164 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
... |
The fat32 filesystem has no notion of ownership or permissions. The man page for mount lists these options that help make it look closer to what Unix users expect:
uid=value and gid=value
Set the owner and group of all files. (Default: the uid and gid
of the current process.)
umask=value
Set the u... | Can't write on recently created EXT4 partition |
1,348,735,162,000 |
I copied some files from a data DVD to /home/emma (ext4), and all of the files are read only.
This is what all of the files are like:
emma@emma-W54-55SU1-SUW:~$ stat cd/Drivers/Drivers_List.rtf
File: ‘cd/Drivers/Drivers_List.rtf’
Size: 28120 Blocks: 56 IO Block: 4096 regular file
Device: 801h/2049d... |
I've found the answer myself here.
Because cd/Drivers is read-only, only root can delete from it.
| Why can't I delete my files? |
1,348,735,162,000 |
How would I write isolinux to an ext4 filesystem on an 1 GB SD card so that it would boot at startup?
|
You wouldn't as a SD card normally doesn't look like a ISO image. Instead have a look at EXTLINUX.
In short:
Mount your sd card
run extlinux --install MOUNTPOINT/boot
| How to write isolinux to an ext4 filesystem |
1,348,735,162,000 |
yesterday night my laptop executes a hard shutdown because my battery was out of charge. After the reboot Xorg hangs and the troubleshooting was pretty hard. A first file system check of my ext4 partition yields no error. Further I began to check the related logs and found nothing irregular. Since i use xdm i eventual... |
It is not that much a question of the "right" filesystem, but how you use it and how you mount it.
In case of ext3 and ext4 you can use the ro, sync, dirsync options.
Filesystems with intent-write-log are normally better, if the metadata is being synced before the actual write.
In your case it might have been that the... | corrupted library after hard shutdown |
1,348,735,162,000 |
I hope that this is not a duplicate question. I have seen several similar questions, where the answer was to blacklist the respective device or partition. But in my case, I can't do that (see below). Having said this:
On a debian buster x64 host, I have created a VM (based on QEMU). The VM runs on a block device parti... |
By passing -o norecovery to mount, you could mount the filesystem without making use of the journal at all.
Man page for mount, ext3 section:
norecovery/noload
Don't load the journal on mounting. Note that if the filesystem was not unmounted cleanly, skipping the journal replay will lead to the filesystem containing ... | How to keep the kernel from accessing the journal on an ext4 partition? |
1,348,735,162,000 |
Trying to format this LV /dev/mapper/nvmeVg-var which is not mounted. See findmnt below.
mkfs.ext3 /dev/mapper/nvmeVg-var
mke2fs 1.45.6 (20-Mar-2020)
/dev/mapper/nvmeVg-var contains a ext4 file system
last mounted on /var on Mon Oct 11 23:18:35 2021
Proceed anyway? (y,N) y
/dev/mapper/nvmeVg-var is apparently in ... |
I unplugged everything for the night, installed a backup battery and this worked flawlessly this morning sudo mkfs.ext4 /dev/mapper/nvmeVg-var
| "will not make a filesystem here!" |
1,348,735,162,000 |
As SSD drives have limited writes, I would like to know whether disabling access time logging still plays a significant role in 2021. Most websites I see on the subject are from 2015 and before, and SSD might be more robust nowadays.
I don't really realise how SSD writes are managed on Linux systems with respect to ca... |
There are a number of optimizations in the kernel and ext4 to reduce the overhead of atime updates, such as relatime (only update atime when it is older than mtime or more than a day old) and lazytime (delay atime updates and aggregate writes of multiple inodes in a single block only when needed or if more than a day ... | How useful is it to disable access time logging on SSD and are there disadvantages doing so? |
1,348,735,162,000 |
The inode structure of some filesystems includes a list of pointers to the blocks used to store the file contents. This list should exist for ext2/3/4, as specified in the first comment to this question.
The addresses of the blocks used by a file can be obtained with istat, one of the Sleuthkit tools: but this is not ... |
If you have a file entry pointing to the inode, you can use debugfs:
$ debugfs /path/to/filesystem
debugfs: inode_dump -b fileentry
0000 0004 0000 0104 0000 0204 0000 0304 0000 ................
0020 0404 0000 0504 0000 0604 0000 0704 0000 ................
0040 0804 0000 0904 0000 0a04 0000 0b04 0000 ............... | inode, list block pointers |
1,348,735,162,000 |
Problem:
I have two external hard disks where most partitions are formatted as Ext4 to be used with my Linux workstation.
But I also have a macbook and it seems that there is almost nothing to support Ext4 file systems on MacOS.
So I thought I could create a VirtualBox virtual machine (or a docker image?) containing a... |
Install live linux on your VirtualBox and it should be enough, they are rather small for that very reason. There are plenty of them to choose, (here is small list with desriptions). I personally use slax on usb but there are others. Nothing prevents you from making your own live version that would be absolutely minima... | Using a small Linux as an "Ext4 server" |
1,348,735,162,000 |
I read about the XFS filesystem and found that it is good at storing large files. Why are some filesystems (XFS) good at storing large files and others (ext4/ext3) are not? Is it because of the physical architecture of XFS?
|
The reason is the design of XFS. If you dig in to its history, you will see SGI was famous for workstations designed for audio and video editing. SGI created XFS to handle huge files (xxx MB or more) very well. They added the use of extents (with usual size of around 1MB) to improve good performance in handling big fi... | Why do some filesystems perform better at storing large files? |
1,348,735,162,000 |
Here's the situation -
I have a 1TB drive mounted at /data.
There are multiple local users on the desktop. All of them are in the localusers group
I have a virtualbox VM with a 50 GB VDI dsik stored at /data/common/vms
I would like the virtualbox VM to be available to all members of the localusers group.
What I've... |
for those landing here with a similar predicament, I posted the question on Reddit and was quickly pointed in the right direction
basically:
Set the setgid bit on the shared folder /data/common
Set default acl to rwx for user and group like so: setfacl -d -m u::rwx,g::rwx,o::r-x /data/common
A more detailed walkthro... | Share folder/files between multiple users on ext4 disk |
1,348,735,162,000 |
I have a 128gb micro sd formatted as ext4 10gb for app2sd 2nd ext4 partition ( p2 ) on my Android 6 phone . All my apps ( 80%) stay on that ext4 partition . Now app2sd cant load this partition - "unable to mount ....kgrinvalid file"
Also the 119 gb main fat ( exFat ) partition ( p1) used to hold my data is mounted ... |
-I could mount both partitions correctly after adding the required commands in an init.d script . If the former is not supported by your phone - there are alternatives magisk module ( x-posed is yet another option ) and magisk settings should not be at isolated namespace
. For the mount to be propagated & su... | EXT4 app2sd link2sd partition repair with bad superblock . Partition cannot be mounted on Android but will mount RW w/ su on Linux Live |
1,485,714,442,000 |
I have on ext4 disc the following file:
-r--r--r-- 1 root root 61440 20. pro 15.30 ldlinux.sys
But rm, chmod and mv says permission denied even for root. Any ideas what could be the problem?
FYI, it is file in boot sector of distro slax, but it is not used for booting. I just extracted the installation archive and I w... |
You have probably mistake somewhere. Either:
You're trying to remove the file as unprivileged user,
The file has file attributes: see them with lsattr ldlinux.sys,
The directory you're trying to remove file from has file attributes, see them: lsattr . (in directory containing ldlinux.sys).
Other conditions may apply... | Root cannot remove file on ext4 |
1,485,714,442,000 |
I've read the Ceph OS recommendations document, but still I have a question.
Which file system is better for Ceph?
XFS, ext4, or something else?
|
According to ceph documents,they recommend configuring Ceph to use the XFS file system in the near term, and btrfs in the long term once it is stable enough for production and at the end, ext4.
document 1
document 2
document 3
| Which file system is better for Ceph? |
1,485,714,442,000 |
I have a latency sensitive application running on an embedded system, and I'm seeing some discrepancy between writing to a ext4 partition and an ext2 partition on the same physical device. Specifically, I see intermittent delays when performing many small updates on a memory map, but only on ext4. I've tried what seem... |
One word: Journaling.
http://www.thegeekstuff.com/2011/05/ext2-ext3-ext4/
As you talk about embedded im assuming you have some form of flash memory? Performance is very spiky on the journaled ext4 on flash. Ext2 is recommended.
Here is a good article on disabling journaling and tweaking the fs for no journaling if y... | Ext4 exhibits unexpected write latency variance vs. ext2 |
1,485,714,442,000 |
I have a hardware raid-1 on two WDC-SSDs with 500GB on each SSD. The raid controller is a Marvell-88SE9128 via two GSATA connections (the controller is directly on the motherboard and not an ePCI extension card).
When I try to install a Linux distribution on this raid, every installer I tried so far fails, with a more... |
Thanks to the help of ljrk we were able to figure out, that Parted and GParted can not partioning the RAID-Disk. We still do not know what the exact Problem for Parted/GParted is, because no error message appears, like I told before.
This made it very difficult to install Ubuntu or any other Debian derivate, but fdisk... | Can't make an ext4-partition on a specific raid |
1,485,714,442,000 |
I tried to test the write speed of some SSDs and when writing to the disk directly is somehow slower that writing to the disk when it is formatted as ext4. How does this work? Is this correct or am I measuring something wrong?
for i in {1..5}; do dd if=/dev/zero of=/dev/sda1 bs=1G count=1 oflag=dsync; done
1073741824 ... |
mkfs TRIM / discard the entire device, thus providing optimal benchmark conditions.
Also with /proc/sys/vm/block_dump enabled (warning - TONS of output), I'm seeing writes of 8 sectors (dd on raw block device) vs. writes of 16384 sectors (dd on ext4) so it might be due to how the kernel decides to split things up, sin... | Writing to EXT4 faster than writing to disk directly? |
1,485,714,442,000 |
I have encrypted my home partition via cryptsetup. Inside the mapper /dev/mapper, i have created a ext4 fs via
mkfs.ext4 /dev/mapper/home
Now, my home partiotion only has 91 GB. My luks partition has ~ 270 GB. Is this normal? How can i resize my ext4 home partition?
Some fdisc -l data:
Device Boot Start ... |
To make an encrypted partition mount automatically, you'll first need /etc/crypttab set up properly. In your case, that means a line like this:
home /dev/sda3 none luks
(Here I'm assuming you used LUKS; if you used some other mode of cryptsetup, the two last parameters on the line may need to be different.)
This shou... | Wrong EXT4 Partition size in luks encrypted partition |
1,485,714,442,000 |
We have installed Debian 8 on a new Dell PowerEdge T330, there are two partitions, / and /var, in a RAID1 array using mdadm. During testing the primary applications: mysql and tomcat were stopped. We are getting abysmal write performance from both partitions although the read performance is adequate. This is the obser... |
When you ask dd for bs=16K and oflag=direct you are asking for many small writes, this is what HDDs are bad at and what SSDs are good at.
You can use LVMCache to get the benefit of both (up to the SSD size)
If you use bs=16M or no oflag then the writes are split/combined/cached in RAM and written at an optimal size.
W... | Slow Write Speed(<2 MB/s) on Unencrypted and LUKS Encrypted ext4 filesystems using mdadm Software RAID1 Debian 8 Dell PowerEdge T330 Server |
1,485,714,442,000 |
I just resized a .vdi from my host from 15.5G to 120G. I tried to resize the partition from the guest (ubuntu server) using resize2fs
root@ubuntu:~# sudo resize2fs /dev/sda2 115G
resize2fs 1.42.13 (17-May-2015)
resize2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Could... |
resize2fs and other tools in the e2fsprogs suite assume that the read system call either returns the whole requested size of encounters an error. This is not true in general: read is allowed to return less, you're supposed to call this in a loop. I think the Linux kernel guarantees that read returns all the data from ... | Short read while trying to open /dev/sda2 |
1,485,714,442,000 |
I'm formatting a disk with following command switches, I can format the disk to ext4.
sudo mke2fs -F -E lazy_itable_init=0,lazy_journal_init=0,discard -t ext4 -b 4096 ...
However, once I added this switch:
-O ^has_journal
It will be formatted to ext2. Could you explain why?
|
Because ext4 is an extension of the ext2 and ext3 filesystems; one of the features that it extended was the use of a journal.
References:
https://ext4.wiki.kernel.org/index.php/Frequently_Asked_Questions#What_is_the_difference_between_ext2.2C_ext3.2C_and_ext4.3F
https://unix.stackexchange.com/a/60757/117549
| Why this switch will effectively format disk to ext2 instead of ext4? |
1,485,714,442,000 |
I'm quite sure it didn't happen before I started using LUKS and LVM on my disk (2 or 3 weeks ago), but now root user is constantly (every 2-3 seconds) writing (not reading, just writing) on disk and I can't figure out why.
The disk has one LUKS partition with one LVM group, which contains both root (ext4) and home (ex... |
I've finally managed to reduce dramatically this constant writing activity on the disk, though still I don't understand totally how all this is linked. I guess this is not a perfect solution to the problem, but fixed it to me some way, so for if it helps someone:
I've edited the /etc/fstab file adding to the options ... | Why is OS constantly writing to disk (ext4) on a Ubuntu 14.04 machine? Is it normal? |
1,398,618,849,000 |
I have a problem with a filesystem here on a storage machine. We noticed, that many of the data that comes out of the systems seams to be corrupt, but only with minor problems like CRC errors with self-verifing installers or small picture errors in movies.
While tracking down the problem, i endet up in a test with 3 ... |
I think I found the problem: After a while of plugging arround different setups I replaced the SiI controller with an old PCI one and the problem seems to be solved.
| Same file with different content on every read [closed] |
1,398,618,849,000 |
Possible Duplicate:
ext4: How to account for the filesystem space?
After googleing a little I find that ext4 reserve 5% for root: Reserved space for root on a filesystem - why?, ext2/3/4 reserved blocks percentage purpose. And if I use tune2fs to set the number of reserved blocks to 0, it will take them back. But ... |
There is still space required for the filesystem's internal usage (superblocks, etc). This is merely the way ext4 works and defines "used space".
| Why is some filesystem space used even though the filesystem is empty? [duplicate] |
1,398,618,849,000 |
When playing with filesystems and partition, I realized that when I created a ext file system on my USB drive and plug it to Windows, I am forced to format it. On the other end, when building a FAT partition on Windows, and plugging it to my virtual machine, Linux is perfectly able to read and mount my FAT partition.... |
Windows can’t read “Linux” file systems (such as Ext4 or XFS) by default because it doesn’t ship with drivers for them. You can install software such as Ext2fsd to gain read access to Ext2/3/4 file systems.
Linux can access FAT file systems because the kernel has a FAT file system driver, and most distributions enable... | Why can't Windows read Linux filesystems? [closed] |
1,398,618,849,000 |
As per my understanding, READ/WRITE etc are file system operations in linux. The file systems registers callbacks with the Kernel (VFS) and are in turn called by it when the particular FS is detected during a READ/WRITE operation.
For example:
EXT4_write:
VFS write request -> ext4_writepages()
F2FS_write:
VFS write r... |
In order for the VFS layer to be able to do read/write operations on a file, then that file must be opened in one way or another. If you have a medium that has no filesystem, then you cannot mount it. If you cannot mount it, then you cannot have a path to it for use by open(). If you cannot open a file on it, then ... | Can VFS read/write operations be performed on an unformatted storage device in Linux? |
1,398,618,849,000 |
Here is the origin of my question:
I'm running Linux containers with LXD snap version at Ubuntu 22.04 on a VPS. The root file system of the VPS is Ext4 and there is not additional storage attached. So the default LXD storage pool is created by the dir option.
When I'm taking a snapshots of these LXCs, the whole data... |
It possible to do something like fallocate -l 16G /lvm.fs, then format it as LVM, mount it and use it as storage pool for LXD? And of course, how can I do that if it is possible?
Start by making your file. I like to place it in a directory other than /, so I created a /vol directory for this purpose:
truncate -s 16G... | Is it possible to use a file as Filesystem? |
1,398,618,849,000 |
I have a problem with a very large number of files in one directory.
The file system is ext4.
I reached the 2**32 file limit and couldn't even write any file on this partition.
The problem is very big.
I don't know how I can move some of the files to other resources?
The classic "ls" and "mv" are not working.
The file... |
Please try running:
ls --sort=none --no-group
or limit to some number of files, e.g.
ls --sort=none --no-group | head -500
| Ext4 and Linux - very large number of files in one directory - operations |
1,398,618,849,000 |
I'm currently looking at an issue with data loss and was using the tune2fs utility, and I was wondering what 'Last write time:' refers to. The volume is written to constantly and backups confirm that the data that I lost has been backed up, but I just want to understand what that field means as it can't be the last ti... |
The “Last write time” in tune2fs’ output reflects the last time the super block was written. This doesn’t change when files are written to the device, only when certain pieces of information stored in the super block change — in particular, when the devices is mounted, or when its recovery status changes, or when an e... | Ext4 - Last write time |
1,398,618,849,000 |
I know there are tools like df which show the disk space remaining on disks but I could not find any info on how this tool actually gets this info. I would imagine the filesystem keeps track of this information somehow but I can't find info on this either.
Is there a plain explanation on how this information is gathe... |
You can see what df does using strace:
$ strace df / |& grep -i ext
statfs("/", {f_type=EXT2_SUPER_MAGIC, f_bsize=4096, f_blocks=4611519, f_bfree=864281, f_bavail=624269, f_files=1179648, f_ffree=620737, f_fsid={126240841, 1491846125}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
And from man 2 st... | How is free disk space on ext4 calculated? |
1,398,618,849,000 |
I have mounted an ext4 file system on Dir directory and tweaked some code of directory read which requires having files in the directory inodes with non-sequential inode numbers for its testing. As I am creating files with the shell script, which allocates inodes to the files with sequential inode numbers. Because for... |
Well a straightforward approach would be to just create a bunch of temporary files before an each .bin file:
function randomFiles() {
for (( i=1; i<=$[$RANDOM%$1+1]; i++ ))
do
mktemp -q --tmpdir=.
done
}
for n in {1..1000}; do
dd if=/dev/urandom of=file$( printf %03d "$n" ).bin bs=1 count=... | How can I create files in the directory to have inodes allocated to files with non-sequential inode numbers? |
1,398,618,849,000 |
I searched the Internet, but I was not able to find a satisfying answer to my problem. The Problem I'm encountering currently is, that I'm transitioning my data from a NTFS Partition to a ext4 partition. What surprised me was the fact, that I could store less data on the same harddrive with the ext4 filesystem. After ... |
By default, ext2/ext3/ext4 filesystems have 5% of the space reserved for the root user. This makes sense for the root filesystem in a typical configuration: it means that the system won't grind to a halt if a user fills up the disk, critical functionality will still work and in particular logs can still be written. It... | ext4 file system tuning for storage partition |
1,398,618,849,000 |
Somehow my .vdi (Linux guest OS) file got corrupted. Now I have some files in it (Inside the vdi file) and I want to recover those files. How can I do that?
|
Assuming you're on a Linux host as well (you didn't mention that). You can always try the Network Block Device (NBD) option:-
sudo modprobe nbd max_part=16
sudo qemu-nbd -c /dev/nbd0 <path to your vdi file>
ls -lh /dev/nbd0*
<lists all the partitions on the vdi>
Choose which of the partitions you want to mount (eg 1s... | Linux: Recover files from .vdi file |
1,398,618,849,000 |
I ran df, and the output appears almost instantly:
(FS Size Used Avail Use%)
/dev/sda1 145G 8.4G 130G 7%
sda1 is an ext4 partition.
Without summing the size of all files, how can df give me the space information almost instantly?
|
Like traditional Unix File Systems, ext2, ext3 and ext4 have a segment of metadata called a superblock, which contains information about the configuration of the file system. The primary superblock is stored at a fixed offset from the start of the partition, and since the information it contains is so important, backu... | How does my partition (ext4) know its size of used/free space? |
1,398,618,849,000 |
By the following question:
Is there some universally recommended Reserved block count (for root) for large Ext4 drives?
I specifically mean the following:
Let us consider (almost) everyone has a rather large root drive (partition) nowadays.
Let us consider for example 2TB drive with a 1.8TiB root partition, meaning... |
So, there's few reasons that count exists, at all.
The easiest reason is that you would want a root-run service that saves logs and or data to that volume to continue to work even if a user floods the drive with dat. This obviously is only relevant when
the volume you're referring to actually is used by root-running ... | Is there some universally recommended Reserved block count (for root) for large Ext4 drives? |
1,398,618,849,000 |
I have a Toshiba HDD with an ext4 file system that I have been using extensively until yesterday. Suddenly, it has become a read-only file system, and when I run fdisk -l, it shows the type as HPFS/NTFS/exFAT.
Reading Files system become suddently read only; how to debug this?, I tried dmesg and, among other lines it ... |
sudo umount /dev/sdb1
sudo e2fsck -v -C 0 -t /dev/sdb1
| external HDD drive become Read-only file system with wrong file system type |
1,398,618,849,000 |
We have servers which have been running for a long time. When they reboot, we see this message:
kernel: EXT4-fs (sda3): warning: maximal mount count reached, running e2fsck is recommended
My question is: what if you never ever run e2fsck? Man page does not shed enough light. The warning message says "is recommended" -... |
An ext* filesystem has a couple of values in the metadata; how many times a filesystem can be mounted before it should be checked, and how long between checks should be allowed.
These values can be checked with the dumpe2fs command;
eg
% sudo dumpe2fs -h /dev/vdb | egrep -i 'check|mount count'
dumpe2fs 1.42.9 (28-Dec-... | What happens if you never ever run e2fsck? |
1,398,618,849,000 |
I found an older external hd I want to reuse for something else. I was doing an rsync of it to a NAS I run over the network but it was taking ages.
So I decided to rsync to my local drive first (SSD) and do the final backup to NAS later.
I ran rsync -avvz --progress /media/ubuntu/9AB4-7DB9/ubuntu/ bak.
This seems to ... |
The du command measures file size in blocks, not bytes.
Since vfat and ext4 use completely different block sizes, a size change of 2x or even 8x would not be even slightly surprising.
ext4 typically uses 4k blocks but both ext4 and vfat use a variable block size set when the disk is formatted. vfat supports logical b... | rsync from external vfat disk to local ext4 yields VASTLY different sizes [duplicate] |
1,398,618,849,000 |
$sudo blkid
/dev/sda1: UUID="F959-61DE" TYPE="vfat" PARTUUID="950b18a0-1501-48b4-92ef-ba1dd15aaf21"
/dev/sda2: UUID="6dfcfc23-b076-4eeb-8fba-a1261b4ea399" TYPE="ext4" PARTUUID="ddc69ee8-40b0-49c9-9dcb-0b9064caca7d"
/dev/sda3: UUID="fec0af18-d28e-4f2a-acb7-6380ddee3dc2" TYPE="ext4" PARTUUID="e19628dc-c04a-4c9d-a3c6-469... |
debugfs’s stat command expects a path name, or an inode number “quoted” using angle brackets; you might as well use stat milad/a instead:
sudo /sbin/debugfs -R 'stat milad/a' /dev/sda6
The file path is relative to the root of the file system; since that is mounted at /home, /home/milad/a becomes milad/a.
If your vers... | debugfs not working | file not found by ext2_lookup |
1,398,618,849,000 |
My both hard drives where all my data is stored are failing. My system insconstently refuses to load the disks and mount the partitions. I moved one hard drive to other computer where it is recognized with less trouble but the partition has many errors, and I still get E/S errors on dmesg for that drive.
The partition... |
Don't panic
It appears you are trying to failing hard drives with dirty ext4 filesystems on them.
Do you have backups? Restore from backups if you have them. If you don't have backups, you must tread very carefully here. The first thing to do is to take your hands away from the keyboard and develop a game plan. An... | Please help me rescueing a failing hard drive |
1,398,618,849,000 |
we have rhel server version 7.5
and from lsblk we can see only the following disks , and all disks are with ext4 filesystem
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 278.9G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 278.4G 0 part... |
Perhaps your /etc/fstab specifies some mounts by either UUID= or LABEL= (causing mount to loop through all block devices it finds) and you have some garbage files as /dev/sdf and /dev/sdg that are not actual device nodes?
Run ls -l /dev/sdf /dev/sdg. If it displays anything, and the letter in the very first column of ... | mount + mount: special device /dev/sdX does not exist |
1,398,618,849,000 |
Here I read:
$ cd /media/mmcblk1p2
$ tar xf /media/sda1/mfg_images/st-image-bootfs-openstlinux-weston-stm32mp1-som.tar.xz
but as source file I don't have a compressed file, instead I have an ext4 image for that partition. Should I use dd with of=/dev/mmcblk1p2 or I need to use another approach?
|
You can mount the filesystem image directly into your filesystem:
mkdir -p /mnt/img
mount -o ro,noload imagefile.img /mnt/img
and then you can retrieve the file directly from the appropriate place underneath /mnt/img. (The ro,noload options mount the filesystem read-only. Omit them both if you want read/write access.... | Extract file from ext4 image and copy file to device |
1,398,618,849,000 |
What does +0200 mean after the Access/Modify/Change timestamps?
File: task-system.md
Size: 197 Blocks: 24 IO Block: 4096 regular file
Device: 33h/51d Inode: 14155787 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ tom) Gid: ( 1000/ tom)
Access: 2018-08-26 15:19:07.047602175 +0200
... |
That’s the timezone. The times are given in a UTC+2 timezone (the timestamps are stored as seconds since the Unix epoch, and translated to whatever the current user’s timezone is for display).
| Inode Timestamp Plus/Minus Interpretation |
1,398,618,849,000 |
When I run the following:
mv -v foo /mnt/bar
The directory foo and all it's sub contents is moved into the directory /mnt/bar. The order that files are moved appears to be directory order (ls -U).
Is there a good way to perform this same operation but ensure that the sub files/directories of foo are moved in alphabet... |
$ \ls foo | xargs -I% mv -v foo/% bar
'foo/one' -> 'bar/one'
'foo/sie' -> 'bar/sie'
'foo/two' -> 'bar/two'
'foo/uve' -> 'bar/uve'
'foo/wox' -> 'bar/wox'
'foo/zanzibar' -> 'bar/zanzibar'
Use ls to list items alphabetically. To make sure you're running pure ls (with no additional characters added by an alias hidden a... | How can I move a directory (and all sub files/directories) but move items in alphabetical order? |
1,398,618,849,000 |
I want to use MySQL 5.7's page compression feature, but this feature requires Linux's hole punching feature, and according to the documentation, this was introduced in 2.6.39. But my server's kernel version is 2.6.32, and I verified the page compression feature does work there, it's strange!
So I want to be sure wheth... |
You can test it by punching a hole yourself.
$ dd if=/dev/zero of=punch bs=100M count=1
creates a 100MiB file, with no holes, as can be checked with du:
$ du -h punch
100M punch
Now punch a 10MiB hole in it:
$ fallocate -p -o 2M -l 10M punch
The file’s size won’t change (as indicated by ls -lh), but it will take... | How could I confirm if my server supports hole punching? |
1,398,618,849,000 |
I have an ext4 partition containing rootfs.
I need to implement a system update (uboot) which just extracts and writes the new rootfs image. This probably works like dd-ing the image into MMC flash to offset where the rootfs ext4 partition is said to be.
We are doing first MMC erase and then MMC write. The erasing ope... |
If the image that you are writing to the mmc is a complete partition with the file allocation table, then NO you do not need to erase or zero out the old space. The old 'random' data left is not part of a file and will be over-written as the space is used.
Remember that a mmc device has a finite number of writes in it... | overwrite ext4 partition data without previous erase |
1,398,618,849,000 |
Is there a way to restore a folder or better the containing files and folders of the folder which was replaced by a empty one with the same name?
FileSystem: Ext4
OS: openSUSE 42.1
If it is possible, what is the easiest way?
Can I do this from the running system itself?
|
Don't do it from the running system, you should run a live cd or usb, mount the hard drive in read only, then try ext undeleted, or don't mount anything and try foremost or photorec. The more you use the system the less likely it is that you will recover your data. good luck
| Recover files inside a folder which was replaced by an empty one. (openSUSE, Ext4) |
1,398,618,849,000 |
a part of out homework assignment is to recover deleted files from the partition with the ext4 file system.
I've tried using the extundelete tool, by following this tutorial. The tool recovered a lot of files, which couldn't be opened, so I guess this doesn't do me any good.
Is there any other tool I could try, to rec... |
If you use software that risk modifying the deleted partition you should first make an image of the disk using dd, dd_rescue or the like.
When it comes to tools you could try out TestDisk and PhotoRec. TestDisk, now at version 6.13 has had support for ext4 since version 6.11.
TestDisk is gained towards partition recov... | Recovering files from partition (ext4) |
1,398,618,849,000 |
I use partimage to backup my ext4 partition, but during backup, the partition was detected as an ext3 partition. So I'm wondering if this can cause something bad.
|
http://www.partimage.org/Main_Page
Limitations - Partimage does not support ext4 or btrfs filesystems.
It is unwise to use it for ext4 as long as that message is on their website.
| is it safe to backup ext4 partition with partimage , which is detected as a ext3 partition |
1,398,618,849,000 |
I have an issue very similar to the question here:
https://askubuntu.com/questions/1370421/restore-ext4-hd-after-creating-gpt-partition-table
My problem seems to be that I had an ext4 filesystem which sat directly on a block device, and installing windows to an entirely different drive decided to mess with that device... |
It's not possible (that way).
You can't have a partition table, and a filesystem, on the same block device.
When you create a partition on /dev/nvme1n1, it gives you a new block device /dev/nvme1n1p1 — you have to use the new block device for the filesystem.
And that means shifting all data by the partition offset. Ke... | Fixing an ext4 whole-device filesystem and corrupt GPT partition table |
1,398,618,849,000 |
When I use the dumpe2fs command to look at the Block Group of the ext4 filesystem, I see "free inodes" and "unused inodes".
I want to know the difference between them ?
Why do they have different values in Group 0 ?
Group 0: (Blocks 0-32767) [ITABLE_ZEROED]
Checksum 0xd1a1, unused inodes 0
Primary superblock at 0,... |
The "unused inodes" reported are inodes at the end of the inode table for each group that have never been used in the lifetime of the filesystem, so e2fsck does not need to scan them during repair. This can speed up e2fsck pass-1 scanning significantly.
The "free inodes" are the current unallocated inodes in the grou... | Ext4 "unused inodes" "free inodes" diffrence? |
1,398,618,849,000 |
I delete a file from disk, then do some write operations on the same disk, and then run a recovery program to recover the said file.
Is there any way to check the integrity of the file?
Let the recovered file be an bitmap image. In my understanding since the data blocks that store the image pixel data may be overwritt... |
Some file systems have metadata blocks with checksums. With a lot of luck, these might still be intact, but typically, the metadata would be gone, so all you have is the intrinsic ability of the file itself to detect error.
First things first: images are relatively large files, and deleted files without remaining meta... | How to tell the integrity of a recovered file, specifically if pixel data of recovered image is corrupted |
1,398,618,849,000 |
I installed debian strech through the installer in a software raid 10 configuration.There are 4 drives, each is 14TB. Partition was formatted by the installer with ext4. The inode ratio defaults to 16384.
cat /proc/mdstat
Personalities : [raid10] [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4]
md3 : act... |
Your file system is over 16 TiB in size, so mke2fs defaulted to the “huge” file system type, with an inode ratio of 65,536 bytes. See the -T option in the linked manpage, and the huge type in mke2fs.conf:
huge = {
inode_ratio = 65536
}
| ext4 inode ratio discrepancy between /etc/mke2fs.conf and tune2fs |
1,568,027,654,000 |
I'm trying to recover data from damaged 3TB drive. I'm using ddrescue to make an image of it, but it takes forever while there are lots of read errors. I was wondering if I can have some luck with first 200GB (with large wholes in it) that I already copied. I read the partition table with gdisk and found the offset of... |
If the image size is too small, you can use fallocate or truncate to make it larger, or use dmsetup to create a linear device mapping to create a virtual larger device.
$ ls -lh somefile
-rw-r--r-- 1 user user 200G Sep 9 13:27 somefile
$ truncate -s 2T somefile
$ ls -lh somefile
-rw-r--r-- 1 user user 2.0T Sep 9 13:... | Recover data from truncated partition image |
1,568,027,654,000 |
Background
The first block of an ext4 filesystem is called the superblock - it contains essential metadata. There are backup copies of the superblock scattered throughout the filesystem; they can be used to recover if original superblock gets corrupted. They can be located with dumpe2fs and repairs can be attempted wi... |
...in the event of all backups being corrupt the filesystem is so far gone there is no point in trying to repair...
Exactly that, just use normal automatic offsite backups and ignore "superblocks".
| Manually backup superblock - how to & does it make sense? |
1,568,027,654,000 |
When using Linux in Virtualbox and dynamically-allocated disk, it keeps growing even though almost half of space is free:
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 94G 12G 78G 13% /
This disk takes >24G on disk and keeps growing, filesystem ext4.
|
In order to discard unused blocks on filesystem there is a command fstrim, part of util-linux package.
But to use it on Virtualbox, it is needed to enable discard option on your virtual disk by stopping you VM and running the following command:
VBoxManage storageattach <VM name> --storagectl "SATA" --port 0 --discard ... | Virtualbox dynamically-allocated disk *.vdi keeps growing |
1,568,027,654,000 |
noinit_itable Do not initialize any uninitialized inode table
blocks in the background. This feature may be
used by installation CD's so that the install
process can complete as quickly as possible; the
inode table initialization process would then be
... |
I would interpret this as inode initialization being a task that can impose latencies and degraded throughput.
The goal of the code would be to arrange for it to run during a relatively idle period. Initializing the inode tables in advance, would avoid a latency hit ("lag") when you actually need the inode tables.
I ... | What is risk or cost for the "noinit_itable" option of ext4? |
1,568,027,654,000 |
I have a production ESXI server with loads of VMs. I had a power outage a few hours ago that was so long my UPS's battery drained. The automatic shutdown mechanism wasn't working for some reason so the power was cut off for the whole system.
After the outage everything came up, except the mysql server VM. Now it spam... |
OK, I figured it out and successfully fixed it. It cost me two days.
First I verified that the storage controller, the datastore hardware (mechanical drive) and the cables are not faulty. Please note that I couldn't access the vmdk file on the filesystem properly. I tried to copy it locally, with scp and with the vSph... | I/O error after power failure, filesystem remounting as read-only [closed] |
1,568,027,654,000 |
I am prototyping a new embedded system that uses ext4 on Flash memory. These systems will be remotely deployed with no local sysadmin, so any diagnostics must also be done remotely via a network.
The default mount option for ext4 is to set the FS to read only when it encounters an error. I think this is too severe f... |
I would prefer to keep the system running (and tolerate some FS errors)
This is a contradiction in terms. When you get FS errors, your system won't be running for long. In fact, running with errors=continue is very likely to further damage a corrupt filesystem until there is not even any hope of sensible recovery.
I... | Any way to be notified of EXT4 errors when mounted with "errors=continue" |
1,568,027,654,000 |
I create a 4 GByte sized LV on a RHEL6 machine.
I created a 4 GByte sized EXT4 FS.
[root@server ~]# lvcreate -n newlvnamehere -L 4096M rootvg
Logical volume "newlvnamehere" created.
[root@server ~]# mkdir /newfshere
[root@server ~]# mkfs.ext4 /dev/mapper/rootvg-newlvnamehere
mke2fs 1.41.12 (17-May-2010)
Filesystem... |
You filesystem does have exactly the same size as the LV: mkfs.ext4 says
262144 inodes, 1048576 blocks
which is 4GB. The missing 192MB are accounted for by the journal (128MB) and the filesystem data structures (superblocks and backups).
Why are there so many different ways to measure disk usage? has lots more detai... | New FS size differs from LV size |
1,568,027,654,000 |
I've been wondering, what are the explanation of the columns in the /proc/fs/ext4/device_name/mb_groups file. The columns are:
#group: free frags first [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]
What's the meaning of every column ?
|
The file contains information on the buddy group cache of that specific disk and it's useful for the fragmentation status of said disk.
The fields which I found are for a slightly different output, but at least it's a little more info.:
#group: free free frags first pa [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9
2^10 ... | Content Explanation Of: /proc/fs/ext4/device_name/mb_groups |
1,568,027,654,000 |
I deleted a big extended partition containing an ntfs logical partition with high percentage of occupied space and from that extended partition I made a new, smaller extended part. In it I created an ext4 logical partition .
The newly created ext4 logical partition however comes with 1.75 GB already occupied. ... |
The used space reported by df is reserved space. This reserved space is used by ext filesystems to prevent data fragmentation as well as to allow critical applications such as syslog to continue functioning when the disk is "full". You can view information about the reserved space using the tune2fs command:
# tune2fs ... | What is this data that keeps reappearing after partition delete + new partition creation? |
1,568,027,654,000 |
I am playing with LVM and while doing lvreduce. I now get this error:
[root@localhost raja]# e2fsck -f /dev/vg1/lvol2
e2fsck 1.41.12 (17-May-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/vg1/lvol2
The superblock could not be read or does no... |
If the filesystem is really on that device, running mkfs.ext4 with the same arguments plus a -n will give you a list of superblocks that you can use as alternates. Eg:
# mkfs.ext4 -n /dev/vg1/lvol2
...
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208... | e2fsck giving some error |
1,568,027,654,000 |
From /. found this worrisome post by Theodore Ts'o. Turns out ext4 has some journalling problems. How can I quickly find out version numbers of susceptible kernels for this and other bugs?
|
You can track (and submit) kernel bugs in the Kernel Bug Tracker .
| What is a generic way of finding out whether the kernel has ext4 (or other) bugs? |
1,568,027,654,000 |
Given any file on an ext4 filesystem, it is possible (using filefrag -v) to get the list of real offsets+lengths where that file is located on the underlying block device.
Is it safe to open the device and write to them, all that while the filesystem is mounted read-write? Can it cause fs corruption?
I'm asking becaus... |
If the writes are only to the blocks of the file, then it wouldn't corrupt the ext4 filesystem. However, there is a definitely a bigger risk that some error in the code could corrupt the filesystem, which wouldn't happen with a regular loop device that is only using the file mapping.
The question is whether writing d... | Is it safe to write to file's extents directly while the FS is r/w? |
1,568,027,654,000 |
A question was given to us by a lecturer:
How many data blocks are needed to collect all the data in an EXT4
file system using inodes if the file size is 54 KB and there is a
block size of 4KB.
Answer: 15
The only explanation I can find is 54/4 = 13.5, which is round up to 14 data blocks and we add 1 inode block, so... |
It's hard to know what they're thinking exactly (you'd have to ask them), especially since they talk about "all data on the FS" (not just one file), and mention "using inodes" (in plural).
But, one thing they might be referring to, would be the basic block addressing, which addresses the first 12 data blocks directly ... | Each file gets one inode block |
1,568,027,654,000 |
I'm following along in this article to install arch in vmware on my m1 mac
I'm able to do fdisk just fine, and get the following partition table:
I then create the filesystem for partition 2 per the article with mkfs.ext4 /dev/nvme0n1p2. When I mount this with mount /dev/nvme0n1p2 /mnt, works fine
But when I attempt... |
You need to create a FAT filesystem on /dev/nvme0n1p1 before you can mount the partition:
mkfs.fat -F 32 /dev/nvme0n1p1
The step is missing in in the linked tutorial.
| Installing ArchLinux in VmWare Fusion on M1 Mac |
1,568,027,654,000 |
My question is in reference to this excellent answer here.
I need some more info,
If I change the Root Reserve Blocks (RRB) to any amount other than default in some version of Linux, will that be consistent if the HDD is moved to another Linux build in a different machine? even for virtualized operations?
Can anyone p... |
This value is not stored in any file but on the Ext4 filesystem's Super Block:
Offset
Size
Name
Description
[...]
0x8
__le32
s_r_blocks_count_lo
This number of blocks can only be allocated by the super-user.
[...]
0x154
__le32
s_r_blocks_count_hi
High 32-bits of the reserved block count.
[...]
... | Is changing root reserve blocks effects the Hard disk or its a OS dependent operation? |
1,568,027,654,000 |
we erased the disk signature as the following ( this is after we performed umount )
wipefs -a /dev/sde
/dev/sde: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef
then we check that disk is without file system as the following
lsblk -f
sde ext4 20eba791-c9c9-4462-aa23-74c40a41b8a0 ... |
From the man page of wipefs (emphasis mine):
DESCRIPTION
wipefs can erase filesystem, raid or partition-table signatures (magic strings) from the specified device to make the signatures invisible for libblkid. wipefs does not erase the filesystem itself nor any other data from the device.
So, the only thing it gu... | wipefs + disk not cleaned |
1,568,027,654,000 |
I have hundreds of folders with modification timestamps I'd like to preserve.
Now I need to copy a single file into them.
Aside from this way...
timestamp=$(stat -c %y /foldername)
cp /tmp/file.jpg /foldername/file.jpg
touch -d "$timestamp" /foldername
...is there a better way to suppress the folder modification time... |
Another approach is to use touch -r. In zsh:
() {
touch -r $2:h -- $3 && cp -T -- $2 $3 && touch -r $3 -- $2:h
} /tmp/file.jpg /foldername/file.jpg =(:)
Where =(:) creates an empty temporary file that is deleted as soon as the anonymous function terminates. -T (to force the cp to be a copy-to and never a copy-into)... | Inserting a file without altering the folder's modification timestamp? |
1,568,027,654,000 |
When I trace the function graph when calling write(), I find that within function ext4_file_write_iter() it locks the inode->i_rwsem by calling inode_lock(inode) at the beginning. After that call __generic_file_write_iter() to write data to file. And unlock the inode in the end.
So is it the inode->i_rwsem used to pro... |
inode->i_rwsem is used internally by the kernel to ensure that the kernel itself doesn't read or write from/to a file at the same time, to avoid any corruption or race conditions. It doesn't affect the userspace; you can still have the file opened for read/write by multiple processes at the same time. But if multiple ... | What‘s different between inode->i_rwsem and i_flctx? |
1,568,027,654,000 |
TL;DR
I have a dd image disk.dd which has multiple partitions. The end goal is to reduce the size of this dd image file.
After deleting and recreating a higher numbered partition with a start sector offset lower than it was before, (i.e expanding the partition to the left) I have a partition which has a filesystem in ... |
It's not possible with fsck. In a filesystem, everything has offsets and if you change the start sector, all of these offsets change. fsck simply has no facility to re-write all offsets for everything (superblocks, journals, directories, file segments, etc.). And even if you could do that, it would only work if the ne... | Move filesystem to the left after expanding partition to the left |
1,568,027,654,000 |
According to this Seagate presentation there are some ongoing (?) efforts targeted toward modification of ext4 file system introducing SMRFS -EXT4 - support of hmHDD. The goal is to provide layer that will hide specifics of ZAC commands from applications (I believe).
There is also this document that claims that "As of... |
"As of kernel v 4.7... Host managed drives are exposed as SG node - No block device file". What does it mean?
You'll get only the /dev/sgX SCSI generic device, it's a character device which allows you to send SCSI commands to the drive. I'm not sure what is the correct use case in case only the SG node exists -- sol... | What linux distro support SMR HDD by file system? |
1,568,027,654,000 |
I noticed poor I/O utilization when rsync'ing from an external HDD (connected with USB 3.0) to a RAID6 (4 HDDs) with ext4. iostat shows that reading from the USB HDD happens for most part at 110 MB/s (that's in line with specs). iostat also shows that for about 50% of the time, nothing is written to the RAID. At some ... |
It turned out that the system was configured to minimise disk writes through a large write cache. The settings vm.dirty_ratio (% of cache that has to fill up before a blocking write-out happens) and vm.dirty_background_ratio (% of cache at which a non-blocking write-out starts) were set to 90 which queues data until i... | Poor I/O utilisation with rsync, RAID6 and ext4 |
1,568,027,654,000 |
In trying to understand why kworker flush uses 99% I/O and hangs file write on machine, I've disabled journalling on the ext4 data partitions using:
tune2fs -O ^has_journal /dev/sdg1
After a reboot, automatic mounting of the partitions via /etc/fstab entries failed:
# mount /mnt/das.f
mount: /mnt/das.f: wrong fs type,... |
Looking at the code there is a difference in how libparted and libblkid detect ext version. The version is not written in superblock and both tools use supported features to distinguish between versions.
For ext3 without journal both tools will report ext2 which makes sense because the difference between those two is ... | Inconsistent filesystem type reported after disabling journalling |
1,568,027,654,000 |
A Passwords file was in use by KeePassXC. After restart, file is gone.
Normal operation is: File is open and when system gets rebooted, it closes it safely (so far). Keepassxc always always autosaves. I've rarely seen "Save" available from the menu.
Could KeePass have mishandled the file so badly that it just disappea... |
Unix, unlike Windows, allows files to be deleted while they are open and in use by an application. It is even more likely that KeePass has just read the file into memory, and is not holding the file open because the on-disk data is encrypted, so the contents are decrypted into memory and then the file is closed.
There... | Can a file disappear from an ext4 partition if an application was using it? |
1,568,027,654,000 |
I have heard some group discussing file systems (btrfs vs ext4 and something like that) to use in Linux on computers with less disk space (like 32GB ideapad, notebook etc.).
Does the filesystem choice really affect the used by the same file? I mean can we have more available disk space by choosing a different file sys... |
Yes, it can make a lot of difference... Usually it makes the most difference on file systems with a lot of smaller files. So it may not make a difference to your video collection (mostly GB files) or even you music collection (mostly MB files). But a file system filled with many files only a few KB will definitely ... | Do file systems affect the available storage space? |
1,568,027,654,000 |
I am using a NetGear ReadyNAS machine as a NAS for our server. The server is a linux CentOS 6.6. The server is run using Rocks cluster, with all our users' home directories located on the NAS. My understanding is that the home directories are automounted to /home when a user logs on.
Recently we have been facing the ... |
The NAS is probably using a filesystem which doesn't use static inode tables. The most notable modern examples of such filesystems are BTRFS and ZFS, but most newer filesystems use dynamic inode allocation, and many (including BTRFS) have opted to just not report anything for inode usage because it just doesn't matte... | Why is mounted nas showing 0 inodes on users partition? |
1,568,027,654,000 |
Say I've got two dual-boot Linux systems on the same computer. Both share the same /home mount point.
Amy, the only user on system 1, has a UID of 1000. She stored some files in /home/amy. Bill, the only user on system 2, also has a UID of 1000. Can Bill access /home/amy without any restrictions?
Also, is this situati... |
Yes. Bill will access Amy's files with no restrictions. Unix security is based on UID, not user names. If your HDD ext4 partition contains sensitive data, you may want to encrypt it as any root user on a foreign machine may access it anyway.
| Data accessible from other systems with the same UID? |
1,480,039,976,000 |
I recently used Clonezilla to move from a very old HDD (160GB) to a new SSD (480gb). Clonezilla did a fine job but it left a lot of empty space unused. I made an attempt to extend the primary OS using GParted - but it didn't work. At this moment I don't have physical access to the server but I can remotely work on it ... |
Your problem is the swap partition in the middle of the drive. The good news is you have enough free space to make a swap file, so you don't have to go swapless:
(as root)
dd if=/dev/zero of=/swap bs=1M count=8192
chmod 0000 /swap
mkswap /swap
swapon /swap
swapoff /dev/sda5
Now you can use the fdisk interface to rese... | Resizing (increasing) primary OS partition |
1,480,039,976,000 |
I run Ubuntu 16 Desktop as host and on VirtualBox running Ubuntu 16 Server as guest which is using raw partition on another disk different from the one used by the host.
I am searching for a solution which will allow me to have safe read-write access to the guest's FS (or at least to some directory on the guest partit... |
Don't do this...
If two operating systems try to access the same raw block device at the same time then you should expect to see data corruption. Even if one of them is read-only, that read-only instance will cache data (eg directory contents, file contents) and won't know that the underlying data blocks have changed... | How to get read-write access (safe) to ext4 filesystem used by second OS running from virtualbox |
1,480,039,976,000 |
netrw plugin in Vim allows one to see directory files. Fow example here I start Vim with vim .:
" ============================================================================
" Netrw Directory Listing (netrw v155)
" /root/vim/code/files
" Sorted by name
" Sort sequence... |
Reading a directory does not really happen as a file. It happens with the readdr system call. See man 2 readdir for the old implementation as a pure system call and man 3 readdir for the wrapper (please, don't use the old implementation).
Yet, Vim's netrw does not perform anything like that. It simply calls ls or p... | Does Vim netrw plugin actually display the content of directory file? |
1,480,039,976,000 |
I have Win Xp on first Primary Partition.
I am leaving another 2 primaries for a future possible Win install.
I am planning my Logical partitions to install a Linux Mint.
I read that a separate /home gives re-usability across future Linus'es.
I thought it might be clever to keep /home as NTFS, to smoothly share dat... |
The Linux implementation of NTFS is not very good. There is some write support, but it is slow. This is due to the fact that the best NTFS for Linux implementation, NTFS-3G, is a FUSE filesystem, where every filesystem call gets redirected to a userspace program, a strategy which carries with it a sever performance pe... | Choosing File Format of /home between NTFS and Ext4, Understanding Trade Offs in Performance vs Data sharing with WinXP in Dual boot [closed] |
1,480,039,976,000 |
[nathanb /mnt/work] sudo du -hs .
23G .
[nathanb /mnt/work] df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 40G 38G 6.4M 100% /mnt/work
Where is the other 15 GB?
/dev/sdb1 on /mnt/work type ext4 (rw,nosuid,nodev,relatime,data=ordered)
Updating to respond to comments
[nathanb /mnt/work] s... |
Given that the filesystem was exported via NFS, there’s a fair chance that the discrepancy was due to deleted files... If files are deleted while open on NFS clients, lsof on the server won’t see them because there is no /proc/.../fd entry corresponding to them; but they will still occupy disk space as seen by df.
Dia... | 15 GB of unaccounted-for space in filesystem |
1,480,039,976,000 |
I have a problem and I appreciate if anyone can help me.
1:
fdisk -l:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 5... |
First, back everything up, as you should always do when faffing about with partitions.
Turn off the swap with swapoff /path/to/swap_partition (optional), boot up a GPartEd LiveCD or other live distro with GPartEd. Remove the swap partition, extend your sda2 partition as desired, and create a new swap partition in the... | How to increase the size of Linux Partition (EXT4) without loosing data when the swap partition is exactly after it? |
1,480,039,976,000 |
How can I check and mark bad blocks on Linux startup? There are a number of options available and most of them require accessing hardware and running live CD's. But I would like to avoid and perform everything using command line without going to the server room and talking to admins who have the keys.
I have ArchLinux... |
If your init scripts support it, you can add -c -c to /fsckoptions (then create /forcefsck and reboot). Unfortunately, this feature isn't available everywhere. You probably have to reboot to a LiveCD/LiveUSB instead.
Perform Bad Blocks Scan on Root Partition in Linux
| archlinux check disks on boot |
1,480,039,976,000 |
I'm using ext4 filesystem in SSD,when mounting SSD,could I use flag "barrier=0"?
I knew this flag is safe for BBU(battery backup unit),but is it safe for SSD?
|
You can use, but it's same safety as rotating rust. just because ssd has no moving parts doesn't make it invulnerable to power outage.
A small caveat: depending on the model, it's possible the ssd has enough capacitors to finish transfer of any cached data to non-volatile storage, but this is never guaranteed.
Of cour... | Could I set flag "barrier=0" when using SSD? |
1,480,039,976,000 |
I know that it isn't possible to change the inode count of an ext filesystem after its creation, but I haven't been able to find any explanation on why it isn't.
Can anyone enlighten me?
|
Why? Because no one has written a tool that does it. And that's probably because it's a not entirely trivial change to the filesystem metadata.
There are other issues like this; for example you can't resize ext4 to >16TB. That needs 64bit structures which aren't used by default.
Same with other filesystems, for exampl... | Why is it impossible to change the inode count of an ext filesystem? |
1,480,039,976,000 |
I'm recovering a PV on a mdadm RAID 1 with a single VG containing several LVs.
The underlying devices have several bad sectors (one just a few, the other really much) and a silly typo made it necessary to restore the LVM configuration by grepping through the devices. Luckily I found it and the restored configuration l... |
For anyone who has a similar problem:
I used e2sl [1] to actually find candidates for the filesystems directly from one of the RAID devices and mounted the filesystem using a loop device [2] skipping LVM and the software RAID. I had to fiddle a bit with the offset (The superblock position has an offset of 1KB to the s... | Restored VG has shifted volumes |
1,480,039,976,000 |
I had an encrypted ext4 partition on a Samsung T7 1TB USB drive. It was LUKS (I believe this may be called a LUKS container?) The partition was 850GB. It had about 130GB in use. I also had an unencrypted 100GB NTFS partition and a very small amount of unallocated space.
I tried to use KDE Partition Manager to shrink t... |
To recap, after resizing partitions, you got this mount error:
wrong fs type, bad option, bad superblock on /dev/mapper/luks-5c9cfaa5-0576-4b47-8e65-05f7d8b52d39, missing codepage or helper program, or other error.
Getting this far already means there is no issue with the LUKS header itself.
According to dmesg, the ... | How do I rescue an encrypted LUKS partition after failed shrink |
1,480,039,976,000 |
Can you make a trustworthy EXT4 filesystem-scan of an online filesystem, e.g. root, by taking a LVM snapshot and then do a scan on the snapshot, something like:
Make a snapshot:
lvcreate --snapshot --size 1G --name lv_root_SS --chunksize 4k /dev/VG1/lv_root
EXT4 scan:
e2fsck -f /dev/dm-3 (device-name of the new shap... |
Yes, you can do this, and there’s even a tool for that: lvcheck. This follows the same approach as your description, with some additions:
it lists all active LVs (which can be checked using a snapshot)
it checks how long it’s been since the last check for each LV
for each LV, snapshot it, run fsck, delete the snapsho... | Scan online EXT4 using LVM snapshot? |
1,480,039,976,000 |
On my server, I had an SSD as the boot drive with 11 6TB HDDs in a RAID6 setup as additional storage. However, after running into some issues with the motherboard, I switched the motherboard to one with only 4 SATA ports, so I reduced the size of the RAID6 setup from 11 to 4 drives. With <6TB of actual data being stor... |
Your ext4 filesystem is (much) larger than your block device (54TB filesystem on a 12TB block device). e2fsck and resize2fs can be quite uncooperative in this situation. Filesystems hate it when huge chunks are missing.
For a quick data recovery, you can try your luck with debugfs in catastrophic mode:
# debugfs -c /d... | RAID6 unable to mount EXT4-fs: bad geometry: block count exceeds size of device |
1,480,039,976,000 |
Recently my computer's PSU died. I am not aware how exactly this happened, but I restored my computer's functionality. I run PopOS 22.04 LTS Linux, and my OS also became unbootable. I repaired it with a bootable USB. When booting in though, I discovered my 2TB Data HDD is also gone.
Its partitions have been replaced w... |
I decided to use R-Studio for Linux to recover my drives. I purchased another 2TB to move them onto, and to later use as a RAID 1 array. The software was amazingly able to find all my files with the exception of a few filenames. I guess recovering through TestDisk would've been possible but I am not knowledgeable enou... | ext4 partition on 2TB HDD gone and replaced with Windows FAT12 partition |
1,480,039,976,000 |
I'm trying to boot an STM32MP157a-dk1 using an image that i made with buildroot but when i boot i got this message :
Unable to write "/uboot.env" from mmc0:4
Help me please !!
H.M
|
I changed in my configuration via the menuconfig and in the EXT2_MKFS_OPTIONS I used:-O ^metadata_csum,^64bit.
| Failed to boot STM32mp157a-dk1 using a buildroot image |
1,594,968,503,000 |
The output of df -h as below:
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 796M 1.7M 794M 1% /run
/dev/sda7 85G 6.2G 74G 8% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.9... |
the output of parted shows that 2 is built up of 5, 6 and 7. Maybe that would be clearer if the start end end adresses of the sectors would not be in human readable form (compare it to the output of fdisk -l /dev/sda).
That means it is no solution to use 2 for your homedirectories, since they are already part of it.
W... | How to format and use the extended partition |
1,594,968,503,000 |
On the same model of industrial PCs, I see UUID of the main SSD changed. Those 2 IPCs are restored from 2 similar but different Linux disk images. Question is as per the title. UUID of the main disk /dev/sda2 is different.
Both Ubuntu 16.04.
Linux disk image A: Kernel 4.15.0-65. UUID bc96e844-27c1-4ccb-af66-053cce7c... |
Update:
Here's what's happening. The images are themselves copies of raw disks with partitions and filesystems. The disk layout, filesystems, contents and all will then be written to the disk on the computer you're imaging. At some point someone ran mkfs to create the filesystems used on the image and a UUID was gene... | What triggers disk's UUID to change? |
1,594,968,503,000 |
I'm trying to install Linux on a 20-year old Compaq HP Pavilion ze4300 with 256 MB RAM (I think) without internet connection.
I can boot from CD but not from USB.
Unfortunately I ran into this excruciating problem.
Basically, my attempt at installing lubuntu resulted in ext4 hard disk file system. Lubuntu doesn't hav... |
You can use mke2fs -t ext3 to format a filesystem that is compatible with ext3 on older kernels. This will disable newer ext4 features.
| ext4 issue on very old machine |
1,594,968,503,000 |
Is there any way to mount an ext4 partition in another PC, running Windows, at the same network in my Ubuntu Live?
My HD just died earlier today and I needed to use Live Distros until I get a new one. I choose Ubuntu 18.10. I customized my Ubuntu Live and to do it I needed to make an EXT4 partition on my notebook HD(r... |
Unfortunately¹, Windows cannot even read EXT4 partitions without third-party software. There are a few of them out there that can do local read-only mounting of EXT4 partitions but only one (commercial) that can do both reads and writes.
However, none of those will allow you to share these on a Windows Network: they'r... | Mount an ext4 partition in another PC(Windows) at the same network in my Ubuntu Live? |
1,594,968,503,000 |
I love xfs_copy's ability to clone an xfs file system from disk to disk. Is there an equivalent tool to clone an ext4 file system?
I've tried dump/restore, but it requires the destination file system to be created and mounted. So it is not an equivalent to xfs_copy.
What is the "xfs_copy" equivalent for ext4?
|
The ext4 wiki suggests e2image -rap. The last two options are not otherwise documented; personally this would make me wary of using it. The manual page only describes its use to send debugging information to the filesystem developers.
partclone.ext4 --dev-to-dev will also work. partclone is third-party software, no... | "xfs_copy" equivalent for ext4? |
1,594,968,503,000 |
I have a completely standard, single hard drive Fedora 23 desktop. The dual-boot installer set up the Linux partition as LVM, with root, swap and home logical volumes; root and home were both ext4. Having recently added an additional 4 GB of ram, I decided to expand the swap volume by shrinking the home volume by 4 G... |
You don't have to run anything after resizing, but you cannot just resize the logical volume even if you have unmounted the filesystem on it. You have the resize the filesystem first (for ext4 you can use resize2fs), to make sure there are unused blocks in the logical volume that can be freed up (to transfer to swap).... | Ext4 corrupted and unrecoverable after LVM resizing + power failure |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.