cancel
Showing results for 
Search instead for 
Did you mean: 

Replace a filesystem

SOLVED
Go to solution
MSwift
Regular Advisor

Replace a filesystem

I have system running 11.0 and i have to get rid of a filesystem /app02 mounted on /dev/vg03/lvol2 and this is mirrored. i need to get rid of this filesystem and use that disk to create a new filesystem /usr/ed and mirror it. Could you please give me the exact steps for this operation. no online JFS.

Thanks

MSwift
6 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Replace a filesystem

A simple solution would be to remove all of the files there and then umount and mount it on /usr/ed. Especially since it already is mirrored.
This assumes you don't want to change any of the properties of the filesystem.
Pete Randall
Outstanding Contributor

Re: Replace a filesystem

umount
lvremove
lvcreate
newfs
lvextend -m 1


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Replace a filesystem

Hi:

Similar to Dennis's suggestion, though, I would 'newfs' ('mkfs') the filesystem rather than recursively (and slowly) remove its contents:

# umount /app02
# mkfs -F vxfs -o largefiles /dev/vg03/lvol2
# mount /dev/vg03/lvol2 /usr/ed

Be sure to edit '/etc/fstab' to replace '/app02' with '/usr/ed'

This leaves all the underlying LVM configuration intact. LVM mirroring occurs at the logical volume level and the filesystem lies above that.

Regards!

...JRF...
Sajjad Sahir
Honored Contributor

Re: Replace a filesystem


Dear
1. umount the files sytem.
umount /app02

2. remove logical volume

by using lvremove

3. create new logical volume
lvcreate -L size /dev/vg03/lvol2

4.create new file system by using newfs command
5. create new dir /usr/ed

finally mount the file system in that dir.

thanks and regards

Sajjad


MSwift
Regular Advisor

Re: Replace a filesystem

THANKS JRF!!!!!! Exactly what i was looking for. One question though, when we normally use newfs we use it on rlvol, so is that why you have suggested mkfs? Thanks again

MSwift.
James R. Ferguson
Acclaimed Contributor
Solution

Re: Replace a filesystem

Hi (again):

I tend to refer to 'mkfs' instead of 'newfs' only because though 'newfs' is a "friendly" front-end to the 'mkfs' the bulk of the information (options and arguments) can be found in the manpages for 'mkfs', as for example:

http://www.docs.hp.com/en/B3921-60631/mkfs_vxfs.1M.html

Regards!

...JRF...