LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-28-2007, 08:44 AM   #1
fab_lab_99
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Rep: Reputation: 0
How to assign non-contiguous free space to a filesystem


Hello.
I am working on a standalone server running RHEL AS 4 upd. 4, no LVM defined. I need to increase the size of my /var filesystem.
First I succesfully reduced the size of /home, /, and /usr filesystems. I gained about 20 GB of free non-contiguous space. This is the output from 'parted /dev/hda print' :

Code:
1          0.031    101.975  primary   ext3        boot
2        101.975   5106.599  primary   ext3
3      12103.660  12833.173  primary   ext3
4      24105.344  38162.219  extended
7      24105.375  28105.905  logical   linux-swap
5      28105.937  32106.467  logical   linux-swap
8      32106.498  32616.342  logical   ext3
6      35102.997  38099.465  logical   linux-swap
The output from 'df -m':

Code:
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hda8                  493       218       255  47% /
/dev/hda1                   99        11        83  12% /boot
none                       248         0       248   0% /dev/shm
/dev/hda3                  688       422       239  64% /home
/dev/hda2                 4920      4355       366  93% /usr
/dev/hda5                 3938      3241       498  87% /var
/dev/hda6                 2950        37      2764   2% /tmp

The problem is that I can't manage to assign all the freed space to /var . Can you suggest me the best way to proceed?
 
Old 06-28-2007, 10:49 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
The only way to place a filesystem in a non-contiguous chunk of hard drive space is to create partitions and use either software raid (linear mode) or LVM to form a single partition.
 
Old 06-28-2007, 11:54 AM   #3
fab_lab_99
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Original Poster
Rep: Reputation: 0
I had already tried with LVM. I followed these steps:

1. Create new partitions using fdisk;
2. Creating Physical Volume for each new partition, with pvcreate;
3. Creating Volume Group containing all Physical Volume, with vgcreate;

Anyway, there is a problem. During first steps (creating partitions with fdisk), I realized that the system didn't allow me to create partitions using free cylinders from 5106.599 to 12103.660, nor from 12833.173 to 24105.344 .
These cylinders are the main free space I obtained shrinking previous file systems. fdisk only allows me to create partitions from 32616.342 to 35102.997, that means after the last existing partition. But these is only a very small part of the freed space ... so, the remaining cylinders cannot be used??? It would be a waste...
 
  


Reply

Tags
defined, ext3, filesystem, size



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
Help removing free space to create Raw free space nightmare55 Linux - Newbie 11 10-01-2009 03:07 AM
how to assign names to PCI devices, that ioctl() can use from user space? MarkGaleck Linux - Kernel 2 10-23-2006 03:55 PM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:05 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
Open Source Consulting | Domain Registration