date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,543,156,167,000 |
just noticed I was using SDD for SSD. Corrected
I need help interpreting this situation. /dev/sda is a data disk backed up and with reproducible data so this is not system critical but I'd like to avoid the effort of restoring/reconstructing the data some of which will be quite time consuming
Is recovery / repair poss... |
I don't know what you've been doing with this disk, but that's crazy numbers! Looking at that output that SSD has been on:
1470 hours (61 days)
performed 4312400063 (2.0GiB) block erases
163210068006 (76TiB) media writes.
That's a constant 16MiB a second of writes over 61 days.
I imagine you've got internal NAND fai... | ssd won't mount: bad superblock but no bad blocks: write errors |
1,543,156,167,000 |
For every multipath disk label in /dev/mapper I have another with 1 in the end. Are they the same? is there some relationship?
For example:
/dev/mapper/mpathaj and /dev/mapper/mpathaj1
or
/dev/mapper/mpathai and /dev/mapper/mpathai1
when I issue the command od --read-bytes=128 --format=c /dev/mapper/mpathai, the disk ... |
I would expect that /dev/mapper/mpathai to be the whole disk/LUN, and /dev/mapper/mpathai1 the first partition on that disk/LUN. But it also could be something like a LUKS encryption layer with a confusingly chosen name.
On device-mapper based devices (multipaths, encrypted disks, software RAID...), partition detectio... | Multipath - what is the differences between /dev/mapper/mpathxx and /dev/mapper/mpathxx1? |
1,543,156,167,000 |
we have the following disks from lsblk , all disks are not lvm
sdc 8:32 0 80G 0 disk /var/hadoop1
sdd 8:48 0 80G 0 disk /var/hadoop2
sde 8:64 0 80G 0 disk
sdf 8:80 0 80G 0 disk
sdc and sdd disks are full ( 100% used )
the status is t... |
Instead of adding disks on the level of operation system you can do this directly in hadoop. You can add them to the dfs.datanode.data.dir property. The format is
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///disk/c0t2,/disk/c0t3,/dev/sde,/dev/sdf</value>
</property>
I am not 100% sure hadoop ca... | is it possible to increase disk size by using/adding another clean disk |
1,543,156,167,000 |
I have a server on Hetzner. It theoretically has 3Tb of space
But if I run df -h I see this:
Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
213.133.99.101:/nfs 295G 134G 146G 48% /root/.oldroot/nfs
overlay 7.7G 7.7G 0 100% /
tmpfs ... |
This looks to me like you are currently running the "delivery system".
You should be able to start an installer from there, and set up your system as you need it. Search the hetzner knowledge-base for infos on installer images.
When installing from such an installer, keep in mind:
Hetzner-servers in general come wit... | Filesystem problem |
1,543,156,167,000 |
I'm using Oracle Linux 7.6, which is a distribution based on RHEL 7.6. The following testing should be the same on RHEL 7.6 or other RHEL 7.6 based distributions.
I'm running the Oracle Linux 7.6 server in VMware Workstation on Windows 10. What I'm trying to do is to add a disk to the Linux guest virtual machine with... |
The different host directories correspond to different disk controllers. What controllers map to depends on the technology involved; AHCI SATA hosts have one host per port, NVMe uses one host per controller, etc. The exact situation in your case will depend on your VM setup.
Basically what this means is that you shoul... | What are these "host" directories? |
1,543,156,167,000 |
My storage administrator assigned LUNS for a RHEL 5.10 Server.
Now when I run /sbin/scsi_id -g -u -s /block/sdN, it shows:
360060160c8803500183327ae00a2e711
Now I want to see the exact name, just like the storage administrator assigned, such as:
DB2_LUN_1
What am I missing?
The back end storage from EMC.
|
You can not. From my experience as storage and linux admin I can tell you, DB2_LUN_1 is alias on storage level. You can confirm the unique id from storage admin which is similar to 360060160c8803500183327ae00a2e711 (well most of the part). if you are using dm-multipath drivers then you can set alias in your /etc/mult... | Get SAN Lun Names |
1,543,156,167,000 |
I'm mess my mounting of the directory with device:
lorancechen@schan:~$ sudo df -hl
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 790M 9.0M 781M 2% /run
/dev/mapper/schan--vg-root 226G 6.6G 208G 4% /
tmpfs ... |
/home/lorancechen/.Private looks like file encryption to me. Have a look at the output of
cat /proc/mounts | grep lorancechen
Your problem with apt-get is due to the fact that your /boot partition is full. Some Linux distros do not delete old kernels. So you have to install some script for that or do it manually from... | How to reassign disk to file system? |
1,543,156,167,000 |
I have a Debian system on which we migrated to a SSD for faster execution. Before that we had a 2.0Tb hard disks in RAID. Now we want to use the RAID drives to perform storage generated by the application.
I tried using the mount command to mount one of the disks, but it failed.
fdisk -l output :
Disk /dev/sdb: 2000... |
there are two 2Tb hard disks in RAID. Is there any way I can format them to one single partition on both drives and mount them to lets say /media/attachment
For the purposes of this answer I am using /dev/sda and /dev/sdb. It is your responsibility to ensure that this matches your situation.
You can do this provided... | Debian : Mounting a raid array |
1,543,156,167,000 |
Im helping a friend with his small, self-hosted Ubuntu server. He wanted to install a larger hard drive. That's why I used Clonezilla to clone the HDD to a larger SSD so that the server doesn't have to be set up from scratch. This worked great, but of course the operating system doesn't use the new storage space just ... |
On that system, /dev/sda3 is an LVM PV. After enlarging it, you'll need to extend the LV's too. There's only one LV in your df screenshot: /dev/mapper/ubuntu--vg-ubuntu--lv. If you want to give all the free space in that VG to it, then run lvextend -r -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv as root. If you want... | Extend hard drive on Ubuntu (Server) |
1,543,156,167,000 |
I am having an issue where I can mount my disks manually using the mount command. I than add the disks to fstab. Once I restart: sda1 points at the correct mount point (/mnt/da), but the rest do not. Please help, I am out of ideas.
Server setup:
2 x nvme drives in software raid1
10x 16tb drives without raid, stand a... |
The device ID's are not guaranteed to be consistent across reboots...
you are using wrong vocabulary.
There are 6 ways to mount disks in linux, as shown under /dev/disk; this is using RHEL-7.9...
by-id/ by-label/ by-partlabel/ by-partuuid/ by-path/ by-uuid/
by-id is a scsi identifier or wwn (world-wide-number) ... | Disks mount points inconsistent after each reboot. Using UUID in fstab |
1,543,156,167,000 |
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?
|
Check out
ls -l /sys/dev/block/8:0 /sys/class/block/sda /sys/block/sda
You’ll see that all three point to the same directory.
There’s no difference between the files, other than their path.
| Which "size" file should I use to get the disk size? |
1,543,156,167,000 |
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 ... |
The columns are:
[scsi_host:channel:target_number:LUN]
SCSI peripheral type
vendor name
model name
revision string
So the fifth column is the revision string. You can also use lsscsi -c to print in the classic mode, where these are printed in a different form and prefixed:
$ lsscsi
[9:0:5:0] disk QEMU QEMU... | What does the 5th column mean in the lsscsi output? |
1,543,156,167,000 |
I have a 4GB sd card but what i'd like to be able to do is have more free space on the / partition I don't actually need a swap partition either so how would i resize/move partitions for example using fdisk?
Disk /dev/mmcblk0: 3.7 GiB
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 20... |
Stop the swap using swapoff -a
Remove the swap (/dev/mmcblk0p5) and the extended (/dev/mmcblk0p2) partitions. To remove a partition with fdisk just run fdisk /dev/mmcblk0 and use d to delete a partition (it will ask which one).
Don't forget to remove swap entry from /etc/fstab and GRUB config.
Resize the / partition.... | Moving space from swap to / |
1,543,156,167,000 |
I've ended up in a situation where I cut my disk space in half, and would like to merge two partitions together. Here is a picture from Gnome Disks:
The blue partition on the left is unused, and Partition 7 on the right is what I boot into and currently use. It looks like in Gnome Disks, I can just click the red minu... |
Partitions cannot be resized to the left, you actually need to copy all the data from the second partition to the start of the free space and then resize it to the right. GNOME Disks cannot do this, you need to use GParted for this and its Resize/Move operation. This cannot be done on a mounted filesystem so you'll ne... | How to reclaim unmounted disk space |
1,543,156,167,000 |
I have an old Seagate 4TB internal drive from a crapped out pc that I was planning to repurpose as a spare drive for gaming.
Figured I'd run some smartctl scans on it first just to be safe so I did smartctl -t short /dev/sdb and got back results. They looked ok to me bc I didn't see anything listed in the 'WHEN_FAILED... |
SMART is not very bad but your HDD firmware cannot fix some errors.
Considering you now perfectly know which sector is broken you can try to reallocate it using dd:
https://www.smartmontools.org/wiki/BadBlockHowto
Still, this HDD is now unsafe to use, so even if you manage to fix it, consider using the drive only for ... | Is my hard drive failing? / Need help with smartctl -a output |
1,543,156,167,000 |
I have a PC with a small disk:
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.5G 3.1G 249M 93% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 36M 428M 8% /run
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 46... |
There is no easy way to do optimize with limited storage space or any sane query for that matter, because you may be running out of space during the query execution. You have two options:
Mount an NFS drive from a remote machine and point mysql's tmpdir to it
Or
Point mysql's tmpdir to /dev/shm. Be very cautious with ... | Free up mysql space on low-disk PC |
1,543,156,167,000 |
I'm looking on my Debian 11 Server for the easiest way to allocate 100GB of extra space after the /dev/sda1 device in command line.
The sda1 partition is almost full and needs to be resize with the unallocated space.
Here is the structure of my hard drive:
Disk: /dev/sda
... |
The free space is not directly after the sda1 partition so you can't use it, you need to remove (or move, but removing is easier) the swap partition sda5.
Stop the swap using swapoff /dev/sda5
Remove the sda5 partition and the sda2 extended partition.
Resize the sda1 partition. Don't forget to resize the filesystem t... | Extend 100GB of unallocated space on /dev/sda1 device in command line |
1,543,156,167,000 |
I have two disks 4G each. I create raid with lvm. The size for Available is wrong or is my mistake.I don't understand why it show 6.9T and not 7.2T or 7.3T :/ thanks
lsblk
sda 8:0 0 3.7T 0 disk
└─backup 253:0 0 7.3T 0 lvm /media/backup
sdb 8:16 0 3.7T 0 disk
└─backup ... |
The available size is correct, by default ext4 reserves 5 % of the space for root (95 % of 7.3 TiB is 6.93 TiB). This isn't that important for other filesystems than / (where this prevents unprivileged processes from filling the filesystem), but it also helps with preventing fragmentation. You can change the reserve u... | Disk size is show wrong value for Available |
1,543,156,167,000 |
To my understanding, an LVM snapshot has a size upon creation. According to the LVM man page, a snapshot can have all its space used up and be rendered unusable(unless extended). But how does its space gets used up ?
Let's say: I have a file of 10M on the source(the original logical volume). When I create a snapshot, ... |
Copy-on-write LVM snapshots contain the differences between the snapshot and the origin. So every time a change is made to either, the change is added to the snapshot, potentially increasing the space needed in the snapshot. (“Potentially” because changes to blocks that have already been snapshotted for a previous cha... | LVM Snapshot - does the new data gets replaced by previous data? |
1,543,156,167,000 |
I've setup a server with luks devices (not used for root partition), they are listed in /etc/crypttab this way
# <target name> <source device> <key file> <options>
luks_device_1 /dev/mapper/vg-lv_1 none luks
...
I've also setup a tang server and bound the devices to tang using the command
clevis luk... |
Actually, according the manpage clevis-luks-unlockers(7) having the option _netdev in /etc/crypttab is necessary to trigger the automatic unlocking.
After a reboot, Clevis will attempt to unlock all _netdev devices listed in /etc/crypttab when systemd prompts for their
passwords. This implies that systemd suppo... | tang / clevis: automatic unlocking for luks device not triggered unless defined as _netdev |
1,543,156,167,000 |
I have partitions in my CentOS 8 machine as below:
[root@XXXXX]# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 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
Disk identifier: 0xbcca... |
Your LV /dev/cl/root is already at the maximux available size. what you need is to resize the file system. If you let the default options, it's xfs, so the command should be:
xfs_growfs / this command will extend xfs volume to all available space. Have in mind that xfs volumes cannot be shrinked.
Using xfs_growfs / -D... | Cannot expand file system on CentOS 8 |
1,543,156,167,000 |
I wrote a script that loops through every file in a folder and performs a simple operation on each file. That folder will almost always be empty and only occasionally contain a file, but I'd like the script to run automatically (and relatively promptly) when a file does appear. What's the best practice to do that?
Rig... |
incrond can run a command when a file appears. It uses inotify underneath.
As has been pointed out in a comment, systemd can also monitor a directory and trigger actions.
[Unit]
Wants= my.service
[Path]
DirectoryNotEmpty= /path/to/monitored/directory
| Cron loop best practices |
1,543,156,167,000 |
When you create a virtual machine with VirtualBox, you are greeted with two options while creating the virtual disk:
Dynamically allocated
Fixed size
The dynamically allocated just creates a sparse file that grows when the requirements expand.
But the fixed size creates a file that consumes the allocated disk space.... |
File data is stored in blocks on the hard drive. Information on which blocks make up a file is stored in meta data about the file. This is what we call a file system.
So to create a 1TB file, the OS only needs to allocate 1TB of worth of blocks. This makes those blocks unavailable to any other file. But the OS does... | What really is "A fixed size hard disk" in virtualbox? |
1,543,156,167,000 |
I had 0 bytes free and even when I deleted something the number of free bytes stayed still zero. So I tried to restart it and I can't login now. I tried console Ctrl+Alt+F1, but I don't know login. I wrote the name that is normally displayed above the password, but it is wrong. What should I do?
|
Make a LiveUSB on another machine
Boot from that LiveUSB on your PC.
Access your boot drive, whether SSD or HDD (makes no difference).
Either delete files you don't need, or move them to another drive (such as a USB or external SSD or HDD).
After this problem is resolved, you may wish to consider the use of tmpre... | Mint - disk is full (prevents login) |
1,543,156,167,000 |
the linux ( OS ) installed on sda
and machine also have additional disk - sdb
sdb 8:16 0 20G 0 disk
but we want to add two new partitions as sdb1 and sdb2
as the following:
sdb 8:16 0 20G 0 disk
├─sdb1 8:1 0 500M 0 part
└─sdb2 8:2 0 500M... |
Assuming GNU parted, and assuming the snippets you are showing are from the output of lsblk, here is a minimal set of actions you can perform to accomplish what you are asking for:
Running parted as root, select the device you want to act upon:
(parted) select /dev/sdb
Create a MBR partition table (no particular reas... | how to create parted disk |
1,540,671,306,000 |
My linux root OS device is /dev/sda, and my external hard drive is /dev/sdb (empty drive)
I don't want to loss data on /dev/sda, and setup raid level 0.
Is this possible?
|
With RAID 0, your data is split in half (evens and odds) between the drives. In other words, there are chunks 1, 3, 5, .... etc. on the first drive, and a second group of chunks 2, 4, 6, etc. are on the second drive.
If one of the drives dies, you've instantly lost 50% of the chunks. Imagine opening up your program a... | Is it possible to create raid-0 without losing data? |
1,540,671,306,000 |
I have just moved a 3TB disk from an external USB enclosure to inside a computer and I cannot see the only one ext4 partition which is supposed to be there. The disk has extremely important data that I cannot lose. Please advise how to proceed, here are some details:
$ sudo mount -vvv -t ext4 /dev/sdb1 /mnt/
mount: /m... |
The comment answerers are not reading the output in your question. The output tells us this:
GPT PMBR size mismatch (732566645 != 5860533167) will be corrected by w(rite). fdisk is telling you that you have an EFI partition table with a so-called "protective" old-style MBR partition record. But the protective parti... | Cannot mount partition - does not start on physical sector boundary? |
1,540,671,306,000 |
I found that if I detach a disk from my Linux server (CentOS 7), the related /dev/sd* file will disappear automatically about 10 seconds later.
I'm wondering how does Linux know a disk has been detached? Is there something like a sweeper keep scanning all the devices?
And is it possible to make this quicker?
|
The delay is likely caused by udisk2 & udev.
Research
$ ps -eaf|grep [u]disk
root 17041 1 0 09:48 ? 00:00:00 /usr/libexec/udisks2/udisksd
Can query it for storage devices like so:
$ udisksctl status
MODEL REVISION SERIAL DEVICE
--------------------------------------... | How soon will linux notice that a disk has been detached ? And can it be quicker? |
1,540,671,306,000 |
we have disk devices as ( on redhat machine version 7.2 )
sdb
sdc
sdd
sde
we want to change the names to
vxb
vxc
vxd
vxe
is it possible
expected results
from lsblk output we need to see
vxb
vxc
vxd
vxe
|
I do not expect you will be able to do that without changing the Linux kernel as /dev/sd* are a matter of Linux kernel. And lsblk uses data from kernel (sysfs, to be precise) and udev as a device daemon.
You can however make symlinks, that create /dev/vx* you want. For that I suggest symlinking based on UUID or label ... | linux + how to change disks name to other names |
1,540,671,306,000 |
This is almost a little embarrassing to ask, but I just can not figure this one out myself really.
I'm trying to find out where the disks of my machine are used and if they are actually used at all.
If I check my available disks in my debian, I can find 4 of them. This seems correct. There should be a 50GB one, a 120G... |
You could also try:
sudo pvscan
This will show you if any of the disks are in use by the logical volume manager. You can also use fdisk to determine which device corresponds to each physical drive:
sudo fdisk -l /dev/sda
sudo fdisk -l /dev/sdb
sudo fdisk -l /dev/sbc
sudo fdisk -l /dev/sdd
| Where are all the disks used? |
1,540,671,306,000 |
I have a number of NTFS disks with unused capacity. They are leftover external hard drives with a Windows history. I have a very limited number of USB ports on my machine, and want to find a cheap way to combine these disks as one logical disk, as it appears to the OS. Are there any methods in Linux to implement this?... |
You'd have to find some kind of enclosure for several disks (unlikely) or an USB hub (preferrably one with external power) to connect all your disks in enclosures (again, preferrably with independent power). The machine/operating system will see them all as separate disks, perhaps you could build a RAID over them. But... | Redundant array of NTFS disks |
1,540,671,306,000 |
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 in, it was not recognized anymore. Th... |
My first assumption would be a faulty case, particularly as you've got pluggable USB involved. Check that it's plugged in properly (both ends of the cable) and there's sufficient power.
I would also check the partition table, which you added to your question. Unfortunately it too shows a faulty read from the device, w... | Recovering an ext4 partition |
1,540,671,306,000 |
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 files).
This is what my partitions look like on lsblk:
N... |
You can merge two partitions only if they are adjacent. If they are not adjacent, you can always use LVM to initialize each partition as a Physical Volume, add the two Physical Volumes to a Volume Group, and create a Logical Volume from the Volume Group; then format the Logical Volume as usual.
The commands would be m... | How to combine two partitions? |
1,540,671,306,000 |
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 reboot this server.
# lsblk
sda 8:0 0 50G 0 disk
├─sd... |
First of all, Don't panic.
You did not, in fact, erase your entire drive. All your data is still there, as evidenced by the fact that your system is still working.
All you did was delete the device file that linux, like most Unices, uses to identify and address that partition directly, and by and large the only times ... | Accidentally deleted the device node /dev/sda1 |
1,540,671,306,000 |
I have a Hyper-V RHEL VM where root has run out of space. In Hyper-V, I reallotted 1TB of disk space to the VM (it was about 120 GB before).
In RHEL, I have this:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel_rhel-root 51G 38G 14G 74% /
I did lvextend -r -l +100%FREE /dev/mapper... |
After more research and experimentation, I found the solution here: https://networklessons.com/uncategorized/extend-lvm-partition
There was one difference for my server. Since I have XFS instead of Ext4, for the last command I replaced resize2fs with xfs_growfs /root.
| Trying to extend partition |
1,540,671,306,000 |
I have a pool that had a drive fail and zfs is being stupid about it. I added a disk which ended up going to /dev/sdl I used the disk by id to add it in and due to that after the other drive failed during or just before a reboot i get the following line.
5642991870772164099 UNAVAIL 0 ... |
On a Linux system, if the drive is still nominally functional, then lsblk likely will work:
$ lsblk -do name,model,serial /dev/sdl
NAME MODEL SERIAL
sdl ST6000NM0125-1YY ZADAEV8S
FreeBSD users would use diskinfo:
$ diskinfo -s da11
WD-WMC1S5694795
OTOH, if you're unsure whether that UUID still associates... | locate specific drive after failure in zfs pool |
1,540,671,306,000 |
Currently I believe I'm experiencing drive (HDD) failure. It is a single partition drive for extra storage. When I attempt to mount it I get the following error:
# mount /dev/sdc1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In so... |
For anyone who finds this question, I managed to resolve the issue without resorting to photorec or other salvaging tools. I made a full disk image, just in case, using ddrescue but ended up not needing it.
Running badblocks and looking at SMART data I determined that there is 1 damaged sector which is somewhere in th... | How to browse an img from a broken drive (restore lost data) |
1,540,671,306,000 |
I have created CentOS 7 VM in oracle VM box with the disk size of 10 GB.
When I run fdisk -l /dev/sda command, it reports that the disk size is 10.7 GB. Can someone explain why fdisk shows higher disk space than the actual disk space?
|
If you look at the fdisk output, you can see that the disk is reported as being exactly 10*1024*1024*1024 bytes. That suggests that whatever created that disk actually created it to be 10 GiB, although your screenshot shows that VirtualBox calls it GB, but I just take that as (yet another) indication that Oracle sucks... | Discrepancy of disk size in fdisk command output |
1,540,671,306,000 |
I am trying to install Ubuntu 20.04 on a NVMe disk.
The installation wizard shows below disk info:
I don't quite understand it. My questions are:
Why the /dev/mapper/vgubuntu-root and /dev/mapper/vgubuntu-swap_1 are listed twice, respectively?
The /dev/mapper parts are for LVM, which is the logical view. Why /dev/n... |
I think most of your questions can be answered with: "Displaying LVM devices is not easy and the Ubuntu installer isn't doing great job here".
tl;dr description of LVM: LVM adds a second "logical" layer of storage that allows you to do things like joining multiple disks to a one device, you can setup RAIDs, cached dev... | Question about Ubuntu 20.04 disk partition during installation |
1,540,671,306,000 |
I encountered an issue with a disk drive which I already posted on. (For the curious: Issue with device after formatting)
In short, one of my disks stopped allowing me to copy files by drag and drop using Dolphin (Debian), and allowed me only if I was doing it from the terminal using sudo.
I researched about my issue ... |
When a drive (or partition, or other block device, or a disk image file, etc) is formatted, the top-level directory of the filesystem is owned by the user running the mkfs command.
Usually, that is root unless you're formatting a disk image file (or a block device you happen to have RW perms on) as a non-root uid.
If ... | Ownership, disk drives and permissions |
1,540,671,306,000 |
I'm trying to automatically identify which disk (not partition) the OS resides on for a certain program which will format many attached disks (so it doesn't accidently format the OS disk).
I'm currently using dmidecode -s system-uuid, but I think that this gives the parition UUID.
I could ask the user for it, but that... |
I don't think it's possible to easily solve the general case. But it's not too hard for very basic cases. Getting the root partition is as simple as running df -h /. Now a partition is either /dev/sdXdigit (eventually /dev/hdXdigit) or /dev/xxxxxpdigit where xxxxx is something like nvme0n1 or mmcblk0. So in the simple... | Identifying The Disk that the OS Parition Resides On (for a script)? |
1,540,671,306,000 |
How am I able to reduce /var/lib/vz logical volume (/dev/vg/data) and use it/increase the current swap size?
/etc/fstab
UUID=c4408a1c-aa5b-4ce2-a9e8-1673660331e9 / ext4 defaults 0 1
LABEL=EFI_SYSPART /boot/efi vfat defaults 0 1
UUID=c90b3083-1b43-427c-8016-1d2406... |
easy: lvresize to, say, 350 GB (I'm assuming df -h /var/lib/vz gives you something like 340GB; if it's far less, you can of course shrink this way more!):
Since you need to shrink the file system, you first have to unmount it:
umount /var/lib/vz
Then, resize the logical volume; we can ask the LVM tools to correctly r... | How can I shrink/use a Logical Volume and use it as swap |
1,540,671,306,000 |
I have an external NVMe disk that was in my old laptop which is encrypted with LUKS. I need to mount that disk and extract some data out of it so this is what I have tried
fdisk -l
/dev/sdc3 2549760 2000408575 1997858816 952.7G Linux filesystem
udisksctl unlock -b /dev/sdc3
Unlocked /dev/sdc3 as /dev/dm-1.
So fa... |
You have an LVM setup so after unlocking the LUKS device you need to mount the root logical volume and not the unlocked device itself. In your case the logical volumes were not auto-activated because lvmetad is not running, you can activate them (= tell the system to actually create the logical volume block devices) u... | Mount LUKS encrypted drive |
1,540,671,306,000 |
Info
I have two USB flash drives. Both are "SanDisk Cruzer Blade"s. One is 8GB, the other is 64GB.
fdisk -l (8GB):
Disk /dev/sdd: 7.45 GiB, 8004304896 bytes, 15633408 sectors
Disk model: Cruzer Blade
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optim... |
Disk model can't be changed, it's reported by the device firmware, fdisk simply reads it from /sys/block/sdX/device/model.
Filesystem labels and partition names (with GPT) are unfortunately only things you can change, but that's not going to help you when booting.
| How to change usb drive's "Disk model", as shown in fdisk -l? |
1,540,671,306,000 |
I'm trying to make a script to select into which disk I should dd to.
A simple bash script to select options works like this:
#!/bin/bash
# Bash Menu Script Example
PS3='Please enter your choice: '
options=("Option 1" "Option 2" "Option 3" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Option 1")
... |
try lsblk -d
-d, --nodeps Don't print device holders or slaves. (...)
How could I parse the table generated by this command?
lsblk -d | tail -n+2 | cut -d" " -f1
Would be good if I had a way to collect a name and the size so I can put in the option
lsblk -d | tail -n+2 | awk '{print $1" "$4}'
Should I assume it's si... | bash script to select a disk for dd (lsblk?) |
1,540,671,306,000 |
We want to Add New Disk Using LVM to an Existing Linux System ( according to - How to Add New Disks Using LVM to an Existing Linux System )
We have the following rhel 7.2 server details
pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VOL_GROUP-lv lvm2 a-- <179.00g <25.09g
/dev/sdb1 data... |
fdisk says you have no free sectors available because all the disk space is allocated to partitions (sda1 and sda2). Thus from fdisk’s perspective, there’s no free disk space, and no room to create a new partition. This can also be seen in lsblk’s output:
sda 8:0 0 180G 0 disk
├─sda1 ... | Add New Disks Using LVM to an Existing Linux System |
1,540,671,306,000 |
Before one year I extend the /var on the redhat 7.x server as the following from 100G to 200G
notes:
a. VG-A is the VG
b. server is VM server
c. file-system is XFS
procedure:
1. pvcreate /dev/sdb
2. vgextend VG-A /dev/sdb
3. lvresize --size +100G /dev/mapper/VG-A-lv_var
4. xfs_growfs /var
so /var increased to 20... |
First of all — and this is hopefully a reminder — the answer to risk considerations when dealing with storage is to have a working backup and restore strategy.
With that in place, using virtual storage, the risk level is the same whether you extend the virtual disk or add a virtual disk. If you care about speedy recov... | increase /var partition by adding few disks |
1,540,671,306,000 |
I'm transfering the content from one smaller partition to another larger using rsync -vacHS --progress /oldPartMountPoint/ /newPartMountPoint/. The data is large ~1TB, I left it overnight but at the morning I found it with almost no progress. Also, the two partitions are just ISCSI devices shared from a NAS. The NAS d... |
Unfortunately this is one of the least efficient scenarios for rsync. You have two remote filesystems, both mounted locally. This means that rsync cannot optimise file transfers for files that already exist on the target by sending only changed blocks. Furthermore you've specified -c (--checksum) so on restart every c... | Resume rsync transfer after failure? |
1,582,361,441,000 |
As far as I know, this just amounts to a change in the partition table and it is a relatively safe operation that is rather cheap.
Is there any significant cost or drawback(s) to...
Creating and destroying partitions all the time
Having lots of partitions, mounting them, and actually using them to write and read lot... |
The single most important reason to avoid too many partitions on the same harddisk is space usage: As your harddisk fills up, the partitions will fill up to a different degree, and you can't use free space in one partition in another partition if the latter partition gets full.
While you can resize partitions, doing s... | Is there a reason to avoid frequently creating and 'destroying' partitions and having lots of them? [closed] |
1,582,361,441,000 |
System: Linux Mint 19.1 Cinnamon.
Disks in this question are considered external HDDs either ext4 or ntfs formatted.
I am interested in how do I manage to set my fstab or whatever else to be able to Unmount (umount) those external HDDs under my normal user account?
I have:
one External hard disk over USB 3.0 formatt... |
You need to add users option to your fstab entries.
Working example on my setup:
UUID=<the UUID of the Ext4 disk drive> /mnt/external-hdd-2tb-usb3-ext4 ext4 nosuid,nodev,nofail,users 0 0
UUID=<the UUID of the NTFS disk drive> /mnt/external-hdd-500gb-usb2-ntfs ntfs nosuid,nodev,nofail,users ... | How to set fstab to be able to umount my external HDDs under normal user account? |
1,582,361,441,000 |
I had a drive that was failing on it's SMART test in the form of:
smartctl -a /dev/sdc:
...
# 1 Short offline Completed: read failure 50% 6354 4377408
# 2 Extended offline Completed: read failure 90% 6354 4377408
I then wanted to get this 'sector' marked as a bad secto... |
No, you didn't want to mark it as bad sector. You wanted a write op to an unreadable sector :)
As I had quoted yesterday in smartctl reports overall health test as passed but the tests failed?
If the disk can read the sector of data a single time, and the damage is permanent, not transient, then the disk firmware wil... | SMART test completes with no failure after failing test previously, without reallocating any sectors? |
1,582,361,441,000 |
I have a computer I use for imaging disks running Ubuntu 16.04. Each disk is inserted into a USB 3.0 dock, imaged/wiped, and then disconnected. The disks don't have any mounted filesystems which need to be dismounted. They disappear from gnome-disks as expected. Eventually, using gparted and/or the gnome-disks, I am n... |
Before disconnecting, say, /dev/sdX, do first a blockdev -flushbufs /dev/sdX to ensure all the data is fully written on the disk and not waiting in a buffer, just to be sure.
Then do a echo 1 > /sys/block/sdX/device/delete. This will tell the kernel that /dev/sdXwill be going away and should be forgotten. Depending on... | Linux stops detecting new disks/block devices after certain number |
1,582,361,441,000 |
Regarding this post: Sum up numbers with KB/MB/GB/TB/PB... suffixes
I have a few machines that have older Debian version on them and can't be upgraded to a newer version of Debian, which means that the coreutils package does not contain numfmt. I tried to find a another way to get it for it (machine is Debian 7.6), bu... |
I don't have the lshw command handy, so I faked some as follows:
size: 4200KiB (4200KB)
size: 420MiB (420MB)
size: 42GiB (42GB)
size: 4TiB (4TB)
size: 2PiB (2PB)
(I found an example online and simply copied out the "size:" lines and made up some sizes).
I used awk here because once you find yourself gr... | Bash variable hold or keep value/data |
1,582,361,441,000 |
Are there any files created and or broadened by the system besides mail and logs?
AFAIK, the only files that are created and/or broadened by the system in default are /var/mail/ files and /var/log/ files (broadened by means of file size).
To cope with that I've redirected `/dev/null on files in these directories.
But ... |
I'd recommend reading up on the Unix filesystem.
The /var/ directory holds frequently changing files. The /etc/ directory holds configurations that don't typically grow too much. the /usr/ directory holds OS files that don't change too much outside of system upgrades. If you have third-party applications running off o... | Are there any files created and or broadened by the system besides mail and logs? |
1,582,361,441,000 |
we want to check the filesystem on the disks as /deb/sdc .... /dev/sdg on each linux redhat machine
the target is to find what are the disks that required e2fsck ( as e2fsck -y /dev/sdb . etc )
according to man page
-n Open the filesystem read-only, and assume an answer of `no' to all questions. Allows e2fsck ... |
You probably are looking for the output of tune2fs rather than e2fsck
tune2fs -l /dev/sdXX |grep "Filesystem state\|Last checked\|Check interval"
which should yield something like this:
Filesystem state: clean
Last checked: Mon Nov 28 16:03:44 2016
Check interval: 31536000 (12 months)
| e2fsck -n + how to know if need to run e2fsck in order to fix corrupted blocks? |
1,582,361,441,000 |
I am running CentOS 7.3 on x86_64. I have a two disk, first one is 256GB SSD where /root, /boot, swap and /home is configured. 0Second one is a 4TB HDD which is mounted as /data and currently has more than 1 TB of data.
I want to expand /home, as it's not sufficient and will run out of space soon. To achieve this, I w... |
Yes, it's possible. You'll have to shrink the /data filesystem first. Umount it, check filesystem integrity:
e2fsck /dev/sdb1
Shrink with to 999G (or your desired size)
resize2fs /dev/sdb1 999G
And use gparted to resize the partition /dev/sdb1 to 1000G. Then you can fill the filesystem to the size of the /dev/sdb1 w... | Mount Existing Hard Disk As /home And /data |
1,582,361,441,000 |
we have a lot of linux working machines
all mount point are configured in the /etc/fstab
as the following:
/dev/sdc /grd/sdc ext4 defaults,noatime 0 0
/dev/sdd /grd/sdd ext4 defaults,noatime 0 0
/dev/sdb /grd/sdb ext4 defaults,noatime 0 0
/dev/sde /grd/sde ext4 defaults,noatime 0 0
/dev/sdf /grd/sdf ext4 defaults,noa... |
There shouldn't be any issues. If you do changes to your machine configuration (for example add or replace disks) the device names (/dev/sdX) might change at next boot. Using UUIDs avoids this issue.
Since you use device names to name the mount points (/grd/sdX), those might not match the device name anymore should th... | reconfigure the fstab file with UUID |
1,582,361,441,000 |
I have a new disk on server (sdb) and I want to mount it to existing root mountpoint (sda1 mounted on /) to merge it. There is an utility called mhddfs which is doing exactly what I want. But the problem is in examples is shown mounting existing mountpoints to one merged called virtual which isn't used before:
$ df -h... |
As a warning: I have no experience with mhddfs, but there are a few general rules:
All examples of mentioned in the mhddfs readme are based on mounting a new mountpoint - not an existing one.
So just putting an overlay over an already mounted point is not mentioned.
Also consider what you are doing at that point:
... | Mount new disk to existing root mountpoint using mhddfs (merging filesystems) |
1,582,361,441,000 |
I have a problem with used space and available disk space in lvm.
Please see this results :
[root@localhost ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup 3 3 0 wz--n- 6.78t 736.00m
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup lvm2 a--u 3.50t ... |
I think that the part of storage in lake in the Logical Volume, is the part reseved of root rescue, the 5% reserved for root for emergency situation, this part is 5% by default, it's set when its you create the file system.
look, with dumpe2fs -h /dev/mapper/VolGroup-lv_home | grep -i reserved , will give you the amou... | Inappropriate used and available space in lvm and disk free [duplicate] |
1,582,361,441,000 |
I've got these disk statistics shown in top command:
$ top | head | tail -n1
Disks: 1095425909/52T read, 1016012571/52T written.
It's quiet high number for only 37 day uptime.
Are these numbers are counted since the boot time, or another period? I can't find it in the documentation.
|
The top command tries to report statistics since boot time when it only reports one set; if it's set to report on a loop basis (e.g. with the -d option), the first report is since boot, the second and thereafter are for the most recent loop period only.
| Since when Disks statistics in `top` command are counted? |
1,582,361,441,000 |
I have a Clonezilla image of a 250 GB disk. Are there any caveats or downsides if I would restore this to a 500 GB disk? (I will of course not be able to use more than the 250 GB on the new disk, but this is not a problem.)
|
No, there are no caveats. It will just work. For most filesystems (including ext3/4, xfs, ntfs), clonezilla is even able to automatically expand the filesystem so that you get to use the entire 500GB.
In fact, this is one of the benefits of Clonezilla. In a previous job, I set up a workstation cloning system using c... | Are there any caveats when restoring a backup to a larger disk than the original disk with Clonezilla? |
1,582,361,441,000 |
I have a VM running LinuxMint 17.1. I just resized the virtual disk, then used a live CD to resize the system partitions. I now have 18GB+ free. However, when I look in Files, "File System" shows as full. I also have been getting warnings that I only have 147MB free. But there's plenty of space, it's almost as if I ne... |
looks like your using LVM, so you have to expand your current drive after you have resized it. check the following link.
[resize on the fly]
http://www.linuxuser.co.uk/features/resize-your-disks-on-the-fly-with-lvm
| LinuxMint "File System" shows no space when many GB exist |
1,701,689,831,000 |
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 automatically recognize them.
How do I make L... |
I know of nothing that that will automatically scan a partition as if it were a disk, and indeed it can't even be scanned manually:
partx --add - /dev/sda8
partx: /dev/sda8: error adding partitions 1-2
However, you can use a loop device to map the partition back to a device - and this device can be scanned as if it w... | How to make Linux read partition table in a partition? |
1,701,689,831,000 |
I was shrinking an ext4 partition, however it was taking too long so I thought I'd just start from scratch (making a new partition and wiping the data). However after I cancelled the resize (which was done with gparted), I'm not able to use previously usable commands on this drive:
sudo parted /dev/sdc
echo $? ... |
Plugged the drive directly into my motherboard's NVME slot and everything worked, so it seems it was likely the NVME adapter being the issue here.
Based on lsusb it's a Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter.
Similar issues with this device are also reported here: https://github.com/raspberrypi/linux/iss... | Cancelled ext4 shrink and now I can't seem to format the drive? parted, fdisk etc won't run with the drive |
1,701,689,831,000 |
Basically, what I need could be similar to what most other people running Windows for work would want, I suppose, so let us get started on my requirements:
Somehow copy a raw disk (e.g. /dev/sda) onto a bigger medium. In my case, Windows is stored on a 1TB SATA SSD and I want to clone it into the VirtualBox VDI forma... |
Unmount all of the Win10 partition(s) if mounted.
Go to a directory, where you want to store the new image.
Make yourself the superuser or use sudo in front:
VBoxManage convertfromraw /dev/sda win10.vdi --format=VDI
After it has been completed, open the user shell, and change ownership to your user, example follo... | How to virtualize Win10 from Linux (into VirtualBox on Linux) and shrink it? |
1,701,689,831,000 |
recently I was asked this question during a phone interview. I know that iostat command can be used to check disk performance in Linux. But I am not sure how to answer this question. Does this mean the disk is fully loaded?
Thanks.
|
You cannot determine how much I/O load is present from %util. It only represents the percentage of sample time during which at least one io was outstanding within the scheduler/driver/storage.
So with iostat 1 (sample rate of 1 second), a %util of 75% means
there was at least 1 io outstanding to storage 750 millisecon... | what does %util mean in iostat command output? if it is 100%, can we add more workload on it? |
1,701,689,831,000 |
Yesterday I shrank a volume, and installed Ubuntu on it because I wanted to dual boot, I'm dual-booting Windows 11 and Ubuntu 22.04 on the same drive.
I have just noticed that I might need more space for my workflow and I want to shrink it further.
I used Windows Disk Management to shrink a volume to be able to instal... |
Since your NTFS (Windows) and your EXT4 (Linux) Partitions don't lie back-to-back on the disk, you won't win anything, unless you first shrink the NTFS partition, move the EFI partition to be right after the end of that partition, then move the EXT4 to right after the end of that, and then extend the ext4 partition in... | Making more room for Ubuntu |
1,701,689,831,000 |
I recently bought Unitek Y-1096 Adapter.
Unfortunately, when I plug SSD with it, it doesn't work.
SSD seems to works properly via SATA III.
It was partitioned, it has only one ext4 partition that covers the whole disk.
Output of uname -a:
Linux fedora 5.18.13-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 22 14:03:36 ... |
It seems that plugging it directly to the motherboard was the solution.
| SSD plugged in via adapter |
1,701,689,831,000 |
I have custom LFS installer which contains sfdisk, I am trying to add support for NVME disks on it. When I make partitions with sfdisk on a normal SATA disk, things go as expected but when I do the exact same on a NVME disk, it creates the partitions, but when I am trying to get the size of a partition (with the sfdis... |
I managed to find a sollution so I am adding the answer here so it might help others in case they encountered a similar problem.
I used the blockdev --rereadpt /dev/nvme0n1 command. This rereads the partition table, and now I can execute the sfdisk -s /dev/nvme0n1p2 command with no issues without the need of a reboot... | Sfdisk NVME issue, No such device or address |
1,701,689,831,000 |
i have a debian11 ssd server which is installed in RAID 1 MIRRORING
i use the server as webhost and for better performance (whith high volume of users) i need to use RAID 0 so data wil be split across 2 drivers
2 x 1TB disks
QUESTION IS: How to convert from RAID 1 to RAID 0 without reinstalling
the server
|
In my (unfortunately deleted post) I showed the results of testing mdadam (included in Debian) RAID1, RAID0, RAID10, and single disk. The expected RAID1 performance -slightly slower write speed than single disk and nearly same read speed as RAID0- was not observed. After a deep search on the Internet I found an explan... | Debian: convert from RAID1 to RAID 0 |
1,701,689,831,000 |
I was using Windows 11 on my laptop but I wanted to install a Linux distro on the side.
Therefore, I've shrunk 30GB of the OS disk and I installed Pop_Os. During the installation process, I've created a EFI and root partitions.
I now wanted to extend the ext4 partition. I was able to shrink even more the original OS d... |
You need to do the resize from a LiveCD -- the nvme0n1p5 partition is currently mounted. Ext4 can be resized when mounted, but only to the right -- resizing it to the left actually means copying/moving the data to the start of the free space and then resizing the partition and that cannot be done with an active (mount... | Extend partition created on laptop with Windows 11 and Pop OS |
1,643,937,919,000 |
I have 2 disks in my PC, an SSD with my linux system on it and a HDD with windows and some other stuff. Now I keep getting the following error, which appeared overnight without changing the system, when I'm trying to mount my HDD, after authentication.
[authentication screen of the HDD when trying to mount it]
An e... |
Your drive is most likely dead:
ata2: softreset failed (device not ready)
ata2: softreset failed (device not ready)
ata2: link is slow to respond, please be patient (ready=0)
ata2: softreset failed (device not ready)
ata2: limiting SATA link speed to 3.0 Gbps
ata2: softreset failed (device not ready)
ata2: reset faile... | Unable to mount internal hdd - An error occurred while accessing 'Basic data partition' |
1,643,937,919,000 |
I am trying to use best practices to setup a mirrored zfs pool on a ubuntu 20.04 server.
My hardware is 2x 1TB nvme in an external USB-C enclosure GEN2 SSD enclosure.
My issue is both disks seem to have the same disk id!
So I am able to create the pool using sda and sdb but is unstable after reboot the pool gets lost.... |
The best way to do this is to:
Determine the manufacturer and serial numbers of your drives
Create a GPT partition table (or "scheme") on each drive
Create a ZFS data partition on each drive, and name the partition in such a way as to reflect the manufacturer (possibly abbreviated) and serial number of that drive
Fo... | ZFS - only one single disk/by-id for two nvm devices |
1,643,937,919,000 |
I partially know the answer to this question; I "know" SATA-disks uses the path /dev/sdaX while the nvme uses /dev/nvmeX. Is the path to the disk different when RAID is enabled through BIOS?
Reason I'm asking is beucase: How can I know path to the disk (device) I want to partition (using PXE) without turning on the ma... |
Unfortunately there are many possible paths.
Depending on how the RAID is implemented, there might be:
a legacy naming style unique to particular RAID controller series, like /dev/cciss/* for old Compaq/HP SmartArray hardware RAID controllers
several different variants managed by dmraid for various BIOS-RAID firmware... | Is path to disk (/dev/mydisk) different from SATA, SSD, NVME or RAID? |
1,643,937,919,000 |
When disk is in use, ex: doing fio testing ( random write ), remove the PCIe SSD at the same time.
Should I expect there is no any I/O error since the system support hotplug?
|
No. If you remove the device which is accessed, you'll get an I/O error. Because trying to access a nonexistent device is an I/O error.
Hotplug guarantees that the removed device itself will not be damaged during the removal, and that the system will continue running flawlessly if it doesn't depend on this particular ... | Doing fio testing and hotplug remove the SSD |
1,643,937,919,000 |
I have a m2 SSD disk and it has 100 bad sectors (over 3 years). Is there a risk that this type of drive will eventually break, should i do something about it or not necessarily ?
thanks
|
First thing first, Always have a backup. Drive deaths can be unnatural (Your ceiling falls and crushes the drive).
Next thing is everything is perishable. It will die someday. Read the wiki article about SSDs. SSDs die more deterministically than HDDs. HDDs are weaker than SSDs, in sense of external forces. They have ... | M2 SSD disk - bad sectors |
1,643,937,919,000 |
I have an old HDD which failed and I'm trying to recover what's possible with testdisk. The plan was to use dd to make an image and then use testdisk to recover files from the image to avoid damaging the disk even more.
I used the following command:
sudo dd if=/dev/sdc of=/mnt/BigDisk/backup.iso status=progress
Every... |
Finally I managed to rescue my files.
I may have lied in the question because probably between the moment I tried the first time and when I posted the question I had a kernel update (probably from 5.12 to 5.13). I tried again yesterday with the new kernel and a new hard drive with an ext4 partition as destination and ... | All processes using a device got hung and even `kill -9` does nothing |
1,643,937,919,000 |
I switched my server from an Ubuntu 18.04 32bit to a Debian 10 64bit system. Both of the hardware uses BIOS and can not boot into UEFI mode.
So I got both of them an HDD for the system with an MBR partition table. For the data, I use 4TB HDD with GPT and one ext4 file system. It works on the old machine; however, on t... |
I found out, that my BIOS sees 1.8TiB too. It seems to be a old controller, therefore I must buy a new controller or even a new computer.
| How do I get my 4TB HDD size (OS and BIOS shows only 2TB=1.8TiB)? |
1,643,937,919,000 |
I was trying to make a swap partition, but an error message came saying
Primary Partition Not Available
I checked the internet and found out there can't be more than 4 partitions because Linux only has room for 4 by default (for some reason). But I can see there's a sda5 in my partition table.
/dev/sda1 ... |
/dev/sda5 is an extended partition (aka logical partition), hence it looks like a branch. Yes, that is true, Linux supports only four physical partitions. Your system already have four physical partitions. You can use cfdisk command to create a new logical partition (/dev/sda6) and use that for swap
| cfdisk showing more than 4 partitions |
1,643,937,919,000 |
I'm new to Linux environment and trying to get some clarification on the Disk partitioning.
I've installed new RHEL 8 vmware workstation initially with 20GB Disk and later expanded with additional 20GB. My goal is to create Volume groups & logical volume for later use. I did created a extended partition via fdisk as b... |
Extended partition can't be used directly it's just a "container" for logical partitions. It's actually a clever hack to overcome the 4 partition limit in MBR. Your nvme0n1p4 is a 10 GiB extended partition, but lsblk shows it as 1 KiB because that is its "real size" -- it doesn't take any space on the disk except the ... | Question about Disk Partitioning |
1,643,937,919,000 |
I made an empty binary image file with fallocate -l 500M sd.img command and then partitioned it using gdisk and now I can see my partitions using gdisk:
Command (? for help): i
Partition number (1-2): 1
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 8B28D50C-C5B... |
To format the partitions contained in the disk image, you can first create block device files for the partitions. With the device files in place you can use mkfs as you normally would. When you're finished, then you can remove the device files.
Create and list the block device files: kpartx -av sd.img
Format each par... | how to format a partition of a diskimage? |
1,643,937,919,000 |
I followed this guide to turn my raspberry pi into my backup server. It has a 16 GB SD Card in it and Raspbian (based on Debian buster) installed. When I try to update with sudo apt upgrade, it returns the error:
Error writing to output file - write (28: No space left on device) [IP: 93.93.135.141 80]
W: Some index fi... |
@PhilipCouling that is excactly the thing, it uses the sd card for some reason for /backudrive. That's why it is full. You can see that in the output of sudo du -hs /* in the question above
If that's genuinly the case then you should unmount /backupdrive and clear down any files left in there after unmounting. /bac... | Raspberry PI Mounting / and /backupdrive on different drives does not work |
1,643,937,919,000 |
I'm trying to install Arch Linux on a disk which was previously partitioned. The Disklabel type is automatically set to gpt. I need to change it to dos. How can I do it?
|
I've never actually used cfdisk, but I can tell you how to do it with fdisk.
Run fdisk -l
You should get all of your storage devices.
Find the one you want to partition.
It should be something like /dev/nvme0n1 or /dev/sda but your knowledge may vary.
Once you find it run fdisk <name of drive>. E.x. /fdsik /dev/sda
Y... | Changing label type in Arch Linux cfdisk |
1,643,937,919,000 |
I have a separate disk that i'd like to use for data.
[~] » lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 260M 0 part /boot
├─sda3 8:3 0 200G 0 part /
└─sda4 8:4 0 265.5G 0 part /home
sdb 8:16 0 149.1G 0 ... |
You can add an entry for /home/.../data to /etc/fstab. You can use the same mount options as for /home.
After the volume has been mounted you have to execute chown $username: /home/$username/data once (as root).
| Using a data disk |
1,643,937,919,000 |
I'm running manjaro and I just set up an additional RAID 0 using mdadm and formatted it as ext4. I started using it and everything worked great. After I rebooted however, the array has disappeared. I figured it just hasn't automatically reassembled itself, but it appears to have completely disappeared:
sudo mdadm --as... |
Basically, the solution that worked for me was to format my nvme drives with a single fd00 linux raid partition, and then using that for the RAID.
gdisk /dev/nvme[0-2]n1
Command n, then press enter until prompted for a Hex code partition type. Enter fd00, press enter. Command w and confirm.
Repeat this for all drives... | mdadm RAID array disappered after reboot |
1,558,542,208,000 |
we have redhat machine version 7.2 and each machine have disks
as
sdb
sdc
sdd
sde
sdf
in the dmesg report we get the following
[873080.996700] Buffer I/O error on device sdf, logical block 50575986
[873080.996702] Buffer I/O error on device sdf, logical block 50575987
[873080.996703] Buffer I/O error on device sdf, l... |
Yes, disk sdf is reporting errors on multiple blocks. Replace it at the earliest opportunity. You might want to also look into using smartctl to get stats on the disk failures
smartctl -a /dev/sdf
More detail at https://linux.die.net/man/8/smartctl and https://www.thomas-krenn.com/en/wiki/Analyzing_a_Faulty_Hard_Di... | how to understand the dmesg |
1,558,542,208,000 |
I've used sudo blkid to mount my drive with fstab like this on /etc/fstab:
UUID=1169dd89-29fe-436c-9aef-fa78ea7ee138 /media/hd ext4 defaults,auto,umask=000,users,rw 0 0
I also tried
PARTUUID=df63cda7-01 /media/hd ext4 defaults,auto,umask=000,users,rw 0 0
However my raspberry pi won't boot. I also formatted the syst... |
It looks like umask is not a supported option...
Actually it doesn't:
- https://github.com/torvalds/linux/blob/master/Documentation/filesystems/ext4/ext4.rst
- https://superuser.com/a/837270/809353
- https://superuser.com/a/637171/809353
| /etc/fstab for my usb drive won't boot |
1,558,542,208,000 |
Hardware: Dell Inspiron 15 Gaming 7577, model number 7577-92774.
Question:
Why my Linux Mint 19 does not see my (Windows) NVMe drive?
I read on ArchWiki:
The Linux NVMe driver is natively included in the kernel since version 3.3. NVMe devices should show up under /dev/nvme*.
However, I have no device under /dev/nvm... |
The culprit was in the RAID mode
If you switch, with special caution, to AHCI mode, it will show up in Linux.
The how-to switch to AHCI is out of scope of this site, refer to my answer on SuperUser.
I am not sure why Windows requires that procedure, but I have read it on multiple places, so I believe it is necessary.
... | Why my Linux Mint 19 does not see my (Windows) NVMe drive? |
1,558,542,208,000 |
I need to clone a bootable disk to multiple disks (of different sizes) on different computers and it needs to be scriptable, but I can't find a way to do it.
I'm using Ubuntu 16.04 on everything.
First I tried dd, I ran (with the disk unmounted):
$ dd if=/dev/sda bs=1K count=10000000 status=progress | gzip -c > os.img... |
The problem is that the size of the source disk is larger than (some of the) destination disk(s). Which means the partition table doesn't work, because it's made for a disk of different size.
In your place, I'd write a script that uses fdisk etc. to first delete all partitions on the disk, then makes a partition of fi... | Scriptable way to clone source disk to multiple destination disks? |
1,558,542,208,000 |
lsblk can list a partition, but vgs do not list:
The sda is added by me, the vgs do not list the VolGroups of sda2?
How can I mount the sda2 to the sdb's /mnt?
|
That output looks pretty normal, so I think you might just be misunderstanding what it is saying...
Your disk sdb is split into 3 partitions and none of them is using LVM, but they have filesystems directly on them and they're already mounted on your machine. /dev/sdb1 mounted as /home, /dev/sdb2 is the root filesyste... | `lsblk` can list a partition, but `vgs` do not list the VolGroup |
1,558,542,208,000 |
Wanted to create a list of all the benefits of always running from a live CD (with or without persistence/as long as personal data is saved on encrypted drive locally)?
|
Using a live ISO without persistence means the main filesystem is read-only, so nothing can be changed or "broken" permanently. It also means all changes (new files & data) are in ram and lost on reboot/shutdown.
Saving your personal data manually could lead to better backup habits...
If you have enough ram to use the... | what are the benefits of always running from live cd for data protection? [closed] |
1,558,542,208,000 |
I am using an Ubuntu 16.04 LTS. I ran into an unusual problem with my disk usage. Some of my applications were aborted with the message on the terminal stating "not enough disk space available".
The following is the out put of
df -hT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs ... |
It is not only normal for a filesystem to be mounted as /,
it is mandatory.
It is common for the root filesystem to be ext4.
To free the space used in /tmp:
cd /tmp.
ls -la.
Look at the files and see whether any of them are important
(they shouldn’t be),
and try to figure out if they are being used by running proc... | ext4 mounted on / and tmp consuming disk space |
1,558,542,208,000 |
What are the commands to discover LUN disks in linux and esxi?
|
You are looking for rescanning the scsi bus. If you search your distro + rescan scsi bus on the Internet you can find some guides on how to do that
Redhat based systems
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/rescan-scsi-bus.html
https://access... | What are the commands to discover lun disks [closed] |
1,413,880,624,000 |
I am getting below errors, what does it means?
Oct 19 01:02:25 amra02 scsi: [ID 107833 kern.warning] WARNING: /pci@7c,0/pci10de,377@f/pci1077,142@0/fp@0,0/disk@w5006016841e00513,0 (sd6):
Oct 19 01:02:25 amra02 drive offline
Oct 19 01:02:25 amra02 scsi: [ID 107833 kern.warning] WARNING: /pci@7c,0/pci10de,377@f/pci1077... |
you loose connectivity (i.e. access to you disk)
5006016841e00513
id a clariion controller, and
6006016060702d0051a04cd7773de411
is a LUN (or disk) on you SAN.
vendor CLARIION
extension 060702d0051a04cd7773de411
CI:LDEV (16) e4:11 (10) 228 - 17
you should either check your hardware, or if harware is OK, zonning... | getting system level error in solaris system |
1,413,880,624,000 |
I would expect cat /dev/sdd >/dev/null to give approximately the same amount of data each second if the disk does nothing else.
But on this USB disk I see:
Device rkB/s wkB/s %util
sdf 628.39 0.00 2.12
sdf 29696.00 0.00 100.40
sdf 21368.00 0.00 72.40
sdf 0.00 ... |
How is the external drive connected and which type of disk is it?
I have several 2.5 inch external USB hard disk drives which click if there isn't enough power available from the USB port they are connected to. Some operations work, while others fail – and the drive usually starts to make click sounds. Maybe the long ... | USB disk performance 50% of expected |
1,413,880,624,000 |
we want to build new bash script that will join one of the new disks to volume group ( VG )
lets say we have linux machine and we add 10 new disks
the target is to do manual "label" on one of the disks and then by running the bash script , it will select the "label" disk by lsblk or similar command , and will join th... |
It's not possible to "label" a disk without actually formatting it something because you need to write the label somewhere, which usually means a filesystem header. You can add tags to PVs but this requires create LVM PV format first on the disk. If you need to identify a specific drive, you need to use information th... | linux + is it possible to identify specific new disk in order to join the new disk to VG |
1,413,880,624,000 |
Our Goal is to use huge storage as 200TB for Kafka machine
In order to achieve this Goal , we create volume using LVM over 4 physical disks in RAID10 , when each disk size is 50T ,
Note - each disk as sdb/sdc/sdd/sde is actually RAID10 , when each RAID10 is holding 12 disks
In our kafka server we have 4 disks ( exampl... |
As with any storage, this is as safe as your backups.
XFS is supported up to 500TB, so this is fine.
As far as I can tell, nothing is missing (vgcreate and vgextend can initialize PVs, so you don’t need to run pvcreate).
| Linux + is it correct to create volume using LVM over physical disks when disks size are huge |
1,413,880,624,000 |
I thought that the file is a reserved place on disk and it is a Record collection
but i found that it is a wrong definition because the empty file capacity is 0kb
so it can't be a reserved place on disk ,
mostafa@jamareh:~$ cd Desktop/
mostafa@jamareh:~/Desktop$ touch test
mostafa@jamareh:~/Desktop$ ls -l test
-rw... |
A file is an identifier for accessing data. The amount of data can be zero and it can usually change over time as can the data itself. To the file belongs some meta data (specific to the file system type and configuration being used) like access rights and timestamps for different types of accesses.
| What is a file? [closed] |
1,413,880,624,000 |
When I already have a LUKS block device opened using cryptsetup luksOpen, does invoking the command on the same machine with the same arguments including the device name for the second time just do nothing or is doing so unsafe?
|
If you try to open the device with the same name, cryptsetup will simply tell you that the mapped device already exists. If you try different name, the call will fail because the device is in use:
$ sudo cryptsetup luksOpen /dev/sdc1 a
Device a already exists.
$ sudo cryptsetup luksOpen /dev/sdc1 b
Enter passphrase f... | Is it safe to run cryptsetup luksOpen twice? |
1,413,880,624,000 |
I've got a 500gb and a 31gb disks in my laptop. 31gb contains Ubuntu but I need access to the 500gb (I don't know its label or volume). How do I do it?
|
use the lsblk command.
This is bash syntax for an alias, which prints out information to my liking that would make it very easy to know what is where regarding disks.
alias lsblk2='lsblk -o type,name,label,partlabel,size,fstype,model,serial,wwn,uuid'
do a lsblk --help to find all the things you can give it on the -o.... | How do I view all the disks? [duplicate] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.