Solved

extend filesystem

Posted on 2009-05-19
5
1,090 Views
Last Modified: 2013-12-16
Need to know how/if to extend filesystem to new space made available from san. For example, have filesystem /dev/sdf1 mounted on /u02 that has 247G space but need 500G more. Client has made available another 500G from san and now we're not sure how to extend u02 to include the additional space.

OS: Linux version 2.6.9-78.0.8.0.1.ELsmp (mockbuild@ca-build17.us.oracle.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10.0.1)) #1 SMP Wed Nov 19 16:39:14 EST 2008

---------------------------------------------------------
df -h output:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              20G   16G  3.4G  83% /
none                  3.0G     0  3.0G   0% /dev/shm
/dev/sdc1              30G  5.1G   24G  18% /u01
/dev/sdf1             247G  232G  1.7G 100% /u02
---------------------------------------------------------

fdisk -l output:
Disk /dev/sda: 21.4 GB, 21495808000 bytes
255 heads, 63 sectors/track, 2613 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2613    20988891   83  Linux

Disk /dev/sdb: 12.8 GB, 12897484800 bytes
64 heads, 32 sectors/track, 12300 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       12300    12595184   83  Linux

Disk /dev/sdc: 32.2 GB, 32243712000 bytes
64 heads, 32 sectors/track, 30750 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1       30750    31487984   83  Linux

Disk /dev/sdd: 268.4 GB, 268439650304 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       32635   262140606   83  Linux

Disk /dev/sde: 268.4 GB, 268439650304 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1       32635   262140606   83  Linux

Disk /dev/sdf: 268.4 GB, 268439650304 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1       32635   262140606   83  Linux

Disk /dev/sdg: 536.8 GB, 536879300608 bytes
255 heads, 63 sectors/track, 65271 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdg doesn't contain a valid partition table
---------------------------------------------------------

cat /etc/fstab output:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=SWAP-sdb1         swap                    swap    defaults        0 0
LABEL=/u01              /u01                    ext3    defaults        1 2
LABEL=/u02              /u02                    ext3    defaults        1 2
/dev/hda                /media/cdrom            auto    pamconsole,exec,noauto,managed 0 0


0
Comment
Question by:geodin
  • 3
  • 2
5 Comments
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 500 total points
ID: 24427310
Hi,

I am afraid you can't. THe volume expansion is only possible under LVM (Logical Volume Manager) but your system thinks this is just a regular hard disk and it can not expand it.

To create a new LVM volume you can follow this procedure:

WARNINIG it is a destructive procedure make sure you've porperly backed all data prior to start :

- Just request a temporary volume with enough space to get all /u02 files form the SAN guy.
- mount it under a temp location such as /mnt
- Copy all /u02 files over the temporary volume.
- Create a LVM volume over the u02
  # pvcreate /dev/sdf1
  # vgcreate lv01 /dev/sdf1
  # lvcreate -L747M -n root lv01

Create a filesystem over the new volume
   # mke2fs /dev/lv01/root
   # mount /dev/lv01/root /u02

now copy the temporary contents over the new volume.

edit your /etc/fstab and chenge this:
LABEL=/u02              /u02                    ext3    defaults        1 2
into this:
/dev/lv01/root            /u02                    ext3    defaults        1 1

Now that you can always use vgexpand command whenever you add space.

Cheers,
K.


         
             
0
 

Author Comment

by:geodin
ID: 24433071
Thanks for the great answer but I can't get anymore space. So, I thought I should be able to mount the new disk as /u03 and create symbolic link for directory /u02/oradata/appn to point to /u03. Datafiles for the database are the major consumers of space and they live under /u02/oradata/appn/<dir 1,2,3,etc>

I have run fdisk on /dev/sdg and created partion 1 as /dev/sdg1 fine, I then ran mkfs.ext2 on /dev/sdg1 and it seemed to run fine, though I was a little confused as it looked like it was prompting me for response but before I could figure out what to enter it completed.

I then ran e2label /dev/sdg1 /u03

I then added line to fstab as :
LABEL=/u03              /u03                     ext3    defaults        1 2

But when I run mount /u03 I get "mount: mount point /u03 does not exist"

df -h shows no /u03 filesystem either.

Have I missed something?


0
 

Author Comment

by:geodin
ID: 24433229
Ok, figured out I hadn't created the u03 directory yet. Works now, I just need to do some testing.
0
 

Author Closing Comment

by:geodin
ID: 31583273
Ultimately I did not use this answer but it helped me a great deal and was excellent otherwise.

Thank you.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24433301
:) Yeah  I would just ask if you'd created the mountpoint. Just take your time. I hope everything goes well with you :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now