Operating System - HP-UX
1834406 Members
2027 Online
110067 Solutions
New Discussion

Re: Understanding where data really sits on a volume/filesystem

 
SOLVED
Go to solution
Derek Brown
Frequent Advisor

Understanding where data really sits on a volume/filesystem

This is proably a really daft question but I'm trying understand where data really resides on disks. i.e is it on the raw volume or is it on the filesystem.

This question has come about because I've just been asked to restore some data from tape that was a backup of raw partitions ( a full volume group) rather than filesystems. Fair enough. I've also been asked to restore the data to raw partions on a different server. Fair enough.

But ..... I thought that when you mounted a filesystem on top of the volume it would 'hide' whatever was sitting on the raw partion and only show you what was in the filesystem.

I guess my understanding is totally wrong so if anyone could clarify I'd be most appreciative.
Thanks
6 REPLIES 6
Chan 007
Honored Contributor

Re: Understanding where data really sits on a volume/filesystem

Hi Derek,

Both are one and same, but the method to access the data differs.

If you remember when you create a LV for any vg you will do lvcreate -L -n lv_brown /dev/vg01, you will end up with one more file called rlv_brown.

lv_brown will be used to refer you fs mounting while rlv_brown will be used by raw for its reference.

Both has its own pros and cons, viz, RAW will be fast when used by a Database where if you need to backup/restore a single file mounted FS will be better.

Hope this helps

Chan
Kent Ostby
Honored Contributor

Re: Understanding where data really sits on a volume/filesystem

You aren't using filesystems at all in your examples.

Essentially you have the raw area (i.e. the lvol).

When you use filesystems you overwrite the raw data completely with a generic filesystem structure which allows itself to be modified through various commands.

In your case, you never do this second step (i.e. mkfs or newfs) either on the originally created data or on the new machine where you are copying the data.

You just have bits and bytes (which certain programs such as Oracle know how to talk to and can talk to faster than if they were overlaid on a file system structure).

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Chan 007
Honored Contributor

Re: Understanding where data really sits on a volume/filesystem

Hi,

I have just put one more link which state few major points with great ITRC experts comments.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=198966

Chan
Ninad_1
Honored Contributor
Solution

Re: Understanding where data really sits on a volume/filesystem

Derek,

If I understand your question correctly - what you are saying is that you have few filesystems in a volume group and while taking backup, instead of backing up at filesystem level - the backup was done of raw volumes. Now you want to restore the backup - which again will be to raw volumes (But once the backup is complete - you will be able to mount the filesystem).
Now to clarify your doubts.
The data resides on disk - not a joke - but how the data is written to disk depends on the application which is writing data.
e.g. if you are using raw volumes as datafiles in your database - then oracle will control how thw data is written to disk - which potion of disk will hold what data - including some metadata it may be writing.
If it is say a filesystem - then the volume manager or the software managing your filesystems - vxfs etc will manage how to write the data to disk - so when you save a file , it will check which block on disk to assign to the file, write the data, update the superblock which holds the metadata.

So when you say filesystem hides whatever is sitting beneath - in a way yes because the filesystem/volume manager software is actually hadling that for you.

But mind you - whenever you are restoring raw backups of filesystems make sure the filesystem version is there on the target system - like check version of JFS - inturn vxfs of source system and targer systems.

Please let know if this calrifies your doubt.

Regards,
Ninad
Don Wilt
Advisor

Re: Understanding where data really sits on a volume/filesystem

I always like to think that I am copying the lvol not the filesystem. If you have /dev/vg05/lvderek mounted as /derek you can unmount and mount /dev/vg05/lvderek as /brown and all data will be visible, ie the /brown mount point will access the inodes,data files on the lvol.
Derek Brown
Frequent Advisor

Re: Understanding where data really sits on a volume/filesystem

Excellent Thanks to all who replied. This has totally clarified my understanding and especially Ninad Date is a superstar !!! :-)