1832280 Members
1841 Online
110041 Solutions
New Discussion

data move

 
SOLVED
Go to solution
Ian James_1
Occasional Contributor

data move

hello everyone

I have a subdirectory /data/esm that resides in the root file system. I need to get the data in it's own filesystem. I figured the best way to do this would be to shut the app down,

1. create a new lvol and filesystem,
2. create a temporary mount point,
3. mount it on the new filesystem,
4. mv the /data/esm directory and all it's files into the temp mount point
5. unmount the temp mount point
6. mount the filesystem on the /data/esm mount point
7. Bring up the app

That should just about cover it ?

Thanks in advance
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

Re: data move

Hi,

Yes. Except do not mount it manually. Add the entry in /etc/fstab and use the command 'mount /data/esm'. That will ensure integrity of your fstab entries. Also do not 'mv' the data. "cp" the data. That way your backout is ensured.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ian James_1
Occasional Contributor

Re: data move

Hi,

Thanks for the reply. I will tar the data for a backup. If I don't mv it out of the root filesystem it won't free up any space ?

Ian
Sridhar Bhaskarla
Honored Contributor

Re: data move

If you don't have files over 2GB (which I don't assume), you can directory use tar to copy the files.

cd /data/esm; tar cf - .|( cd /newfilesystem; tar xvf - )

I meant do not move the data first. Copy it. Start the application. Make sure everything works fine and then remove the old directory after taking a good backup.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try