LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Extending a root filesystem (https://www.linuxquestions.org/questions/linux-newbie-8/extending-a-root-filesystem-4175514016/)

abhijeetdutta 08-08-2014 04:09 PM

Extending a root filesystem
 
Hello

Extending a "/" filesystem in Linux (Centos5.7) without LVM.

Thanks

---------- Post added 08-08-14 at 05:10 PM ----------

i got below link, but it won't work for me.

http://thewiringcloset.wordpress.com...x-without-lvm/

Ser Olmy 08-08-2014 05:16 PM

It's impossible to say anything meaningful about what you need to do in order to extend the root FS of your system, as you've provided no details on your specific setup. Nor have you said anything about exactly what it was in the article that didn't "work" for you.

As the article clearly states, before you can extend the file system, you must extend the underlying device or partition. So:
  • Does your file system reside on a regular partition on a hard drive?
  • Is the drive partitioned using the MBR or GPT partitioning scheme?
  • Is there free space directly after the root partition?
  • Are there other partitions on the drive, and if so, can any of them be shrunk or deleted?

EDDY1 08-09-2014 07:15 PM

You need to post output of
Quote:

fdisk -l
toget any type of help.

abhijeetdutta 08-11-2014 02:26 PM

1 Attachment(s)
Sorry My mistake-

So now i am providing you all details hopefully it would be helpful

Filesystem Size Used Avail Use% Mounted on
/dev/sda3 42G 37G 4.8G 89% /
/dev/sdb1 50G 23G 25G 49% /home
/dev/sdc1 199G 91G 99G 48% /opt
/dev/sda1 99M 37M 58M 39% /boot
tmpfs 3.9G 0 3.9G 0% /dev/shm


Disk /dev/sda: 53.6 GB, 53612386816 bytes
255 heads, 63 sectors/track, 6518 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104391 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 14 1034 8193150 82 Linux swap / Solaris
/dev/sda3 1034 6517 44042197+ 83 Linux

Disk /dev/sdb: 53.7 GB, 53711078912 bytes
255 heads, 63 sectors/track, 6530 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 6529 52436128+ 83 Linux

Disk /dev/sdc: 214.7 GB, 214762061312 bytes
255 heads, 63 sectors/track, 26110 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


LABEL=/ / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
LABEL=/svn /opt ext3 defaults 0 0
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0



=======================

I am adding a new disk to increase my (/) partition.

I have followed up the exact steps provided in link http://thewiringcloset.wordpress.com...x-without-lvm/

and it screwed up my box and now i am getting kernel panic error.

only thing i did i had taken clone and did all my experiment.

so my prod box is alive. still i am struggling in re-sizing.


Enclosed attachment

abhijeetdutta 08-14-2014 07:41 AM

Any idea's, I am still stuck.

EDDY1 08-14-2014 02:02 PM

I think that would be better off having swap on sdc to free up space sda for /. Also you may have to run an fsck to correct the fs corruption. Not sure if using uuid's would be better.

JeremyBoden 08-14-2014 07:36 PM

Why is your / partition so big?
Surely there is a pile of removable stuff that could go?

Alternatively, you could delete the swap partition, and use a "live CD"
to extend / into the extra space.
If you still need swap space, create swap file(s) in another filesystem that has some free space.
It is almost as efficient as a dedicated swap partition.

BTW
Code:

df -h
will list all your mounted partitions in a concise and useful way.


All times are GMT -5. The time now is 02:41 PM.