Bug 1095773
Summary: | partx -a /dev/vda not working - VM reboot required to be synched to newly added size of partition. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Nikolai Sednev <nsednev> |
Component: | util-linux | Assignee: | Karel Zak <kzak> |
Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | nsednev |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-09-02 08:17:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nikolai Sednev
2014-05-08 13:38:18 UTC
Please see bellow that partx not updating kernel regarding changes beeing done to disk partitions until OS rebooted (here I'm deleting /dev/vda4 via fdisk, then saving this by entering "w" and trying to partx the kernel without success, until OS reboot, no changes taking any effect: [root@dashboard ~]# fdisk -u -c /dev/vda Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/vda: 75.2 GB, 75161927680 bytes, 146800640 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 Disk label type: dos Disk identifier: 0x0002f514 Device Boot Start End Blocks Id System /dev/vda1 * 2048 1026047 512000 83 Linux /dev/vda2 1026048 31457279 15215616 8e Linux LVM /dev/vda3 31457280 104857599 36700160 83 Linux /dev/vda4 104857600 146800639 20971520 8e Linux LVM Command (m for help): d Partition number (1-4, default 4): Partition 4 is deleted Command (m for help): p Disk /dev/vda: 75.2 GB, 75161927680 bytes, 146800640 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 Disk label type: dos Disk identifier: 0x0002f514 Device Boot Start End Blocks Id System /dev/vda1 * 2048 1026047 512000 83 Linux /dev/vda2 1026048 31457279 15215616 8e Linux LVM /dev/vda3 31457280 104857599 36700160 83 Linux Command (m for help): t Partition number (1-3, default 3): Hex code (type L to list all codes): Hex code (type L to list all codes): q Changed type of partition 'Linux' to 'unknown' Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks. [root@dashboard ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom vda 252:0 0 70G 0 disk ├─vda1 252:1 0 500M 0 part /boot ├─vda2 252:2 0 14.5G 0 part │ ├─vg0-lv_root 253:0 0 41.9G 0 lvm / │ ├─vg0-lv_swap 253:1 0 6.9G 0 lvm [SWAP] │ └─vg0-lv_home 253:3 0 688M 0 lvm /home ├─vda3 252:3 0 35G 0 part │ └─vg0-lv_root 253:0 0 41.9G 0 lvm / └─vda4 252:4 0 20G 0 part [root@dashboard ~]# partx -a /dev/vda4 [root@dashboard ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom vda 252:0 0 70G 0 disk ├─vda1 252:1 0 500M 0 part /boot ├─vda2 252:2 0 14.5G 0 part │ ├─vg0-lv_root 253:0 0 41.9G 0 lvm / │ ├─vg0-lv_swap 253:1 0 6.9G 0 lvm [SWAP] │ └─vg0-lv_home 253:3 0 688M 0 lvm /home ├─vda3 252:3 0 35G 0 part │ └─vg0-lv_root 253:0 0 41.9G 0 lvm / └─vda4 252:4 0 20G 0 part [root@dashboard ~]# partx -a /dev/vda partx: /dev/vda: error adding partitions 1-3 [root@dashboard ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom vda 252:0 0 70G 0 disk ├─vda1 252:1 0 500M 0 part /boot ├─vda2 252:2 0 14.5G 0 part │ ├─vg0-lv_root 253:0 0 41.9G 0 lvm / │ ├─vg0-lv_swap 253:1 0 6.9G 0 lvm [SWAP] │ └─vg0-lv_home 253:3 0 688M 0 lvm /home ├─vda3 252:3 0 35G 0 part │ └─vg0-lv_root 253:0 0 41.9G 0 lvm / └─vda4 252:4 0 20G 0 part [root@dashboard ~]# reboot Connection to 10.35.102.59 closed by remote host. Connection to 10.35.102.59 closed. [nsednev@nsednev ~]$ ssh -Y -X -l root 10.35.102.59 root.102.59's password: Last login: Thu May 8 16:41:40 2014 from dhcp-4-207.tlv.redhat.com [root@dashboard ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom vda 252:0 0 70G 0 disk ├─vda1 252:1 0 500M 0 part /boot ├─vda2 252:2 0 14.5G 0 part │ ├─vg0-lv_root 253:0 0 41.9G 0 lvm / │ ├─vg0-lv_swap 253:1 0 6.9G 0 lvm [SWAP] │ └─vg0-lv_home 253:2 0 688M 0 lvm /home └─vda3 252:3 0 35G 0 part └─vg0-lv_root 253:0 0 41.9G 0 lvm / [root@dashboard ~]# partx belongs to util-linux package, not busybox. There is difference between add (-a) and update (-u) partx commands. Try, partx -d /dev/vda4 partx -u /dev/vda3 It seems also little bit problematic to play with partition actively mapped by LVM. BTW, according to comment #2, you have deleted vda4 by fdisk, but vda3 is still the same (unchanged size), not sure what change do you expect from kernel. Note that kernel does not care about partition types (for example LVM is detected in userspace according to the partition content). Works for me. (In reply to Nikolai Sednev from comment #6) > Works for me. I guess we can close as NOTABUG. If you don't agree then reopen, please. Thanks. |