1830899 Members
2513 Online
110017 Solutions
New Discussion

File System creation !

 
Ivan Azuara
Regular Advisor

File System creation !

OK !!

My problem is, that i need a file system with 1 Gbyte size, but i don't have one volume group with this free space. However,I have 2 differents volume groups with 500 mbytes each one.

For that, I wanted to know , how can i use this free space for make my file system.


Best Regards !
"Enjoy the life .."
12 REPLIES 12
Arockia Jegan
Trusted Contributor

Re: File System creation !

Create a file system or extend the file system by using the 500mbytes in the second volume group. Create a directory(say x) under that file system. Create another file system in the first volume group by using the 500mb space. Create a softlink under that file system pointing to the directory(x).

linuxfan
Honored Contributor

Re: File System creation !

Hi Ivan

If there are going to be subdirectores in your filesystem, then you can create another filesystem for one of the subdirectories in the 2nd free VG
or you can create soft links as already suggested.

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Jeff Schussele
Honored Contributor

Re: File System creation !

Hi Ivan,

It should be pointed out that in the first scenario you cannot have *all* the space for a single file or even a single directory.
AND it's important that FS containing the (dir1) containing the mount point for the other (dir2) MUST be mounted first.

Order of mount in this scenario:
1) /dev/vgxx1/lvolxx1 /dir1
2) /dev/vgxx2/lvilxx2 /dir2

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ivan Azuara
Regular Advisor

Re: 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 .."
PIYUSH D. PATEL
Honored Contributor

Re: File System creation !

Hi,

No it is not like that. If you are not storing the files in the /dir2 directory then its of no use.

If the files are getting stored in the /dir1 directory only then ou can store only upto 500MB.

If you application is like that and it stores some files in the /dir2 directory also then only this setup will work.

I suggest you buy an additional disk.

Piyush
James R. Ferguson
Acclaimed Contributor

Re: File System creation !

Hi Ivan:

You have posted essentially the same question (with variations depending on replies) three times. You should/can continue to refine your principal question within the same post. This will give continuity to the discussion. I think you will find more coherent answers, too!

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: File System creation !

Hi Ivan,

You cannot do anything. If you want a filesystem to have 1GB you need a disk / vg with 1GB of free disk space.

If you can split these into two directories then go ahead and create a lv each on the two availble vg's and then mount them at the respective directories.

Hope this helps.

regds

Re: File System creation !

Ivan,

do you have Online JFS?

You can check by running 'swlist'

If you have this product installed, its possible (maybe) you can 'steal back' some space from existing filesystems which aren't full by reducing them on-line, then reducing the logical volumes and freeing up some extents in one of your volume groups.

If you have Online JFS, let us know!

Cheers

Duncan

I am an HPE Employee
Accept or Kudo
Martin Johnson
Honored Contributor

Re: File System creation !

I am going to assume that you need a single file system 1 GB in size. The other solutions assume that you can get away with 2 500 MB file systems.

I am futher going to assume that you have 2 volume groups, which I am going to call vg1 and vg2. Each volume group has one or more Physical Volumes. vg1 has 500 MB free on one (more more) of its PVs. The same with vg2.

What you need is a volume group with 1 GB free on one (or more) of its PVs.

What I would suggest is to use ignite to combine the 2 volume groups into one large volume group consisting of all the PVs of the 2 groups. That will combine the free space into 1 volume group and allow you to create the 1 GB file system.


HTH
Marty
Tim D Fulford
Honored Contributor

Re: File System creation !

I would like to put in one caveat to the above "merging two vg's". provided both volume groups are NOT vg00. It would be a bad idea to merge vg01 & vg00 into vg00.

The only last suggestion is this...

is there another lvol that is 500MB in either of the vg's. if so move it to the free 500MB & then delete the old one, this will leave 1000MB in one VG.

e.g

/dev/vg01/myfs is /myfs - 500MB

vg01 & vg02 have 500MB free each

# lvcreate -L 500 -n newmyfs vg02
# umount /myfs
# dd if=/dev/vg01/rmyfs bs=64k of=/dev/vg02/rnewmyfs
edit /etc/fstab so /dev/vg02/newmyfs mounts on /myfs; mount /myfs
# lvremove /dev/vg01/myfs
# lvcreate -L 1000 -n bigfs vg01
# newfs [-F vxfs] /dev/vg01/rbigfs
# mount /dev/vg01/bigfs /bigfs (or whatever)

You could use the above to migrate stuff into or out of vg00.

Tim

-
Tim D Fulford
Honored Contributor

Re: File System creation !

Oops, I just thopught, do not migrate any standard vg00 eg /, /stand, , /usr, /tmp, /var, /opt. You could however do /home (/dev/vg00/lvol5 i think)

Tim
-
Trond Haugen
Honored Contributor

Re: File System creation !

One physical disk can only belong to/be used in one volume group. As suggested there are ways to tweak this but in my view this will in the long run only create problems. My suggestion is to buy more disk.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn