Operating System - Linux
1823143 Members
3530 Online
109647 Solutions
New Discussion юеВ

How does linux support hot plug disks?

 
Andrej Vavro
Frequent Advisor

How does linux support hot plug disks?

Hi,

fdisk -l doesn't show me additional disk space I've added into running system. How can manage this without reboot?

regards,
Andrej
11 REPLIES 11
Stuart Browne
Honored Contributor

Re: How does linux support hot plug disks?

Normaly hot-plug disks are part of a RAID container.

The RAID container is what needs to be reconfigured.

Are the new disks plugged into a RAID controller? If so, is it on HP hardware?

If it is, you need to access the ACU tools to configure the containers online.
One long-haired git at your service...
Andrej Vavro
Frequent Advisor

Re: How does linux support hot plug disks?

Stuart,

it is a RAID container. RAID utilities are showing added disks. I'm in linux forum, so it's on linux.

Has anybody of you upgraded disk capacity in RAID container in running system yet?

There are 3 Oracle production databases, I need upgrade disk capacity. HW allows it online. What about linux capability?

regards,
Andrej
Stuart Browne
Honored Contributor

Re: How does linux support hot plug disks?

Depends on the RAID controller.

If you've added the disks, expanded the existing container or added a second container using the online tools, then the space should be available.

If you expanded the existing container, then at worst you many need to get the RAID controller to rescan the devices.

If you added a new container, then you should have a hew disk device available.

What hardware are you using? Are you using HP equiptment with a Smart Array controller? or something else?
One long-haired git at your service...
Andrew Cowan
Honored Contributor

Re: How does linux support hot plug disks?

I've seen this problem on both HP-UX and AIX, and think it has something to do with files only being marked as deleted, and so the space cannot be reclaimed/shown as available until the filesystem is closed, and the the VTOC data written to disk.

Can you unmount, fsck, and remount these volumes to see if that updates the free space?

In answer to your original question, Linux broadly treats all hot-plug devices as quasi-scsi drives, which is why they appear as /dev/sd??.
Steven E. Protter
Exalted Contributor

Re: How does linux support hot plug disks?

For many HP/Compaq servers you need to boot off a special disk preparation disk prior to OS install. This enables you to set up containers, or modify them after installation.

There is a CD that comes with the servers that lets you do this. Alternatively, you can always download one specific to your server off the server support website.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Andrej Vavro
Frequent Advisor

Re: How does linux support hot plug disks?

I can see there is no other way than going down with databases and umount the device.

Andrej
Andrew Cowan
Honored Contributor

Re: How does linux support hot plug disks?

Assuming you are using e2fsadm, have you tried the "-t" option? This could force a re-read of the VTOC and thus update the freelist.
Stuart Browne
Honored Contributor

Re: How does linux support hot plug disks?

How about you answer the questions asked so we can stop guessing as to what's actually happening?

You've not told us the steps you used to expand the container.

You've not told us what type of RAID controller is in use!

We need more details so we can stop fishing!
One long-haired git at your service...
Andrej Vavro
Frequent Advisor

Re: How does linux support hot plug disks?

Guys,

thanks for replies. Tomorrow I am going down with the system knowing there is no other way.

There were 8 disk in IBM EXP300 container. I've added 6 more. RaidMan is a linux X tool (somebody might know) to manage IBM HW RAID.
6 disks were configured succesfully and added to a logical array B by RaidMan in running system. Raidman sees full capacity of the container including 6 added disks.
fdisk -l shows capacity of first 8 disks only on /dev/sdb device. It does not matter what HW it is on. I tried w in fdisk utility to write partition expecting re-read and here is the result:

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Re-read table failed with error 16: Device or resource busy.
Reboot your system to ensure the partition table is updated.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

This is a linux (probably unix) issue in case there is added more capacity to hot plug RAID container to the existing device (/dev/sdb). The device should not in use, must be unmounted and then created a new partition /dev/sdb2. Do you have different experience?



"-t" option doesn't work for me:

beckov:~ # fdisk -t /dev/hda
fdisk: invalid option -- t

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO drives) use 2048-byte sectors

regards,
Andrej
Stuart Browne
Honored Contributor

Re: How does linux support hot plug disks?

Ok, so an existing array was expanded.

As the EXP 300 is a storay array, not a RAID controller, this still begs a question. But using 'RaidMan' should be of help, so I'll make an assumption it's an IBM ServeRaid controller.

I've no experience using any of the IBM RAID equiptment so this is just from google searches.

What needs to happen is for the ServeRaid controller to re-read (rescan) and inform the OS.

One suggested way to do that:

echo "scsi-add-single-device 0 0 1 0" > /proc/scsi/scsi

(From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=117381 , which is a bug/feature request describing exactally what you are doing).

A few days ago there was a small script which was written to rescan all SCSI controllers and LUN's. I just can't find it at the moment, but this should be enough.
One long-haired git at your service...
Andrej Vavro
Frequent Advisor

Re: How does linux support hot plug disks?

fixed. Thank you for replies.

regards,
Andrej