1829749 Members
1628 Online
109992 Solutions
New Discussion

File System creation !

 
Ivan Azuara
Regular Advisor

File System creation !

In resume :

Arockia and Ramesh suggest me to create 2 differents file systems in each volume group, and create 2 differents directories under each file system for create the link.

Question : Then I'll have 2 differents file systems with differents names and 2 differents directories with differents names too, correct ?. The scenario will be:

/dev/vg01/fs_test1 ------> file system 1
/dev/vg02/fs_test2 ------> file system 2

# cd /fs_test1
# mkdir dir1 -----> directory 1
# cd /fs_test2
# mkdir dir2 -----> directory 2

Create the link :

# ln -s /dev/vg01/fs_test1/dir1 /dev/vg02/fs_test2/dir2

Question: When I use the file system , i must use the name for the first file system and when this first file system go growing , automatically will use the space in the second file system ?


P.D. Jeff mentioned something similar.


Best Regards !
"Enjoy the life .."
4 REPLIES 4
Rodney Hills
Honored Contributor

Re: File System creation !

Different volume groups can not be part of the same file system.

Recommend you merge the two volume groups into one or buy more hard disks.

-- Rod Hills
There be dragons...
Arockia Jegan
Trusted Contributor

Re: File System creation !

The file system won't grow. Actually the file system size is 500mb. The dir1(it's just a pointer to the dir in the other file system of the other VG) can go upto 500mb. After 500mb you can't write anything to the dir1. But you can write on the fs_test1 file system as you have 500mb space in fs_test1 file system.
Jeff Schussele
Honored Contributor

Re: File System creation !

Hi (again) Ivan,

No, that's the limitation in this scenario.
Let's say you use the space in VG1 to create the FS that mounts to -> /dir1.
Then you use the space in VG2 to create an FS that mounts to /dir2
THEN you create a dir UNDER /dir1 called dir2-mnt & soft link /dir2 to it...so the path would be /dir1/dir2-mnt
You could only create a file in /dir1 as large as the total space in /dir1 - NOT COUNTING the space of /dir1/dir2-mnt. AND you could only create a file in /dir2 FS (/dir1/dir2-mnt) as large as the total /dir2 FS.
They cannot cross the FS boundaries.

Your only option, other than a new disk, would be to backup the existing VGs & recreate 3 VGs out of the space that the two occupy at this time & restore the data back.

I'd suggest you purchase another disk - would be *much* easier.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
linuxfan
Honored Contributor

Re: File System creation !

Hi Ivan,

First of all as James had mentioned you do not need to submit a new question, you can continue on the same thread and post any modifications you may have to your original question.

Now re: your question. it would help if you could give a little more details.

Lets say the VGs in question is vg01 and vg02 (with each having 500 MB free space).

1. Check if you have another LV of size 512 MB on vg01. If you do you can copy and the data to vg02(after creating a new FS there) which would free up 1GB on vg01 and you can create your FS.

2. If scenario 1 is not possible, then the other options are:

a. create a 512 MB FS on vg01
/dev/vg01/lvol? /fs1
create a 512 MB FS on vg02
/dev/vg02/lvol? /fs2/dir2
Now that you have created the File systems.

you can
1. ln -s /fs2/dir2 /fs1/dir2
or
2. mount /dev/vg02/lvol? /fs1/dir2

now you have 512 MB in /fs1 and 512 MB in /fs1/dir2

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates