Operating System - HP-UX
1833780 Members
2341 Online
110063 Solutions
New Discussion

vxfs fsadm: write failure

 
SOLVED
Go to solution
Gino Castoldi_2
Honored Contributor

vxfs fsadm: write failure

Hi,

Server: HPUX 11.0 OnlineJFS 3.3 Version 4

I am trying to increase the size of one file system after I reduced the size of another file system that are on the same volume group
(vg01). When I tried to increase disk space it failed with this error.

# fsadm -F vxfs -b 4096000 /u01
vxfs fsadm: /dev/vg01/rlvu01 is currently 3145728 sectors - size will be increased
vxfs fsadm: write failure at block 8290302 : No such device or address

10 points to any good answer.
TIA, Gino
21 REPLIES 21
Sridhar Bhaskarla
Honored Contributor
Solution

Re: vxfs fsadm: write failure

HI Gino,

YOu didn't run 'lvextend' prior to using fsadm. If you didn't then you are not specifying the exact size in fsadm that you used with your lvextend. It is convenient to use 'm' suffix to the size so that there won't be any confusion.

lvextend -L 4096 /dev/vgxx/lvolx
fsadm -b 4096m /u01

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: vxfs fsadm: write failure

Did you do an lvextend BEFORE doing the fsadm -b? Also, fsadm -b will fail if the filesystem is full (or very nearly so).
If it ain't broke, I can fix that.
James A. Donovan
Honored Contributor

Re: vxfs fsadm: write failure

Generally, this error means you are trying to extend the file system to a size larger than the underlying logical volume.

Did you run the lvextend command first on the logical volume on which the /u01 file system is placed?

First,
lvextend -L 4000 /dev/vgXX/lvolY

then,

fsadm -F vxfs -b $((4000*1024)) /u01

If you use the $(( )) syntax, then you let the shell do the math for you.
Remember, wherever you go, there you are...
RAC_1
Honored Contributor

Re: vxfs fsadm: write failure

First thing. Do you have Online JFS installed? If yes the procedure to reduce the lvol is as follows.

I strongly recommand taking full backup prior to this.

For the lvol where you reduced the size.

fsadm -F vxfs -b "new_size_in_MB" /mount_point

lvreduce -L "size_in_MB" /dev/vgxx/lvolxx

Then check vgdisplay and see if free PE have increased or not?

If the free space is there then you do lvextend and then fsadm.

Anil
There is no substitute to HARDWORK
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

Here's what I ran in sequential order:

lvextend -L 1024 /dev/vg01/lvu01
(this was too small an allocation).
lvextend -L 4096 /dev/vg01/lvu01
vgdisplay /dev/vg01
fsadm -F vxfs -b 4096000 /u01

10 points to any good answer.
TIA, Gino
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

I did successfully reduce the size of a different file system before I tried to increase the size of the file system. There were no errors and a 'bdf' shows the reduced size now.

10 points to any good answer.
TIA, Gino
Helen French
Honored Contributor

Re: vxfs fsadm: write failure

After lvreducing the 'other' file system, did you check and make sure that the VG has enough free space? Is that file system is okay and working fine now? Check your VG information from vgdisplay command and then find out if you have enough PE available to increase this LV.

Also, try lvextend first and then fsadm. I would recommend doing backups of both file system prior doing all these.
Life is a promise, fulfill it!
Sridhar Bhaskarla
Honored Contributor

Re: vxfs fsadm: write failure

Hi Gino,

Find if the lvol is actually at 4096MB size by doing 'lvdisplay /dev/vgxx/lvolx'. If so, you should be able to extend.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James A. Donovan
Honored Contributor

Re: vxfs fsadm: write failure

Just a note, IF the command had worked, you would have shorted yourself of space on your file system. The correct value for your fsadm command is 4194304 (4096*1024=4194304)

lvextend -L 4096 /dev/vg01/lvu01
fsadm -F vxfs -b $((4096*1024)) /u01
Remember, wherever you go, there you are...
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,


