Hot answers tagged

9

Multiply-claimed blocks are blocks which are used by multiple files, when they shouldn’t be. One consequence of that is that changes to one of those files, in one of the affected blocks, will also appear as changes to the files which share the blocks, which isn’t what you want. (Hard links are a different scenario, which doesn’t show up here.) If there is ...


5

What does that warning mean? The warning means that once upon a time, there was an ext4 filesystem in the same disk location (start offset) as the swap partition you were trying to create. NOTICE: When you delete a partition, the filesystem within does not get deleted. The warning exists to give you a chance to back out of the irreversible operation, in ...


5

Note that in older versions of Debian the su command came from the old shadow source package, but Debian 10's su comes from util-linux source code and has different semantics. Depending on how exactly you're switching to root, you might now be getting /sbin and /usr/sbin omitted from your PATH, which would explain the shell not finding the LVM tools. In ...


4

Use lsblk -f. $ lsblk -f NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT sda ├─sda1 ext4 d2123fec-6c94-426f-b505-8cf3441122cf 742,6M 17% /boot └─sda2 ...


4

How shall I create PVs, VGs an LVs on external hard drives? In my opinion you shouldn’t. LVM is useful because it allows volumes to be resized, created, removed, and snapshotted easily; none of these are particularly useful on removable volumes, where typical usage patterns involve a single partition occupying all the available space. In addition, LVM ...


4

To make the space available, you need to use the xfs_growfs command as the filesystem on your logical volume is xfs. xfs_growfs / If it were ext2, ext3, or ext4, then you'd use resize2fs with the name. EDIT: It appears to have been changed in its latest release for Fedora and RHEL 8 and CentOS 8. Using the lv/block device works in RHEL 7 and CentOS 7 but ...


3

LVM requires each VG / LV to have its own unique name. It will refuse to activate duplicate names. If these are coming from separate installs, they'll each have their own unique VG UUID as shown in vgdisplay output. Using this UUID you can rename one of them... vgrename $VGUUID homburg ...and that should resolve the problem. What the linked answer seems ...


3

Symptoms The lsblk -t OPT-IO value was really high (pointed out by frostschutz) When running smartctl on the disk, I was seeing: Read Device Identity failed: scsi error unsupported field in scsi command Cause It seems that -1 is returned if an optimal IO value can't be read. As pointed out by Steve Dee: 33553920 / 512 (logical sector size) = 65535 -1 ...


3

Does the LV become mountable if you do a sudo vgscan and sudo vgchange -ay? If those commands result in errors, you probably have a different problem and should probably add those error messages in your original post. But if the LV becomes ready for mounting after those commands, read on... The LVM logical volume pathname (e.g. /dev/mapper/vgNAME-lvNAME) ...


3

Both commands are intended to list PVs. pvs can be configured to list the same information as lvmdiskscan does by default: pvs -a -o+dev_size will list all devices with their size. Likewise, lvmdiskscan can be configured similarly to pvs’ defaults: lvmdiskscan -l will only list devices containing PVs. lvmdiskscan is deprecated in favour of pvs because ...


3

What does "moves the allocated physical extents (PEs) on a source PV to one or more destination PVs" mean? It means what it says. The extents (blocks of data) in one PV are moved to another one. For example, if you have two PVs /dev/sda1 and /dev/sdb1 for a VG you can move the extents from /dev/sda1 to /dev/sdb1). Assuming you had enough space on /dev/sdb1 ...


3

lsblk should help to display if volume is lvm! Ex: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 200M 0 part ├─sda2 8:2 0 1G 0 part ├─sda3 8:3 0 464.6G 0 part └─md126 9:126 0 465.8G 0 raid1 ├─md126p1 259:0 0 ...


3

Since you seem to have a single physical volume, I really wonder how partial activation can happen in your case. It should be all or nothing. But here are a couple of issues to take care of anyway: You need persistent multipath device names. I'm not sure where mpathb comes from, but I recommend against enabling user_friendly_names in /etc/multipath.conf for ...


3

