Operating System - HP-UX
1834827 Members
2666 Online
110070 Solutions
New Discussion

Re: extendfs - use of rlvol or lvol

 
Mark Penfold
Occasional Contributor

extendfs - use of rlvol or lvol

Hi
I've just extended one of our filesystems as follows.

Shutdown to single user mode
/sbin/lvextend -L 700 /dev/vg00
/sbin/extendfs -F vxfs /dev/vg00/lvol6
init 3

What I had intended to type for the extendfs was /sbin/extendfs -F vxfs /dev/vg00/rlvol6

The command as type worked. The system booted and the extra space is present and usable in the mounted filesystem.
Can someone explain what the significance of the r in the extendfs command is and have I created any problems for myself that may come to light later.
Thanks
Mark
8 REPLIES 8
Bart Paulusse
Respected Contributor

Re: extendfs - use of rlvol or lvol

Hi Mark,

I've made the same mistake a few times some years ago but I've never run into trouble.

regards,

Bart
Bharat Katkar
Honored Contributor

Re: extendfs - use of rlvol or lvol

Raw device is a character device and is represented by r followed by the name and block device is the actual name you give.
When we execute the extendfs command it devides the raw devices into number of blocks with specific size e.g. 4k 8k etc. that are addressable and then it come under control of Meta Data Structure of the FileSystem.
Since you say you see the space extended it might have done the job anyway. But if you are still suspiciuos about the result better way is to cp /mountdir to /xyz. Umount the Filesystem and again repeat the procedure.
If you have that much space free then it's a matter of 1/2 an hour maximum. Restore back the /xyz to /mountdir.




You need to know a lot to actually know how little you know
Geoff Wild
Honored Contributor

Re: extendfs - use of rlvol or lvol

Hmnnn....interesting - seems you can use rlvol or lvol with extendfs:

bdf /tempspace
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvtempspace
1024000 1357 958735 0% /tempspace


umount /tempspace
lvextend -L 1032 /dev/vg00/lvtempspace
extendfs -F vxfs /dev/vg00/lvtempspace
mount /tempspace

bdf /tempspace
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvtempspace
1056768 1366 989447 0% /tempspace

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
JW_8
Occasional Advisor

Re: extendfs - use of rlvol or lvol

For operation like mkfs or extendfs, you should use raw device interface. If you look at the "man extendfs," the example used there is raw device file. The implementation of extendfs may have be forgiving when user specified cooked device file, internally, it must use raw device interface to make sure changes get written to disk immediately.
Steven E. Protter
Exalted Contributor

Re: extendfs - use of rlvol or lvol

My servers reject attempts to use lvol and require lvol

11i fully, heavily patched.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mark Penfold
Occasional Contributor

Re: extendfs - use of rlvol or lvol

Thanks all for the replies. I was aware that I should have been using rlvol in the extendfs not lvol but it was a typo.
When I tried the correct syntax after the first extendfs it failed as the was no space left on the logical volume (my understanding was that it had used it when I used the incorrect extendfs command) This was borne out by the bdf and the fact that the extra filestore was usable.
It seems as though other people (judging from the replies) have either made the same mistake or tried the extendfs and it's worked for them.
Unfortunately our unix admin retired and hasn't been replaced, so myself and a colleague (both DBA's) are trying to learn on the hoof. SO my understanding of the underlying architecture is sketchy. Can someone explain this raw device business please.
Many Thanks
Mark
Geoff Wild
Honored Contributor

Re: extendfs - use of rlvol or lvol

Here's a good doc on disks in general:

http://docs.hp.com/hpux/onlinedocs/5187-2216/5187-2216.html

Go to section "Managing Disks and Files "

Main points about raw devices:

Any i/o to raw devices wont go through the system's internal buffer cache, whereas character devices will use it.

Management of them is harder.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
iminus
Frequent Advisor

Re: extendfs - use of rlvol or lvol

The one starts with r means raw device file while the other one is the character file
hope it helps