Fdisk reports the old size after disk resize

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Fdisk reports the old size after disk resize
# 1  
Old 10-03-2013
Fdisk reports the old size after disk resize

Hi,

I'm running a Red Hat Enterprise Linux Server release 5.3 (Tikanga) on VMWare. It is a production system for which I may not get downtime soon. I happened to resize a underlying disk and the changes are not reflecting in the fdisk ouput. Further details are as follows.

The disk which i have extended is /dev/sdv. I have done it as follows

Extended the underlying VMDisk from 38 GB to 50 GB in the Edit windows of the virtual machine


On the OS ( Linux ) I ran the following command for the changes to be picked up

Code:
echo 1 > /sys/class/scsi_disk/1:0:4:0/device/rescan

Following was the output logged in the /var/log/messages

Code:
Oct  3 11:14:08 ########### kernel: SCSI device sdv: 75497472 512-byte hdwr sectors (38655 MB)
Oct  3 11:14:08 ########### kernel: sdv: Write Protect is off
Oct  3 11:14:08 ########### kernel: sdv: cache data unavailable
Oct  3 11:14:08 ########### kernel: sdv: assuming drive cache: write through
Oct  3 11:14:31 ########### kernel: SCSI device sdv: 75497472 512-byte hdwr sectors (38655 MB)
Oct  3 11:14:31 ########### kernel: sdv: Write Protect is off
Oct  3 11:14:31 ########### kernel: sdv: cache data unavailable
Oct  3 11:14:31 ########### kernel: sdv: assuming drive cache: write through
Oct  3 11:44:20 ########### kernel: SCSI device sdv: 104857600 512-byte hdwr sectors (53687 MB)
Oct  3 11:44:20 ########### kernel: sdv: Write Protect is off
Oct  3 11:44:20 ########### kernel: sdv: cache data unavailable
Oct  3 11:44:20 ########### kernel: sdv: assuming drive cache: write through

Now when I did a

Code:
partprobe /dev/sdv

The disk size shown in fdisk did NOT change.


Code:
Disk /dev/sdv: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdv1               1         872     7004308+  83  Linux
/dev/sdv2             873        4699    30740377+  83  Linux


I have done this in the past without requiring a reboot.Any idea.


Thanks in Advance
# 2  
Old 10-03-2013
rescan won't work if the disk or partitions are open or mounted in any way.
# 3  
Old 10-03-2013
Then what about the log, it shows that the disk was resized.
# 4  
Old 10-03-2013
Altering the partition table is only a matter of writing to the disk, the system won't/can't stop you from doing that if you have the relevant permissions. But Linux won't rescan the MBR of a disk which is in-use in any way.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Red Hat

Make a disk disappear from fdisk output

Hello, 1 ) Fdisk -l # Displays all the disk with partition table information My Query ) A ) How can i make one disk ex: /dev/sdd not visible in fdisk -l output ? B) From where fdisk -l collect and display the information ? (8 Replies)
Discussion started by: saurabh84g
8 Replies

2. Shell Programming and Scripting

Want to resize images for a specific size on server - Please help

,,,,,, (4 Replies)
Discussion started by: Praveen Pandit
4 Replies

3. UNIX for Dummies Questions & Answers

add disk redhat, fdisk -l doesn't work

i'm trying to add disk to red hat , use fdisk -l but it doesn't recognize it what should i do it to get it works? (3 Replies)
Discussion started by: prpkrk
3 Replies

4. Solaris

Fdisk partitions on boot disk and disaster recovery

I'm preparing to recover a Oracle Fire X4170 server in a disaster recovery test at a different location than in prod. I have some questions about fdisk partitions. I'm using Solaris 10 update 10. On my prod server, the boot disk has 2 partitions, diagnostic and solaris. Is the diagnostic... (1 Reply)
Discussion started by: TKD
1 Replies

5. Solaris

Resize disk space

I am trying to resize my disk space to be bigger on my solaris server (Sun Fire V240) this server and other windows servers are attached to a SAN disks, the disk I want to resize is on the SAN. I have free space on the SAN disks so I added some space to the windows disks and I made some... (8 Replies)
Discussion started by: sofihdi
8 Replies

6. UNIX Desktop Questions & Answers

Resize the default window size

Hi, How can I resize the terminal window's default size in CDE (Solaris)? Regards, Sharif. (1 Reply)
Discussion started by: sharif
1 Replies

7. UNIX for Dummies Questions & Answers

Resize root disk slices

I have a Sun box running Solaris 9. My root disk was slices too small when it was installed and I am now at 99% capacity for my root partition. Is it possible, and if so how?, to increase the size of slice 0 and decrease the size of slice 7?? Thanks! Current partition table... (6 Replies)
Discussion started by: FredSmith
6 Replies
Login or Register to Ask a Question