There are two separate things: the filesystem, a data structure that provides a way to store distinct named files, and the block device (disk, partition, LVM volume) on inside of which the filesystem lies resize2fs resizes the filesystem, i.e. it modifies the data structures there to make use of new space, or to fit them in a smaller space. It doesn't ...


3

(I'm not sure why you're using the -o loop mount option, as the LVM snapshot device should be just as good a disk device as its original is.) "File exists" is the standard English text for errno value 17, or EEXIST as it is named in #include <errno.h>. That error result is not documented for the mount(2) system call, so a bit of source code reading ...


3

You can't shrink a mounted ext4, so you have to do this from e.g., a live CD. First, you shrink the logical volume, including resizing the filesystem. Note that this will take a while! It may have to move a lot of data. lvreduce -r -L 290G «vg-name»/«lv-name» Note both -r (which tells it to resize the filesystem first, this is critical to not suffer data ...


3

Yes, resize2fs moves data as needed (at least on ext4). That means that lvreduce -r (the -r is critical) is safe as well, because it first calls resize2fs via fsadm. Note that ext4 can shrink only in offline mode (when unmounted); trying to do it while mounted should just error out. Of course, "safe" is only if there are no bugs, power isn't cut in the ...


3

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 can ...


2

No, creating a logical volume inside a logical volume is not possible in HP-UX LVM.


2

I had the same problem: make-bcache --block 4k --bucket 2M -C /dev/nvme0n1p1 caused the write error: Invalid argument. Specifically, it was the --block 4k that caused the problem. make-bcache --bucket 2M -C /dev/nvme0n1p1 Worked perfectly.


2

Q : Did I just add this disk to the current LV and now I just need to resize it? I tried to get this to mount but it comes back with the following error. A : If you want to extend you current LVM with new disk, first you need to create partition on new disk like @roaima already mention before then extend the current volume group of your LVM and then extend ...


2

pvresize /dev/sdb lvextend -r -l +100%FREE /dev/cl/root


2

After reading the remarks by telcoM and further digging in the logs and man pages, I'm now able to answer my own question. For some reason the information about the VG the PV /dev/sdc belongs to was lost during the reboot, and never came back. I do not fully understand the solution (perhaps somebody who does can add some details), but the following worked. ...


2

From man fsck.ext2 e2fsck is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions in the journal, the file system should be marked as clean. ...


2

The intuitive option would be to use the -r, --resizefs option provided by lvresize: -r, --resizefs Resize underlying filesystem together with the logical volume using fsadm(8). The test output shown below is from my CentOS 7 system, but the principle should be same for Ubuntu as well. We start with a 10GiB LV: [root@testvm1 ~]# lvs testvg/testlv ...


2

You said yourself: A PV can be a disk partition, whole disk, meta device, or loopback file I don't understand your question. A PV can be a partition or a whole disk. Delete all partitions and you will be able to use the whole disk. If you don't want to use the whole disk, then use a partition instead. You should also know that one partition that covers ...


2

They are both block storage devices. In principle one could add a partition table to a partition, thus adding partitions to it. However Operating Systems may not recursively traverse partitions, so they may no be found, and thus may not be treated the same. Note: Extended partitions are a partition with a partition table within.


2

A disk without being partitioned is a disk with no partitions or partition table; it’s not a partition (a partition separates something into parts, even if it’s only one; a whole disk isn’t separated into parts). A disk with one partition is a disk with a partition table of some sort (there are several partitioning schemes), with one entry in the table ...


2

In LVM parlance, a meta device is a device created from some other device or set of devices. Examples include devices created by the MD layer (/dev/md1 etc.), representing aggregated devices, and devices created by LVM itself, representing logical volumes (so it is possible to create a PV from an LV...).


2

This is an opinion, but for drives you plan on treating as removable then I would not use LVM at all. Just stick with partitions. I use LVM for situations where I might want to dynamically create or resize volumes. So on my virtual server host I can create a new virtual machine with the virtual hard disk being a newly created logical volume. If my backup ...


Only top voted, non community-wiki answers of a minimum length are eligible