Mount /usr as a separate filesystem


 
Thread Tools Search this Thread
Operating Systems Solaris Mount /usr as a separate filesystem
# 1  
Old 01-16-2009
Mount /usr as a separate filesystem

Hi All,

I have mount /usr directory as a seperate filesystem.The /usr directory includedd in / root file system.I have to mount it as seperate.

Please Help me,

Thanks and Regards,
# 2  
Old 01-16-2009
You can only do that if you have formatted /usr to be a separate partition in the partition table. If you did not do that during the installation, you can't do it
# 3  
Old 01-16-2009
Quote:
Originally Posted by incredible
You can only do that if you have formatted /usr to be a separate partition in the partition table. If you did not do that during the installation, you can't do it
This is not true. Provided there is enough space on a disk and an unused partition /usr can be moved. A reboot is required, but that is as far as it goes in terms of downtime.

The procedure would be:

make a new filesystem

mount the new filesystem, for exmaple to /mnt

Code:
cd /usr
find . | cpio -pmdu /mnt
umount /mnt

edit vfstab as required

reboot to single user mode

Code:
mv /usr /usr.old
mkdir /usr

exit and allow the machine to continue the boot sequence.

Once you're happy that everything is ok you can remove /usr.old
# 4  
Old 01-17-2009
MySQL

I have done it before, this is what I have done:

1. First, you should have enough space on another slice.

2. partition this slice.

3. create new file system on that slice.

4. go to SINGLE USER MODE , this is essential as you are moving OS file system, it won't work unless you do it in SINGLE USER mode

Code:
# init S


5. then, mount the slice you create on a temporary directory, such as /mnt

6. do this:

Code:
# ufsdump 0uf - /usr | (cd /mnt; ufsrestore rf -)

this will take about 15 minutes or so, depends, just make sure you are in single user mode.


7. do this

Code:
# cd /mnt

# rm restoremytable



8. you will have a small problem now, if you do

Code:
# ls /mnt

lost+found usr

the problem you will find a directory inside /mnt called "usr" which means you will have to do the following:

Code:
# cd /mnt/usr

# cp -Rp * /mnt



9. After you finish the copy do this:

Code:
 
# cd /mnt

# rm -R usr


10. Last step is, edit /etc/vfstab, and add an entry to mount /usr from the new slice, then reboot.


I've done this and tested, it worked perfectly. I tried it with /usr and with /var

Good luck.
# 5  
Old 01-17-2009
This is an interesting solution I've never tried.

is it going to work without using "dump" ?

your way looks faster and better than the way I did it


Quote:
Originally Posted by reborg
This is not true. Provided there is enough space on a disk and an unused partition /usr can be moved. A reboot is required, but that is as far as it goes in terms of downtime.

The procedure would be:

make a new filesystem

mount the new filesystem, for exmaple to /mnt

Code:
cd /usr
find . | cpio -pmdu /mnt
umount /mnt

edit vfstab as required

reboot to single user mode

Code:
mv /usr /usr.old
mkdir /usr

exit and allow the machine to continue the boot sequence.

Once you're happy that everything is ok you can remove /usr.old
# 6  
Old 01-17-2009
Yes, it will work without dump but I don't think there would be too much difference in speed except for the fact that you have an extra copy. We are really doing the same thing, just using different tools.

Also it looks like you never removed the old /usr.
# 7  
Old 01-17-2009
Quote:
Originally Posted by reborg
Yes, it will work without dump but I don't think there would be too much difference in speed except for the fact that you have an extra copy. We are really doing the same thing, just using different tools.

Also it looks like you never removed the old /usr.
Interesting. Yes I didn't remove old /usr , after the reboot and confirm it work, I remove it usually.

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Failed to mount /usr

I recently ran the Solaris 10 upgrade 10 and everything went fine. About 2 months later after rebooting and getting ready to load the latest upgrade that came out, I am getting this error. ERROR: svc:/system/filesytem/root: default failed to mount /usr (see 'svc -x' for details) ... (6 Replies)
Discussion started by: drew_1980
6 Replies

2. AIX

Mount Filesystem in AIX Unable to read /etc/filesystem

Dear all, We are facing prolem when we are going to mount AIX filesystem, the system returned the following error 0506-307The AFopen call failed : A file or directory in the path name does not exist. But when we ls filesystems in the /etc/ directory it show -rw-r--r-- 0 root ... (2 Replies)
Discussion started by: m_raheelahmed
2 Replies

3. AIX

Increasing ./usr or any filesystem

Hi guys, I want to increase my ./usr or just one path in my aix6.1 machine. currently if I # lsvg rootvg VOLUME GROUP: rootvg VG IDENTIFIER: 00f6126500004c00000 0012aef0c9035 VG STATE: active PP SIZE: 128... (2 Replies)
Discussion started by: pilotHans
2 Replies

4. AIX

What is the cause of USR filesystem full

we are using aix 5.3 and we notice that the filesystem /usr is almost full. we have an oracle database running on the server.what are the cause why this filesystem is almost full.what should we do to free some space on this filesystem beside increase the size?thanks (4 Replies)
Discussion started by: paulexis
4 Replies

5. HP-UX

/usr out of disk space need to unmount/ expand volume /mount

Greetings, I am running HP-UX 10.2 and /usr is out of disk space already. I installed IE 5.0 for UNIX on my machine under /usr and browsed the Internet for a while and presto no more disk space. I have plenty of hard disk space on my computer so would like to expand the size of the volume. The... (5 Replies)
Discussion started by: Dirk_
5 Replies

6. Solaris

smf fails to mount svc:/system/filesystem/usr:default

http://i44.tinypic.com/2cmq7vn.jpg Please help me on this issue i'm using solaris on vmware x86 even i runed fsck on root disk like 'fsck -Y /dev/rdsk/c0d0s0 ' but again after reboot it is going to maintanance mode reply soon (6 Replies)
Discussion started by: knl.sundeep
6 Replies

7. AIX

/usr/nsr needing cleanup (filesystem 100%)

Hi, got a nice surprise this morning. I have an alert saying I have a server with the filesystem /usr/nsr full at 100%. Upon looking at its content I have no idea what to clean up. The only files that were created within the past few days are kind of small. So I suspect it was always almost... (3 Replies)
Discussion started by: Browser_ice
3 Replies

8. Solaris

/usr unable to mount

Hi All, I need help on this issue and it is a production server. /usr is unable to mount and make system can't even type any commands. Only this show and no changes makes to the system. ERROR: svc:/system/filesystem/root:default failed to mount /usr (see 'svcs -x' for details) ... (3 Replies)
Discussion started by: mailbox80
3 Replies

9. Filesystems, Disks and Memory

how can I extend /usr filesystem

How can extend /usr filesystem in hp-ux 11.11 (I'm not using online JFS) ? (0 Replies)
Discussion started by: pedro_lezaeta
0 Replies

10. Solaris

Boot problem: failed to mount /usr

My Solaris10 cannot boot after I made an error when apending the vfstab to: dev to mount======/dev/dsk/c0d0p1:1 device to fsck====== <blank> mount pt=========/Data FS Type==========pcfs fsck pass=========- mount at boot=====yes mount options===== <blank> My 'Data' partition is a... (3 Replies)
Discussion started by: maag
3 Replies
Login or Register to Ask a Question