About extendfs

 
SOLVED
Go to solution
SeaMark_1
Frequent Advisor

About extendfs

I want to extend one HFS filesystem.

root@xkbqd06# bdf
Filesystem kbytes used avail %used Mounted on
.....
/dev/vg00/bwdbackup
20036719 5532812 12500235 31% /bwdbackup

then,
umount /bwdbackup
lvextend -L 26000 /dev/vg00/bwdbackup
extendfs -F hfs /dev/vg00/rbwdbackup
mount /dev/vg00/bwdbackup /bwdbackup

In the end, execute bdf
the situation continues...
root@xkbqd06# bdf
Filesystem kbytes used avail %used Mounted on
.......
/dev/vg00/bwdbackup
20036719 5532812 12500235 31% /bwdbackup


each command executed successfully, so, I don't understand why "extendfs" do NOT take into effect.

All the best.
He must cherish the hope that one day he will be amply rewarded.
12 REPLIES 12
Nguyen Anh Tien
Honored Contributor

Re: About extendfs

Your commands are correct but if you did not use "-s" option in extendfs, this command extend maximum as possible.
You sould do as:
umount /bwdbackup
lvextend -L 26000 /dev/vg00/bwdbackup
extendfs -F hfs -s 26000 /dev/vg00/rbwdbackup
mount /dev/vg00/bwdbackup /bwdbackup


Or you can still use fsadm to extend:
lvextend -L 26000 /dev/vg00/bwdbackup
fsadm -F vxfs -b 26000 /bwdbackup
HP is simple
SeaMark_1
Frequent Advisor

Re: About extendfs

hi, thanks a lot. :)
I do as you described but this problem still exists.

Look at the whole process:
----------------------------

df -k /bwdbackup/
/bwdbackup (/dev/vg00/test ) : 100473 total allocated Kb
100464 free allocated Kb
9 used allocated Kb
0 % allocation used

umount /bwdbackup
lvdisplay /dev/vg00/test
--- Logical volumes ---
LV Name /dev/vg00/test
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 112
.....

lvextend -L 150 /dev/vg00/test
Warning: rounding up logical volume size to extent boundary at size "160" MB.
Logical volume "/dev/vg00/test" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

extendfs -F hfs -s 160 /dev/vg00/rtest

lvdisplay /dev/vg00/test
--- Logical volumes ---
LV Name /dev/vg00/test
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 160
.....

mount /dev/vg00/test /bwdbackup

df -k /bwdbackup/
/bwdbackup (/dev/vg00/test ) : 100473 total allocated Kb
100464 free allocated Kb
9 used allocated Kb
0 % allocation used
-----------------------------

I guess the filesytem type,hfs,is the real reason which extendfs can't work properly, since I do this on Vxfs is no problem.

I need a patch indeed?

All the best.
He must cherish the hope that one day he will be amply rewarded.
Nguyen Anh Tien
Honored Contributor

Re: About extendfs

1.have you try to use fsadm?
2. Check installed patches on your system and commpare with required patches (online JFS patches.).
HP is simple
bhavin asokan
Honored Contributor

Re: About extendfs

hi,

a doubt.you are sure that you tried
extendfs -F hfs /dev/vg00/rbwdbackup

if you have tried (with out raw device)
extendfs -F hfs /dev/vg00/bwdbackup

this problem can occure.

regds,
Saurav_1
Valued Contributor

Re: About extendfs

The Final output of BDF shows that the filesystem has not got extended.

remember this can be done even if /bwdbackup is mounted. Check the FREE PE in VG.
lvextend -L 26000 /dev/vg00/bwdbackup.

To extend the filesystem you have to unmount the filesystem.

cheers.
Saurav
Robert-Jan Goossens_1
Honored Contributor

Re: About extendfs

Hi,

could you post

fstyp -v /dev/vg00/bwdbackup

Regards,
Robert-Jan
SeaMark_1
Frequent Advisor

Re: About extendfs

hi,thanks your reply.

To find out the real reason, I do this again:
as followings, that situation continue....
========================================
root@xkbqd06# vgdisplay
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 24
Open LV 24
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 4384
VGDA 6
PE Size (Mbytes) 16
Total PE 13066
Alloc PE 12730
Free PE 336
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

root@xkbqd06# lvcreate -L 50 -n test vg00
Warning: rounding up logical volume size to extent boundary at size "64" MB.
Logical volume "/dev/vg00/test" has been successfully created with
character device "/dev/vg00/rtest".
Logical volume "/dev/vg00/test" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root@xkbqd06# newfs -F hfs /dev/vg00/rtest
mkfs (hfs): Warning - 68 sector(s) in the last cylinder are not allocated.
mkfs (hfs): /dev/vg00/rtest - 65536 sectors in 426 cylinders of 7 tracks, 22 sectors
67.1Mb in 27 cyl groups (16 c/g, 2.52Mb/g, 384 i/g)
Super block backups (for fsck -b) at:
16, 2504, 4992, 7480, 9968, 12456, 14944, 17432, 19728, 22216,
24704, 27192, 29680, 32168, 34656, 37144, 39440, 41928, 44416, 46904,
49392, 51880, 54368, 56856, 59152, 61640, 64128
root@xkbqd06# mkdir /test
root@xkbqd06# mount /dev/vg00/test /test/
root@xkbqd06# df -k /test/
/test (/dev/vg00/test ) : 57388 total allocated Kb
57379 free allocated Kb
9 used allocated Kb
0 % allocation used
root@xkbqd06# umount /test/
root@xkbqd06# lvextend -L 100 /dev/vg00/test
Warning: rounding up logical volume size to extent boundary at size "112" MB.
Logical volume "/dev/vg00/test" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root@xkbqd06# extendfs -F hfs -s 112 /dev/vg00/rtest
root@xkbqd06# mount /dev/vg00/test /test/
root@xkbqd06# df -k /test/
/test (/dev/vg00/test ) : 57388 total allocated Kb
57379 free allocated Kb
9 used allocated Kb
0 % allocation used
root@xkbqd06# fstyp -v /dev/vg00/rtest
hfs
f_bsize: 8192
f_frsize: 1024
f_blocks: 63765
f_bfree: 63756
f_bavail: 57379
f_files: 10368
f_ffree: 10364
f_favail: 10364
f_fsid: 1073741849
f_basetype: hfs
f_namemax: 255
f_magic: 95014
f_featurebits: 1
f_flag: 0
f_fsindex: 0
f_size: 65536
==========================

:(
He must cherish the hope that one day he will be amply rewarded.
Robert-Jan Goossens_1
Honored Contributor

Re: About extendfs

Hi SeaMark,

Strange :-(

Could you take a closer look at the extendfs command.

# whereis extendfs
# ll /sbin/extendfs
# ll /usr/sbin/extendfs
# file /sbin/extendfs
# file /usr/sbin/extendfs

Regards,
Robert-Jan
SeaMark_1
Frequent Advisor

Re: About extendfs

Reminding of I do these above on Vxfs is no problem !!

as you tell me, I do this:

root@xkbqd06# whereis extendfs
extendfs: /usr/sbin/extendfs /sbin/extendfs /usr/share/man/man1m.Z/extendfs.1m

root@xkbqd06# ll /usr/sbin/extendfs /sbin/extendfs
lrwxr-xr-x 1 root sys 16 Dec 5 21:31 /sbin/extendfs -> /sbin/fs_wrapper
lrwxr-xr-x 1 root bin 16 Dec 5 21:38 /usr/sbin/extendfs -> /sbin/fs_wrapper

root@xkbqd06# file /usr/sbin/extendfs
/usr/sbin/extendfs: ELF-32 executable object file - IA64
======================

It seems that it implys some other things.

:(
He must cherish the hope that one day he will be amply rewarded.