LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2013, 10:18 AM   #1
fuel451
LQ Newbie
 
Registered: Sep 2013
Posts: 14

Rep: Reputation: Disabled
RHEL 5.5 Resize/Rescan Volume Question


Pretty new to RHEL. Running RHEL 5.5 and I have an iSCSI (ext-3) connection to an EqualLogic SAN group with a 2.50 TB volume. I have a second 5.0 TB volume on the SAN then is free. I'd like to drop the 5.0 TB volume and resize the 2.50 TB volume to take advantage of the full capacity.

After modifying the SAN capacity to use the full space, what are the proper comman line steps on the Linux server to rescan/resize the volume? Thanks in advance.
 
Old 10-21-2013, 10:54 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
1. take a backup
2. echo 1 > /sys/block/sdX/device/rescan # where X is b/c/d/whatever your disk is
3. resize2fs /dev/sdX # X again
 
Old 10-21-2013, 10:54 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
I can only give a partial answer... It depends.

The problem is not the expansion, that shouldn't be a problem for the SAN. The problem is resizing the existing filesystems. That depends on the filesystem already existing.

Some of the filesystems (ext2 and I think 3) have fixed size inode tables. Just expanding the storage will get you more data space, but you still can't add more inodes. filesystems like ext4/xfs/btrfs, also allow inode tables to be expanded as needed.

Other than that there are a number of references (google is your friend) on doing that. As always, backups are essential - just in case something goes wrong.

BTW, be sure the "new space" is added to the existing space, and not the otherway around.
It is possible to do it that way, but the existing filesystem has to be relocated (as in copied to the new beginning) before it will even work.

Last edited by jpollard; 10-21-2013 at 10:56 AM.
 
Old 10-21-2013, 11:35 AM   #4
fuel451
LQ Newbie
 
Registered: Sep 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you for the quick response. I believe we just did a backup but I wouldn't make a change like this without one. The disk is not mounted to /dev/sdX, but its mounted to /dev/dm-4. My assumption is this won't make a difference? Last question, no unmounting is required? This process seems awefully short for a Linux process.
 
Old 10-21-2013, 01:04 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
You said ext3, so yes, this should be able to all be done online.
If dm-4 is a multipath device, you need to rescan all underlying sdX devices. If it's some other sort of device mapped disk, you may need extra steps.
If LVM is in use, after expanding the LUN on the SAN and making Linux detect it, you need to pvresize the physical volume, then lvresize the LV, then you can resize2fs the filesystem.
 
Old 10-22-2013, 09:56 AM   #6
fuel451
LQ Newbie
 
Registered: Sep 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you all again for the input. Here's my working process. Time to complete was about an hour.

From SAN Web Interface
1. Make sure you have a good backup
2. Remove 5.0 TB volume via EqualLogic web interface.
3. Resize 2.5 TB volume via EqualLogic web interface.

This step may not be necessary, but if you receive a "umount: <path> : device is busy" message, it may be necessary to kill one or all processes for a user

From Linux Server
4. Un-mount the file system – umount /dev/eql/volume
5. Run File System Check – fsck –f /dev/eql/volume (about 30 - 45 min)
6. Run Resize - resize2fs /dev/eql/volume (about 15 min)
7. Mount the file system – mount /dev/eql/volume
8. Run a df -h and verify new space is available and all data is intact
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mdadm: unable to resize volume LBM Linux - Software 8 03-25-2012 05:56 AM
Resize the Logical volume navin.altair Linux - Hardware 2 02-16-2012 10:32 PM
resize LVM volume harshaabba Linux - Server 2 10-13-2010 03:23 PM
Fedora LVM volume group & Physical Volume resize problem gabeyg Fedora 1 05-14-2008 12:26 PM
rhel 2.4/eva lun unpresent/scsi rescan=hang duvalr Linux - Enterprise 1 03-23-2007 05:17 AM


All times are GMT -5. The time now is 03:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration