Operating System - HP-UX
1844014 Members
2831 Online
110226 Solutions
New Discussion

need to create a filesystem

 
Denise_22
Advisor

need to create a filesystem

I want to create a 100MB filesystem (lets call it dump), and increase the filesystem to 200MB using OnlineJFS. I can use the /dev/vg02 volume group.

I appreciate if you give me the procedures you use to do this. Seems like my OnlineJFS is not working correctly.

Thanks.
carpe diem
19 REPLIES 19
Sundar_7
Honored Contributor

Re: need to create a filesystem

1) Make sure you have enough space in /dev/vg02

# vgdisplay -v /dev/vg02 | egrep "^Free PE|PE Size"

Multiply Free PE and PE size, the result should be >= 200MB.

2) Create the LV

# lvcreate -L 100 -n dump /dev/vg01

3) Create the file system

# newfs -F vxfs /dev/vg01/rdump

4) Mount it

# mount -F vxfs /dev/vg01/dump /mnt

5) extend the lv to 200 MB.

# lvextend -L 200 /dev/vg01/dump

6) increase the FS

# fsadm -F vxfs -b 200m /mnt

7) done.
Learn What to do ,How to do and more importantly When to do ?
Michael Tully
Honored Contributor

Re: need to create a filesystem

I'm not near a system right now but the creation part is okay.

# lvcreate -n dump /dev/vg02
# lvextend -L 100 /dev/vg02/dump
# newfs -F vxfs /dev/vg02/rdump
# mkdir /dump
# mount /dev/vg02/dump /dump

This should be okay, someone can fix the size.
# fsadm -F vxfs -b /dump
Anyone for a Mutiny ?
Oved
Advisor

Re: need to create a filesystem

creating FS:

1. lvcreate -L 100 vg02

Then you get the block and raw device as the output of the command, lets assume it is /dev/vg02/lvolX.

2. newfs -F vxfs /dev/vg02/rlvolX

3. if it is a temporary FS then just mount it in /mnt: mount /dev/vg02/lvolX /mnt.
If it is perminent add a record to the /etc/fstab file.

4. Extend the logical volume:
lvextend -L 200 /dev/vg02/lvolX.

5. Extend the FS using online JFS:
fsadm -F vxfs -b 204800 /mnt (or the other moint point).
* (For the future - If the FS is in 100% for some reason then the fsadm command fails. You have to clean some space and run it again).

6. If you have a provblem with the online JFS you can umount, use extendfs -F vxfs /dev/vg02/rlvolX, and re-mount.

Good Luck !
Jeff Schussele
Honored Contributor

Re: need to create a filesystem

Hi Denise,

If you're using the proper procedures & it still won't extend the FS on the fly, then check to make sure the the vxadv driver is in the kernel. using SAM is the easiest way.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Michael Tully
Honored Contributor

Re: need to create a filesystem

If you think that the online jfs is not working correctly, what error messages are you getting?
Anyone for a Mutiny ?
Dave Hutton
Honored Contributor

Re: need to create a filesystem

Just to add one note incase you decide you want to extend it more then 200MB.

fsadm -F vxfs -b 1024*Size_MB's /mountpoint

-F vxfs creates the file system as a vxfs filesystem type.
-b is block size so it's 1024*200 (if I were to use your 200MB example)

I noticed someone else used the -b 200m for megabytes. I've learned something new, like usual. And can't find it refered to in the man page.

Figured I would add this incase your scenerio were example numbers.

Denise_22
Advisor

Re: need to create a filesystem

fsadm: cannot shrink /dev/vg02/dump - upgrade fs - inodes currently in use.

This is my error message. I think when I used the fsadm -F vxfs -b 200 /testfs

the -b is not the right option?

Thanks.
carpe diem
Michael Tully
Honored Contributor

Re: need to create a filesystem

I've never tried the megabytes option ...

I always use -b blocks. The fsadm_vxfs man pages more or less spells out the formula.

# fsadm -F vxfs -b 209715 /dump
Anyone for a Mutiny ?
Denise_22
Advisor

Re: need to create a filesystem

Michael,

Where did you get that number, 209715? How do you convert from 200MB to blocks?
carpe diem
Michael Tully
Honored Contributor

Re: need to create a filesystem

I still can't read nor add up.

# fsadm -F vxfs -b 204800 /dump
Anyone for a Mutiny ?
Denise_22
Advisor

Re: need to create a filesystem

Michael,

I set up the initial filesystem as 10MB. Now, I did this

fsadm -F vxfs -b 20480 /dump

I did a vgdisplau -vg02 and it showed that it is a PE of 16. Does that make a difference?

Thanks.
carpe diem
Sundar_7
Honored Contributor

Re: need to create a filesystem

Denise,

fsadm: cannot shrink /dev/vg02/dump - upgrade fs - inodes currently in use.

This is my error message. I think when I used the fsadm -F vxfs -b 200 /testfs

You are getting this error message because the filesystem is obviously more than 200 blocks - suffix "m" to 200 and try again

fsadm -F vxfs -b 200m /testfs
Learn What to do ,How to do and more importantly When to do ?
Denise_22
Advisor

Re: need to create a filesystem

This is the error msg I get when doing the

fsadm -F vxfs -b 20480 /dump

/dev/vg01/rdump is currently xxx sectors - size will be increased
write failure at block 4214782: no such device or address.

carpe diem
Shaikh Imran
Honored Contributor

Re: need to create a filesystem

Hi,

You said you are getting this error
" fsadm -F vxfs -b 20480 /dump
/dev/vg01/rdump is currently xxx sectors - size will be increased
write failure at block 4214782: no such device or address "

I can see in your first post you were trying to extend /dump in vg02 then howcome you are getting error for vg01 or is it typing mistake in your last post ?

Dou you also have /dump in vg01.. ?
Is it giving any error number if yes could you post it..

Regards,





I'll sleep when i am dead.
Denise_22
Advisor

Re: need to create a filesystem

Shaikh,

Its my typo. Its actually at /dev/vg02/... and where I am getting this error.

Too many things going on in my mind.

Anyone have any input on why I am getting this error, when I am using 1024*MB.

Lets say I set up the filesystem with 10MB. I wanted to increase to 20MB, that means I would use

fsadm -F vxfs -b 20480 /dump

By the way, I created another 10MB file system and called it /testfs. I then try to extend it using

fsadm -F vxfs -b 20480 /testfs

and am getting the same error message. I thought fsadm can do it on the fly? By the way, I caught where there are versions 3 and version 4 and these correspond to the type of filesystem, would this make a difference here? How do I find the version of my filesystem?

Thanks.
carpe diem
Denise_22
Advisor

Re: need to create a filesystem

GUYS,

This is what I did:

lvcreate -n test /dev/vg02
lvextend -L 10 /dev/vg02/test
newfs -F vxfs /dev/vg02/rtest
mkdir /test
mount /dev/vg02/test /test
fsadm -F vxfs -b 20480 /test

The error messages I am getting is probably related to the -b 20480 value. As you can see, I made the size of this filesystem 10MB, but a BDF on vg02 shows a PE size of 16MB.

The error msg is:

fsadm: /dev/vg02/rtest is currently 16384 sectors - size will be increased
write failure at block 4214782: no such device or address.

Why am I getting the 'write failure at block 4214782'?

I tried the -b 32768 and got the same error. I am not sure why its showing a write failure at block...? Any help here?
Thanks...
carpe diem
Shaikh Imran
Honored Contributor

Re: need to create a filesystem

Hi,
The answer to your first question i.e.
How to know the version is
fstyp -v /mountpoint

This should tell you the filesystem version.

And for your last post i will like to know the O.S. and bundle patch version as i think
a patch could fix this as whatever you are doing is correct and still you are getting the same error.

I have heard of some patches for fsadm to fix resizing problems but not exactly know the numbers.
I will try to get the numbers if you give the O.S and bundle patch details of yours.

Regards,

I'll sleep when i am dead.
James Ellis_1
Super Advisor

Re: need to create a filesystem

Shaikh,

Ok, my OS is 11.0 and the Bundle we have on the server is Sept 2003. The plan is for March 2004 to be installed this coming weekend.

When I did the fstyp -v, I see the version is a 3, and I believe I saw a version 4 for onlineJFS. I am not sure this would cause the problem I am having, but when I:

fsadm -F vxfs -b 20480 /testfs

I get this error msg:

fsdam: /dev/vg02/rtest is currently 16384 sectors - size will be increased.
write failure at block 4214782: no such device or address.

Not sure what failure at block 4214782 indicates?

Thanks.
"In the middle of difficulty lies opportunity" -Einstein
Todd McDaniel_1
Honored Contributor

Re: need to create a filesystem

If you havent already fixed this...

I would suggest using a smaller size then adding MBs upto the max you want...

if the FS is unmounted i would suggest to use extendfs since it will claim all the space you allocated via lvextend...

You dont need to specify the bytes with extendfs IIRC.(if I remember correctly)

FROM THE MANPAGE:

#man extendfs

SYNOPSIS
/usr/sbin/extendfs [-F FStype] [-q] [-v] [-s size] special

-s size Specifies the number of DEV_BSIZE blocks to be added to
the file system. If size is not specified, the maximum possible size is used.
Unix, the other white meat.