Solved

extend filesystem

Posted on 2009-05-19
5
1,095 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

839 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