Mount /app on a new DISK

Hi folks,

because of disk space problem my root is almost full..The root is mounted on rpool and i want to move /app on a new disk, is that possible without compromising any link?How can i do that?
I use solaris 10

Thank you in advance,

Matt

---------- Post updated at 04:36 PM ---------- Previous update was at 04:35 PM ----------

Can i do it online or by rebooting with cdrom?

Method 1: Check if there is any big files(more than 10M) in / and then clean up

# find / -exec -type f -size +10000000c -exec ls -al {} \;

Method 2 : Add a new disk to rpool

Hope it helps.
Cheers,

this won't work because all disks in rpool are mirrored disks...

how can i mount only app under different disk?

  • create a new pool (mount it anywhere) with the new disk (2 disks if you want to mirror the /app directory)
  • stop all processes which access /app
  • dump the content of /app to the new pool
  • rename /app to e.g. /app_old
  • mount new pool on /app

if everything works, delete /app_old...

Thank you Duke, i have some questions for you :

1) How can i dump the content of /app to new pool (let's call it pool2), with zfs send/receive?Or what else?
2)If i have created a new pool (let's say pool2), i have to mount it with zfs set mount point, correct?

I got the overall meaning but i'm not sure about the rigth command to perform, can u give me more details about it with an example and command?Thank you, your hel is much appreciate,

Matt

1) How can i dump the content of /app to new pool (let's call it pool2), with zfs send/receive?Or what else?

2)If i have created a new pool (let's say pool2), i have to mount it with zfs set mount point, correct?

---------- Post updated at 10:34 AM ---------- Previous update was at 10:22 AM ----------

Sorry accidently clicked when I was trying to hit TAB keys. :frowning:
Anyway, if /app is on own ZFS, you can do zfs send/receive as below.

 
# zpool create app_pool new_disk
# zfs snapshot rpool/app@backup
# zfs send rpool/app@backup | zfs recv app_pool/app
# zfs set mountpoint=/app_old rpool/app
# zfs set mountpoint=/app app_pool/app
# zfs destroy  rpool/app@backup
# zfs destroy  app_pool/app@backup
# zfs list

If /app is not in own ZFS, you need to create a new pool and zfs and copy using cp command.

Cheers,

what do u mean with this? my /app is not listed when i type zfs list...is that the sense?

So if my /app not appear with zfs list, do i need to create a new pool, and then?

thank you,

regards,

Matt

if /app is not in zfs which means it is just a directory, you need to copy /app to a new pool to get free spaces of rpool.

Cheers,