New answers tagged

1

My question now is: can I safely assume that the free blocks from the resize2fs operation are located at the end of the physical device Yes, that's the assumption you'd need to make even if it was a partition and you were going to shrink it. and thus pass count=<newsize> bs=4096 as argument to dd? Well, probably. dd is a bit weird in that dd count=N ...


2

Create a partition on sdb (optional you can use the entire disk) with fdisk or parted. Create physical volume on the partition: pvcreate /dev/sdb1. Add the new PV to you existing VG: vgextend server-vg /dev/sdb1. If you are doing this to resize your root LV, you can do that by lvresize --resizefs -L+800G server-vg/root. (-L+800G means to grow it by 800 GiB, ...


2

It looks like you use(d) rsync and it failed midway through syncing: A42_w_RP_4.csv.F3BeE932.


0

agreed USB might be okay to push backups over (still it is actually pretty pretty slow) but neither RAID over USB nor TCP-NETWORK over USB has been reliable and fast (yet). backup faulty filesystem before messing with it (if the resources are there (additional external disks or NAS of sufficient size) when backup is one, the user can safely run whatever ...


1

If the mounted source for some reason is no longer accessible (in my case my domain password expired), the mount point directory is empty and (at least for me) the mount no longer shows up in /proc/mount. I desperately searched for any such mounts since I suspected there was some mount that frequently tried to access my domain account with old credentials (...


1

You're reusing rl to do the unlock by overwriting l_type with F_UNLCK, and you're not resetting l_type in the loop. Both of your examples are locking only on the first loop iteration.


0

If the subvolume in question is read-only, it cannot be deleted directly (even as root), it must be made writable first: sudo su btrfs property set -ts /BTRFSROOT/subvol_root_borked/ ro false btrfs sub delete BTRFSROOT/subvol_root_borked/


1

In a recent version of Grub in debian the defaults were changed. By default, grub's setup scripts no longer scan for other OSen. This behaviour was documented at https://wiki.debian.org/Grub : When I upgraded from GRUB to GRUB2 I lost an entry to XP/WP7 , how can I recover the menu entry to boot there? You have to install os-prober, make sure its enabled in ...


0

I could not find the root cause of this problem, so I decided to ditch LVM in it's entirety and replace it with mdadm - which worked like charm on the first try. Creating mdadm RAID5 (initially with 3 disks) Creating with three disks (henceworth raid-devices = 3): mdadm --create mediaraid --level=raid5 --raid-devices=3 /dev/sda /dev/sdb /dev/sde ...


0

I eventually got it working. First, I installed the dependicies: $ sudo apt-get update && sudo apt-get install libncurses-dev flex bison libelf-dev bc dwarves binutils binutils-dev -y Next, I by making a folder for the kernel (~/kernel). I went into the folder, and downloaded the tarball for the 5.15 kernel: $ wget https://cdn.kernel.org/pub/linux/...


0

One possible cause of more btrfs space being allocated for data than there is visible data is unreachable parts of extents (data in extents containing older versions of file content which has since been overwritten). To analyze programs like this, I created btdu, a disk usage profiler for btrfs: https://github.com/CyberShadow/btdu The tool will identify the ...


1

Instead of using find, you could set the necessary shell options to also glob hidden files and have recursive globbing and then do something like for entry in ${DIR}/**/**; do chown "${OWNER}:${GROUP}" "${entry}" if [[ -d "${entry}" ]] ; then # do the thing you do on directories else # do the thing you do on files ...


2

Apparently this was a short-lived hack from 2005 to fix the problem of accessing devices larger than 2TB in size. The reason it is called Linux plaintext is because it allows you to edit the partition table by hand using an editor like vi, emacs or nano. On a german language forum from 15 years ago, I found a reference to this in the LKML here: https://web....


0

One thing worth mentioning, after you do in linux dd if=somebootableimage.iso of=/dev/sdx the usb stick will be problematic if you wish to reuse that usb stick under Microsoft Windows. The Windows disk manager will not let you recreate a NTFS partition on it, giving the impression the usb stick is broken. If there is a way in Windows in diskpart in the ...


3

When you use of=/dev/sda, dd will overwrite everything starting from physical block #0, including any partition tables and filesystem metadata. Erasing the disk before writing the ISO is an unnecessary step, unless you need to give the bootable USB to someone else and/or otherwise need to ensure that any data that used to be on the USB is definitely erased.


0

I've got this working on Ubuntu 20. In order to see/access the files on the apfs mounted drive I had to start nautilus file manager in elevated mode: $ sudo nautilus That's all


2

Files’ apparent size isn’t necessarily the same as the space they really occupy on disk: $ truncate -s 10P hugefile $ ls -l hugefile -rw-rw-r--. 1 skitt skitt 11258999068426240 Jan 7 11:49 hugefile I don’t actually have a 10PiB disk, and thankfully hugefile doesn’t occupy 10PiB: $ stat hugefile File: hugefile Size: 11258999068426240 Blocks: 0 ...


0

The issue in this instance was directly related to the CPIO archive I created. Although I was using the correct cpio and gzip commands, I was piping incorrectly due to a typo in the TinyCore book. Using the following command, I was able to create a cpio file that was readable: cd fs_folder sudo find | sudo cpio -o -H newc > ../fs.cpio gzip -2 ../fs.cpio ...


2

The find utility can be made to stay within a single filesystem if you use it with its -xdev option. This means that the command find / -xdev -type f -exec grep -w -F 'word' {} + ... would stay within the root filesystem and not wander off into /sys or /proc. In the root filesystem, it would pass batches of file pathnames to grep to look for the word word. ...


0

Interface, and common functionality. Interface File-systems need to implement the interface Common functionality There are some things that all file-systems would have to implement, but the implementations would be the same. E.g. caching, symlink traversal. (Note I have not worked on it, so may have a few errors)


2

find / -path /sys -prune -o -path /proc -prune -o -type f -exec grep -r "some_word" {} \; I believe this is what you want


1

Nothing in your question proves that the file /opt/etc/network/interfaces is actually on the /opt filesystem. One of the directories on that path could be a mount point. Or, more likely, either /opt/etc/network/interfaces itself or one of the directories /opt/etc or /opt/etc/network is actually a symbolic link whose target is on another filesystem. To see ...


1

This is a situation I've run into before, although this is an extreme case in my experience. This usually happens when there are files that have been deleted from disk, so du doesn't report them, but they are still open inside a running process somewhere, so df considers that space used. The most frequent "offender" is logrotate not properly ...


0

What's the state of CONFIG_BLK_DEV_INITRD option? It should be just before the CONFIG_INITRAMFS_SOURCE, and I believe it should be enabled. CONFIG_BLK_DEV_RAM is a generic RAM disk, while CONFIG_BLK_DEV_INITRD would be the initramfs/initrd specifically. Since your initramfs.cpio.gz is gzipped, you'll also need CONFIG_RD_GZIP=y.


0

we got fstransform https://github.com/cosmos72/fstransform same tutorials: https://access.redhat.com/discussions/6134431 [1] https://fedoramagazine.org/transform-file-systems-in-linux/ [1] Step 1 Install tool from EPEL repository: $ sudo yum -y install fstransform Step 2 Check current setup for file system /myfs: $ uname -a && sudo lsblk -f | awk '$...


0

There was actually still a bug with bigalloc until Kernel 4.20. If your kernel is not up-to-date you may experience this problem: Bug 151491 - free space lossage on busy system with bigalloc enabled and 128KB cluster: file system with bigalloc enabled and 128KB cluster size with a large number of 2MB files being created/overwritten/deleted loses usable ...


2

Every file manager (caja, nemo, nautilus, etc) has its own way of arranging and showing places and devices. "Computer" is not a directory but a category used by caja to sort such things. A place is a path that stems from the root directory /. A device can be shown in the file manager but not mounted. When you click on it it will mount in some path, ...


6

LUKS itself doesn't protect against bit rot. If you want protection against bit rot on the block device level you need DM integrity. LUKS 2 can be combined with integrity to get authenticated encryption (cryptsetup luksFormat with --integrity) and with that system will be able to detect that the data changed, but that isn't really helpful against bit rot -- ...


17

Bitrot in the LUKS header (key and otherwise critical material): it's *poof* gone. (There is a bit of redundancy and checksum for the LUKS2 header but it doesn't cover much, so chances are... it's still gone). Bitrot in encrypted data: it depends on the encryption mode, but in general, a single bit flip will result in 16 wrong bytes. Set up encryption: # ...


4

Eventually I solved this using smitty tool. (Specifically smitty nfs, as I wanted to remove NFS filesystem). Alternatively, you can use the underlying chnfsmount command with the -a option, which: specifies that it should not be automatically mounted at system restart smitty nfs - "Change / Show Attributes of an NFS File System" uses chnfsmount ...


Top 50 recent answers are included