lvdisplay /dev/vg01/lvu01
--- Logical volumes ---
LV Name /dev/vg01/lvu01
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 3072
Current LE 768
Allocated PE 768
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

10 points to any good answer.
TIA, Gino
Sridhar Bhaskarla
Honored Contributor

Re: vxfs fsadm: write failure

Hi Gino,

There you go

LV Size (Mbytes) 3072


Your previous 'lvextend' was not successful or you didn't run. Once the LV is extended, then only you can extend the filesystem on it.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

I ran it this time and it seems to be successful.

bosov2 / # # fsadm -F vxfs -b 4194304 /u01
bosov2 / #

I didn't see any errors but a 'bdf' shows the same size as before. Should I run the
'fsadm' command again?

/dev/vg01/lvu01 3145728 1898601 1170525 62% /u01

10 points to any good answer.
TIA, Gino




A. Clay Stephenson
Acclaimed Contributor

Re: vxfs fsadm: write failure

The correct sequence for this assumming that you want to "shrink" filesystem "A" and extend filesystem "B" using the freed space is:

1) fsadm -b filesystemA using a smaller value
2) lvreduce filesystemA's LVOL
3) lvextend filesystemB's LVOL
4) fsadm -b filesystemB using a larger value

Anything else is simply wrong.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: vxfs fsadm: write failure

Hi Gino,

You should have seen a message '...size will be increased'.

It doesn't hurt to run fsadm again. Worst the case it is going to error out.

-Sri

PS: You don't need to say '10 points to any good answer'. People here will respond whether you assign points or not.
You may be disappointed if you fail, but you are doomed if you don't try
pap
Respected Contributor

Re: vxfs fsadm: write failure

Hi Gino.

I think we are confused here.
Please let us know following.

1. what was the original size of /u01?
2. What will be the final size for this LV?
3. What is the situation now.
4. What commands u ran to accomplish that.?

Thanks,

-Piyush.
"Winners don't do different things , they do things differently"
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

I ran 'lvextend' again and it failed most likely because there's not enough allocatable space available.

bosov2 / # lvextend -L 4096 /dev/vg01/lvu01
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg01/lvu01" could not be extended.
Failure possibly caused by strict allocation policy



10 points to any good answer.
TIA, Gino
pap
Respected Contributor

Re: vxfs fsadm: write failure

So what's the problem now?

If no space is available in vg, then allocate and try to extend the LV.

Thanks
-pap
"Winners don't do different things , they do things differently"
Sridhar Bhaskarla
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

I believe we are going in rounds and rounds.

1. Your lvextend later was successful.

lvextend -L 4096 /dev/vg01/lvu01

Confirm it first with 'lvdisplay /dev/vg01/lvu01' again.

2. Run fsadm

fsadm -F vxfs -b 4194304 /u01

or

fsadm -F vxfs -b 4096m /u01

You should see a message "... will be increased" there.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

I used a smaller amount of disk space and I ran those two commands successfully.
I guess the rule here is to check how much
space is available regardless of what has been reduced/extended on a volume group.

lvextend -L 3500 /dev/vg01/lvu01
Logical volume "/dev/vg01/lvu01" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

fsadm -F vxfs -b $((3500*1024)) /u01
vxfs fsadm: /dev/vg01/rlvu01 is currently 3145728 sectors - size will be increased
bosov2 / # bdf /u01
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lvu01 3584000 1898714 1581299 55% /u01

10 points to any good answer.
TIA, Gino
Mark Grant
Honored Contributor

Re: vxfs fsadm: write failure

Just in case it helps, you can run fsadm with
-b 4096M for 4096 MB. This makes it a bit easier if you use the -L option to lvextend because the numbers are the same.

If you don't use the "M" bit in your blocksize, remeber that doing the calculation for number of blocks depends on the block size the filesystem was created with which you can determine with "mkfs" with the "-n" option.

Never preceed any demonstration with anything more predictive than "watch this"
Gino Castoldi_2
Honored Contributor

Re: vxfs fsadm: write failure

Hi,

I apologize for the confusion. Hopefully I have it right now.


Thank you for all your help!
10 points to any good answer.
TIA, Gino