disk

Confused about command line options for Linux mkfs

Confused about command line options for Linux mkfs I am formatting a new drive on Ubuntu 20.04, and I am at the step where I format the drive to ext4. One article (https://linuxize.com/post/fdisk-command-in-linux/) says to do this: sudo mkfs.ext4 -F /dev/sdb1 The article doesn’t say what the -F option is, and there is no -F …

Total answers: 1

How to make Linux read partition table in a partition?

How to make Linux read partition table in a partition? I have a (GPT-partitioned) disk, for example /dev/sda. /dev/sda8 is a partition on that disk. I used the cfdisk utility to create a GPT table with few partitions in /dev/sda8. I expected these partitions to become available via something like /dev/sda8p1. But Linux did not …

Total answers: 2

Recovering an ext4 partition

Recovering an ext4 partition I have an external drive with an ext4 partition /dev/sda1 I use for my local borg backups. It is simply plugged in via usb port, and, mounted with an fstab generated systemd automount entry. I ran a backup yesterday in the evening without any errors, and this morning, I plugged it …

Total answers: 1

Is it safe to use /dev/disk/by-id/ instead of /dev/sda?

Is it safe to use /dev/disk/by-id/ instead of /dev/sda? I am currently using a simple way to back up the drive dd if=/dev/sda of=/dev/sdb. However, before each operation, I have to check fdisk -l to see if sda and sdb have been swapped during boot. This is quite inconvenient and error prone. Is using symbolic …

Total answers: 1

Disk size is variable

Disk size is variable I was flashing a new operating system to a device, but after the process was complete, I couldn’t boot into it. I then checked the disk, and I noticed something strange. Different tools report different sizes for the disk, even though it should be approximately 120GB in size. So, I decided …

Total answers: 1

Is it important to delete GPT/MBR labels before reformatting/repartitioning?

Is it important to delete GPT/MBR labels before reformatting/repartitioning? I’ve seen some disk formatting/partitioning discussions that mention destroying existing GPT/MBR data structures as a first step: sgdisk –zap-all /dev/nvme0n1 I wasn’t previously aware of this, and when I’ve set up a disk, I’ve generally used: parted –script –align optimal /dev/nvme0n1 — mklabel gpt mkpart ESP …

Total answers: 1

How to combine two partitions?

How to combine two partitions? I installed Linux Mint in a dual boot alongside Windows 11, however now I am trying to get completely rid off Windows 11, however I haven’t been able to combine the two partitions that I used for personal data storage (one of them is empty, so no need of keeping …

Total answers: 1

ubuntu–vg-ubuntu–lv and vgdisplay give different sizes for different commands

ubuntu–vg-ubuntu–lv and vgdisplay give different sizes for different commands Even though the disk size is 221.57 GiB and there is no unallocated disk space and /dev/mapper/ubuntu–vg-ubuntu–lv gives only 98G where did the rest go? output of: fdisk -l /dev/sda Disk /dev/sda: 223.58 GiB, 240065183744 bytes, 468877312 sectors Disk model: SanDisk SSD PLUS Units: sectors of …

Total answers: 1

Problems with re-sizing a partition in 20.04

Problems with re-sizing a partition in 20.04 I’m running an Ubuntu 20.04 LTS VM in Hyper-V. I recently resized a VHDX disk from 15GB to 100GB. Then I tried to use parted and resizepart 1 100%. After that nothing had really change. df -h: Filesystem Size Used Avail Use% Mounted on udev 3,9G 0 3,9G …

Total answers: 1

Accidentally deleted the device node /dev/sda1

Accidentally deleted the device node /dev/sda1 I was cleaning up my system and obviously got a little carried away. I ended up running: sudo rm -rf /dev/sda1. I can still see it running lsblk and df -h that /dev/sda1 is mounted on /, however it does not exists as special device under /dev/. I can’t …

Total answers: 1

Ubuntu gives message "Welcome to emergency mode !", fsck just says "clean"

Ubuntu gives message "Welcome to emergency mode !", fsck just says "clean" There were 3 disk drives on the server, but one failed with input/output error and is not recoverable. When trying to boot with the remaining 2 drives, I get: Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, …

Total answers: 1

What's the small 1M partition that goes before the EFI partition?

What's the small 1M partition that goes before the EFI partition? I’m seeing that all my EFI disks have a 1M partition that goes just before the the EFI partition: Device Start End Sectors Size Type /dev/sda1 34 2047 2014 1007K BIOS boot /dev/sda2 2048 1050623 1048576 512M EFI System /dev/sda3 1050624 … I have …

Total answers: 1

convert MAJ:MIN – device numbers to real disks names

convert MAJ:MIN – device numbers to real disks names from sar command on saX file we can get the disks utilization as the follwing sar -d -f /var/log/sa/sa18 | grep Average Average: dev8-0 1.24 0.00 150.06 121.40 0.04 30.40 4.72 0.58 Average: dev253-0 0.32 0.00 3.75 11.83 0.01 17.95 3.48 0.11 Average: dev253-1 0.00 0.00 …

Total answers: 2

Which "size" file should I use to get the disk size?

Which "size" file should I use to get the disk size? My disk is sda and I have these size files: /sys/dev/block/8:0/size /sys/class/block/sda/size /sys/block/sda/size Which one should I use? The first one is used by lsblk. Are there any differences? Asked By: zomega || Source Check out ls -l /sys/dev/block/8:0 /sys/class/block/sda /sys/block/sda You’ll see that …

Total answers: 3

Restoring OS image after performing disk encryption

Restoring OS image after performing disk encryption I have an Ubuntu 20.04 system which is already in use and requires to have its disk encrypted. I have reviewed some methods to perform encryption after installation. But the general suggestion has been that it is easier to backup data, perform a new installation and restore data. …

Total answers: 1

What does the 5th column mean in the lsscsi output?

What does the 5th column mean in the lsscsi output? List SCSI devices in my os: debian@debian:~$ lsscsi [0:0:0:0] disk ATA ST500DM002-1BD14 KC66 /dev/sda [1:0:0:0] disk ATA WDC WD2500AAKX-0 1H15 /dev/sdb [4:0:0:0] disk ATA ST1000VX000 SC23 /dev/sdc [9:0:0:0] disk Innostor Innostor 1.00 /dev/sdd What does the 5th column mean in the lsscsi output? debian@debian:~$ lsscsi …

Total answers: 1

Is there a way to replace a magic superblock?

Is there a way to replace a magic superblock? Following instructions from the Internet (Without doing research first) I have blanked out the superblock on the incorrect RAID disk. Using this command; sudo mdadm –zero-superblock /dev/sdd Now when I try to assemble the array I get this error; mdadm: No super block found on /dev/sdd …

Total answers: 1

Which disks does "sync" synchronize?

Which disks does "sync" synchronize? The man page of sync can be found on die.net. I wonder if it only synchronizes the disk of my current working directory (cwd) or all disks? The man page does not say anything about it. Asked By: somega || Source The sync utility is mostly a wrapper around the …

Total answers: 2