Hello,
How to explain to fdisk that /dev/sda size changed? I increased LUN on storage, reloaded iscsi, did echo 1 > /sys/<something>/rescan. And I see in "dmesg" that kernel found new size of the LUN. But when I type "fdisk /dev/sda" it still shows old size. On /dev/sda1 sits LVM PV and I'd like to resize it instead of adding one more PV to volume group.
CentOS 4.4 64bits.
Thanks,
Mindaugas
Mindaugas wrote:
Hello,
How to explain to fdisk that /dev/sda size changed? I increased LUN on storage, reloaded iscsi, did echo 1 > /sys/<something>/rescan. And I see in "dmesg" that kernel found new size of the LUN. But when I type "fdisk /dev/sda" it still shows old size. On /dev/sda1 sits LVM PV and I'd like to resize it instead of adding one more PV to volume group.
I think it may be the MBR that still has the old size in it.
Try opening it in fdisk, save it, then re-open it.
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
Hi,
How to explain to fdisk that /dev/sda size changed? I increased LUN on storage, reloaded iscsi, did echo 1 > /sys/<something>/rescan. And I see in "dmesg" that kernel found new size of the LUN. But when I type "fdisk /dev/sda" it still shows old size. On /dev/sda1 sits LVM PV and I'd like to resize it instead of adding one more PV to volume group.
I think it may be the MBR that still has the old size in it.
Try opening it in fdisk, save it, then re-open it.
Probably. But opening and saving does not help. "partprobe /dev/sda" does not help too.
Mindaugas
dmesg: SCSI device sda: 1048576000 512-byte hdwr sectors (536871 MB) SCSI device sda: drive cache: write through
# fdisk /dev/sda
The number of cylinders for this disk is set to 26108. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 1 26108 209712478+ 8e Linux LVM
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. Syncing disks.
# partprobe /dev/sda
# fdisk -l /dev/sda
Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 1 26108 209712478+ 8e Linux LVM
Mindaugas wrote:
Hi,
How to explain to fdisk that /dev/sda size changed? I increased LUN on storage, reloaded iscsi, did echo 1 > /sys/<something>/rescan. And I see in "dmesg" that kernel
found new
size of the LUN. But when I type "fdisk /dev/sda" it still shows old size. On /dev/sda1 sits LVM PV and I'd like to resize it instead of adding one more PV to volume group.
I think it may be the MBR that still has the old size in it.
Try opening it in fdisk, save it, then re-open it.
Probably. But opening and saving does not help. "partprobe /dev/sda" does not help too.
Mindaugas
dmesg: SCSI device sda: 1048576000 512-byte hdwr sectors (536871 MB) SCSI device sda: drive cache: write through
# fdisk /dev/sda
The number of cylinders for this disk is set to 26108. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with:
- software that runs at boot time (e.g., old versions of LILO)
- booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 1 26108 209712478+ 8e Linux LVM
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. Syncing disks.
# partprobe /dev/sda
# fdisk -l /dev/sda
Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 1 26108 209712478+ 8e Linux LVM
Make sure no partitions on the volume are mounted before running fdisk, you can't do this "live".
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
On Nov 16, 2007 10:06 PM, Mindaugas ml@kilimas.com wrote:
Hello,
How to explain to fdisk that /dev/sda size changed?
Try to send him an email fdisk@util-linux.org :-) Please be polite :-)
or maybe try
# partprobe /dev/sda
I increased LUN on storage, reloaded iscsi, did echo 1 >
/sys/<something>/rescan. And I see in "dmesg" that kernel found new size of the LUN. But when I type "fdisk /dev/sda" it still shows old size. On /dev/sda1 sits LVM PV and I'd like to resize it instead of adding one more PV to volume group.
I imagine sda1 is thee only partition on sda !
I know all LVM commands by hart and was not knowing pvresize ! What a crazy thing! A day it will be possible to move an entire partition inside a disk, and doing this online ! Then LVM will become useless :-) I thing a day a man will walk on the moon :-)
Regards
Alain
CentOS 4.4 64bits.
Thanks,
Mindaugas _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos