You are not logged in.

#1 2008-12-30 05:59:45

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Resizing A JFS Partition

Hi, I have two JFS partitions (root and home) that are huge compared to what im actually using and now I need the free space that they have. Is there anyway to resize the partitions since there is about 25-30gb that isnt being used?

Offline

#2 2008-12-30 06:39:20

weasel8
Member
Registered: 2008-12-15
Posts: 149

Re: Resizing A JFS Partition

Won't any standard partitioning utility work? Try parted, or gparted if you want something graphical. (You might also want to have a look at the gparted live CD.)

Offline

#3 2008-12-30 07:33:43

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Resizing A JFS Partition

+1 for the GParted LiveCD... I'm pretty sure it will do it.

Remember to make backup's first!

Offline

#4 2008-12-30 08:02:37

weasel8
Member
Registered: 2008-12-15
Posts: 149

Re: Resizing A JFS Partition

fukawi2 wrote:

Remember to make backup's first!

Yes, I can't emphasize this enough. Also make absolutely positive you have a reliable source of power. My laptop battery died in the middle of a gparted op after I forgot to plug it in, and it nuked my /home partition. sad

Last edited by weasel8 (2008-12-30 08:03:02)

Offline

#5 2008-12-30 08:03:03

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Resizing A JFS Partition

Just note that JFS cannot be made smaller. I don't think this will be a problem if you are just trying to fill extra space.

Offline

#6 2008-12-30 08:03:41

weasel8
Member
Registered: 2008-12-15
Posts: 149

Re: Resizing A JFS Partition

iBertus wrote:

Just note that JFS cannot be made smaller. I don't think this will be a problem if you are just trying to fill extra space.

Actually, it sounds like he's trying to shrink them...

Offline

#7 2008-12-30 08:25:46

Statix
Member
From: Hangzhou, China
Registered: 2008-02-16
Posts: 240

Re: Resizing A JFS Partition

Yup, unfortunately JFS cannot be shrunk by any means that I know of. (And I've tried)

However it can be grown though not through typical parted. I think it has to be mounted to do it, but I'm not familiar with the actual process.


Madly in love with Arch64, Openbox, DotA, and of course... penguins!
Happy to help if you're not a Help Vampire. Use your wonderful resources like ArchWiki, Google, and our wonderful search page.

Offline

#8 2008-12-30 15:43:05

NVS
Member
Registered: 2007-12-30
Posts: 29

Re: Resizing A JFS Partition

Like they say, JFS cannot be shrunk.  However, you could make backups, transfer the information around and repartition, given you have other drives.

As far as growing a JFS partition, take a look at:
$ mount -o remount,resize

Last edited by NVS (2008-12-30 15:43:28)

Offline

#9 2008-12-30 18:58:20

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Resizing A JFS Partition

weasel8 wrote:
iBertus wrote:

Just note that JFS cannot be made smaller. I don't think this will be a problem if you are just trying to fill extra space.

Actually, it sounds like he's trying to shrink them...

yep thats what im trying to do. i guess if i really want to i'll have to tar everything up, recreate the partitions and then untar them. is there any special procedure i should follow for this?

Offline

#10 2008-12-30 19:21:34

weasel8
Member
Registered: 2008-12-15
Posts: 149

Re: Resizing A JFS Partition

brando56894 wrote:
weasel8 wrote:
iBertus wrote:

Just note that JFS cannot be made smaller. I don't think this will be a problem if you are just trying to fill extra space.

Actually, it sounds like he's trying to shrink them...

yep thats what im trying to do. i guess if i really want to i'll have to tar everything up, recreate the partitions and then untar them. is there any special procedure i should follow for this?

Well, you could do two things, the way I see it. You could tar & compress everything and burn it do a DVD or put it on an external drive, or, ff you have an external drive with enough space, run a command like this...

dd if=/ of=/mnt/exhdd/system.img

...which will create a mirror image of your entire drive on the external one.
Just a suggestion. Good luck!

Offline

#11 2008-12-31 00:33:36

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Resizing A JFS Partition

This is one reason that I'm starting to look at ext4 for my future installations. It seems like it has many of the same features as JFS but with full resize and online defragmentation support. One of the major snags with using JFS in my LVM setup (which I do anyway) is the lack of shrink support.

That said, JFS still wins in most benchmarks that I've run on my array vs ext4. I notice only marginal performance increases with ext4 over ext3+dir_index and that's sad since ext4 was forked from ext3 so that more experimental features could be added. One almost wonders why nobody ever just adopted JFS and tried to overcome it's limitations instead of building something new from scratch.

Offline

#12 2009-01-13 00:21:41

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Resizing A JFS Partition

weasel8 wrote:

Well, you could do two things, the way I see it. You could tar & compress everything and burn it do a DVD or put it on an external drive, or, ff you have an external drive with enough space, run a command like this...

dd if=/ of=/mnt/exhdd/system.img

...which will create a mirror image of your entire drive on the external one.
Just a suggestion. Good luck!

I just tried it a few different ways and nothing seemed to work. ive tried it your way and this way and both of them seem to give me the same error that says' not a directory'

more specifically if i try it your way and boot from the arch live cd and mount the drive that im storing the image on (drive sdb1 aka /media/media) (replacing dd if=/ of=/mnt/exhdd/system.img with dd if=/dev/sda4 of=/dev/sdb1/arch-root.img) the error i get is:   dd: opening '/dev/sdb1/arch-root.img' : not a directory

the other way the error just comes from bash and says not a diretory, but if i point it to a directory instead of the image (ex. /dev/sdb1/) it says 'is a directory'

also in the link to the guide that i posted it says something about zeroing the free space on the partition and them deleting the file to make the image smaller since theres nothing there but i didnt really understand the method to do it and didnt want to accidentally overwrite my root partition with all zeros.

Offline

#13 2009-01-13 01:02:17

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Resizing A JFS Partition

brando56894 wrote:
weasel8 wrote:

Well, you could do two things, the way I see it. You could tar & compress everything and burn it do a DVD or put it on an external drive, or, ff you have an external drive with enough space, run a command like this...

dd if=/ of=/mnt/exhdd/system.img

...which will create a mirror image of your entire drive on the external one.
Just a suggestion. Good luck!

I just tried it a few different ways and nothing seemed to work. ive tried it your way and this way and both of them seem to give me the same error that says' not a directory'

more specifically if i try it your way and boot from the arch live cd and mount the drive that im storing the image on (drive sdb1 aka /media/media) (replacing dd if=/ of=/mnt/exhdd/system.img with dd if=/dev/sda4 of=/dev/sdb1/arch-root.img) the error i get is:   dd: opening '/dev/sdb1/arch-root.img' : not a directory

the other way the error just comes from bash and says not a diretory, but if i point it to a directory instead of the image (ex. /dev/sdb1/) it says 'is a directory'

also in the link to the guide that i posted it says something about zeroing the free space on the partition and them deleting the file to make the image smaller since theres nothing there but i didnt really understand the method to do it and didnt want to accidentally overwrite my root partition with all zeros.

You have to mount the destination and point of to the mount point plus the image name. So, /mnt/disk/image.img for example.

Offline

#14 2009-01-13 01:30:07

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Resizing A JFS Partition

maybe one of us is misunderstanding something because I have the destination mounted. these are the exact steps that ive been taking:

1. boot into arch live cd and login as root
2. mkdir /media/media; mount /dev/sdb1 /media/media
3. dd if=/dev/sda4 of=/media/media/arch-root.img

dd: opening '/media/media/arch-root.img' : not a directory

Offline

Board footer

Powered by FluxBB