[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Resize jfs partition

dclemen wrote:

> Hi, I have "/" directory on a partition with jfs file system. It has
> 140Gb size, but I remove another partition with 40Gb that was behind "/"
> partition. So I want to resize my / to get these 40Gb.
> I read some sites to resize partitions with:
> # mount -o remount,resize /home

Yes, that syntax works with jfs, as well.  On your Debian system you
can find that information in the mount(8) manual page. Search for
"Mount options for jfs".

> But I thing that I can't do it with / partition.

Jfs _is_ able to resize a file system which is in use. 
> There are any way to get it?. If not, maybe I can get any live-cd distro
> and then resize it.
> It is safe? (I don't want to loose my data)

It is "safe" in the way that it will work reliably without any known
errors that would lead to data loss. 

However, if a file system contains data that you cannot afford to
lose, it is _always_ a very good idea to have a current backup.  And
of course, the risk of losing data is much higher when you're
modifying file systems.

> Thanks
> PD: fdisk /dev/sda
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1        5864    47102548+   7  HPFS/NTFS
> /dev/sda2            5865        6085     1775182+  82  Linux swap / Solaris
> /dev/sda3            6086       24321   146480670   83  Linux
> /dev/sda4           29500       30401     7245315    5  Extended
> /dev/sda5           29500       30401     7245283+   b  W95 FAT32
> I want to get blocks from 24321 to 29500 (29499) into dev/sda3

This involves two steps:

  (1) Use fdisk to enlarge your /dev/sda3 partition to the new
      size:  Set the last cylinder of that partition to 29499 (not
      29500 !).  You need to reboot to make the kernel use the new
      partition table.  Now the partition is 40 GB larger, but the
      file system on that partition does not fill the complete
      partition yet.

  (2) Enlarge the file system on /dev/sda3 to completely fill the
      partition with "mount -o remount,resize".


Send personal mail to dennis@... only.  Off-list 
mails to lists@stosberg.net will not reach me.

Reply to: