1752864 Members
4034 Online
108791 Solutions
New Discussion юеВ

Re: Managing FileSystems

 
panchpan
Regular Advisor

Managing FileSystems

I have got 2 FileSystems visible when I use df -k command /u00 and /u01 of 5 GB and 10 GB respectively. Can you please let me know exact commands to execute for below:

1) Delete /u00
2) Modify /u01 from 10 GB size to 5 GB size
3) Create /u02 (new fs) of size 10 GB

Thank you!
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Managing FileSystems

How can anyone let you know the exact commands when you don't supply the exact data?

You don't bother to indicate if you are running whole disks, LVM, or VxVM. You don't bother to indicate if you have OnlineJFS and yet you want exact steps.

If it ain't broke, I can fix that.
panchpan
Regular Advisor

Re: Managing FileSystems

I am sorry for providing incomplete info. I am not using any volume manager or veritas. They are the generic basis filesytems.

/dev/dsk/c0d0s3
whiteknight
Honored Contributor

Re: Managing FileSystems

panchalp,

Do you have online JFS ?

1) Delete /u00
-> umount /u00
-> lvremove /dev/vgxx/lvolxx => refer to /u00

2) Modify /u01 from 10 GB size to 5 GB size
-> backup /u01 data
-> umount /01
-> lvreduce -L 5000 /dev/vgxx/lvolxx

3) Create /u02 (new fs) of size 10 GB
-> lvcreate -L 10000 /dev/vgxx/lvolxx
-> newfs /dev/vgxx/rlvolxx
-> mount /dev/vgxx/lvolxx /u02

WK
Problem never ends, you must know how to fix it
Ivan Krastev
Honored Contributor

Re: Managing FileSystems

WK is right, only after lvreduce at point 2 add :
#mount /dev/vgXX/lvolXX /u01

regards,
ivan
Srimalik
Valued Contributor

Re: Managing FileSystems

WK,
LVM is not being used by , will lvreduce/lvextend commands work on a such disks?

sri
abandon all hope, ye who enter here..
Philip Gunter
Respected Contributor

Re: Managing FileSystems

Hi Panchalp,

given that you want a 5GB and a 10GB partition why not just reuse the ones you've got by unmounting the exiting filesystems and remounting them on the new mount points?

/u00 --> /u01
/u01 --> /u02

Don't forget to update the fstab.

Cheers,
Philip.
Bill Hassell
Honored Contributor

Re: Managing FileSystems

You wrote:

> I am sorry for providing incomplete info. I am not using any volume manager or veritas. They are the generic basis filesytems.
>
> /dev/dsk/c0d0s3

Since real disks don't come in 5GB and 10 GB sizes, I suspect you are using LVM. This can be verified by using the command:

bdf /u00 /u01 /u02

On the right will be the filesystem mountpoints and on the left will be the source disk. If you are using 'generic' disks then the source will start with /dev/dsk...

But if the left side shows something like /dev/vg01/.... then you are using logical volume manager (LVM). To be completely safe, backup any volume where you are making changes. Reducing a filesystem is almost always destructive.

Now the rest of the commands connot be accurately given because there is not enough information. Start by posting the following commands:

model
uname -r
bdf /u00 /u01 /u02


Bill Hassell, sysadmin