Sponsored Content
Operating Systems Linux Red Hat Fdisk reports the old size after disk resize Post 302859505 by maverick_here on Thursday 3rd of October 2013 10:38:52 AM
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
 

7 More Discussions You Might Find Interesting

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

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

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

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

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

7. 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
SD(4)							     Linux Programmer's Manual							     SD(4)

NAME
sd - driver for SCSI disk drives SYNOPSIS
#include <linux/hdreg.h> /* for HDIO_GETGEO */ #include <linux/fs.h> /* for BLKGETSIZE and BLKRRPART */ CONFIGURATION
The block device name has the following form: sdlp, where l is a letter denoting the physical drive, and p is a number denoting the parti- tion on that physical drive. Often, the partition number, p, will be left off when the device corresponds to the whole drive. SCSI disks have a major device number of 8, and a minor device number of the form (16 * drive_number) + partition_number, where drive_num- ber is the number of the physical drive in order of detection, and partition_number is as follows: partition 0 is the whole drive partitions 1-4 are the DOS "primary" partitions partitions 5-8 are the DOS "extended" (or "logical") partitions For example, /dev/sda will have major 8, minor 0, and will refer to all of the first SCSI drive in the system; and /dev/sdb3 will have major 8, minor 19, and will refer to the third DOS "primary" partition on the second SCSI drive in the system. At this time, only block devices are provided. Raw devices have not yet been implemented. DESCRIPTION
The following ioctls are provided: HDIO_GETGEO Returns the BIOS disk parameters in the following structure: struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; }; A pointer to this structure is passed as the ioctl(2) parameter. The information returned in the parameter is the disk geometry of the drive as understood by DOS! This geometry is not the physical geometry of the drive. It is used when constructing the drive's partition table, however, and is needed for convenient operation of fdisk(1), efdisk(1), and lilo(1). If the geometry information is not available, zero will be returned for all of the parameters. BLKGETSIZE Returns the device size in sectors. The ioctl(2) parameter should be a pointer to a long. BLKRRPART Forces a reread of the SCSI disk partition tables. No parameter is needed. The SCSI ioctl(2) operations are also supported. If the ioctl(2) parameter is required, and it is NULL, then ioctl(2) will fail with the error EINVAL. FILES
/dev/sd[a-h]: the whole device /dev/sd[a-h][0-8]: individual block partitions COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-05-03 SD(4)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy