SUMARY: Creating new mount point and moving files over

From: Asadoorian, Paul (Paul.Asadoorian@GTECH.COM)
Date: Tue May 30 2000 - 14:10:38 CDT


The simple solution:

1. Boot to single user mode from cdrom
2. Mount file systems as rw:
        mount /dev/whatever / -o remount
3. Move data from one to the other:
        ufsdump 0ucf - /usr | ufsrestore xf -
4. add new entry to vfs tab
5. reboot

Thanks to all who responded.

Paul Asadoorian
Systems Administrator
UWin!

 <<Re: Out of space & moving files>> <<Re:Out of space & moving files >>
<<RE: Out of space & moving files>> <<RE: Out of space & moving files>>
<<RE: Out of space & moving files>> <<Re: Out of space & moving files>>
<<Re: Out of space & moving files>> <<RE: Out of space & moving files>>
<<RE: Out of space & moving files>> <<RE: Out of space & moving files>>
<<RE: Out of space & moving files>> <<Re: Out of space & moving files>>
<<Re: Out of space & moving files>>


attached mail follows:


Paul,
The procedure for moving /usr should be as follows:
1. Create a new directory, /usr2
2. format c0t1d0s0 to create partitions; run newfs to build a file system on
it.
3. Mount /dev/dsk/c0t1d0s0 /usr2
4. cd /usr2
5. Populate /usr2:
ufsdump 0ucf - /usr | ufsrestore xf -
6. Change /etc/vfstab to include /usr as a file system,
The entry will be similar to the entry for /, but change the fsck pass,
and be sure that the /dev/dsk entry matches the /dev/rdsk entry.

7. mv /usr /usr_prev
(If step 7 fails, you may need to boot cdrom -s, mount the old / on /mnt,
and change /mnt/etc/vfstab, then reboot).
8. mkdir /usr
(ls -ld /usr* to check permissions...chmod as needed)
9. reboot
10. If the system comes up, you can rm -rf /usr_prev
type carefully so you don't remove the active file system

Good luck
Seth


attached mail follows:


So make them read-write!

boot single user, the mount your new filesystem rw (which it should be by
default) copy /usr to it in what ever manner you like (I'd use tar), then
edit
the vfstab so that the new disk is mounted as /usr when the system reboots,
then
reboot.

If you are having trouble mounting the new disk because root is read-only (i
forget if it comes that way into single user, you have to remount it
read-write
- something like
mount /dev/whatever / -o remount

then it should mount read-write

couldn't be much easier...
Good luck

--
/ Sid /

attached mail follows:


Boot from the installation CD-ROM and then you should be able to do this.

                Vern Walls
                Perot Systems/Parsons I.S.

-----Original Message-----
From: Asadoorian, Paul [mailto:Paul.Asadoorian@GTECH.COM]
Sent: Tuesday, May 30, 2000 12:06 PM
To: 'sun-managers(a)sunmanagers.ececs.uc.edu'
Subject: Out of space & moving files

I am trying to free up some space on one of my machines. I have added a new
drive (c0t1d0s0) and want to move the /usr directory over to it. the /usr
is on the / mount point which is full. I have booted into single user mode
and tried to move and copy the files over, both give errors becuase file
systems are read-only. I am running solaris 2.6 and the machine is an ultra
10.

I will summarize...

Paul Asadoorian
Systems Administrator
UWin!


attached mail follows:


The times that I have done things like this I do the following

        *Copy the files over*
1) mount the new drive on /mnt
2) cd /usr
3) tar -cvf - . | (cd /mnt; tar -xvf - )
4) cd /

        * Prepare the system for new config on boot-up *
5) umount /mnt
6) edit /etc/vfstab
        Add entry for new /usr
7) reboot

        * Reclaim space from old /usr
8) mount (via NFS) / onto /mnt ie
        mount -F nfs localhost:/ /mnt (you will need to share / first as
root, read-write)
9) cd /mnt/usr
10) rm -rf *
        (note that is a '*' not a / :)
        (note that you do not actually delete the directory entry for
/mnt/usr)
11) umount /mnt
12) unshare / (security)

This is the best method ... if you don't want to reboot, then ....

7) mv usr usr.old; mkdir usr; chown root:other usr; chmod 755 usr; mount
/usr
8) rm -rf /usr.old

However since programs have open files, they will be linked to the files
(inodes) on the original /usr filesystem. This may cause a problem, so I
would recommend the first method using a reoot/NFS mount

-----Original Message-----
From: Asadoorian, Paul [mailto:Paul.Asadoorian@GTECH.COM]
Sent: Tuesday, May 30, 2000 1:06 PM
To: 'sun-managers@sunmanagers.ececs.uc.edu'
Subject: Out of space & moving files

I am trying to free up some space on one of my machines. I have added a new
drive (c0t1d0s0) and want to move the /usr directory over to it. the /usr
is on the / mount point which is full. I have booted into single user mode
and tried to move and copy the files over, both give errors becuase file
systems are read-only. I am running solaris 2.6 and the machine is an ultra
10.

I will summarize...

Paul Asadoorian
Systems Administrator
UWin!


attached mail follows:



How are you moving the files? Assuming that the new drive is writable,
cd to the /usr directory, then run:

# find . -print | cpio -pvdum <new_disk_mountpoint>

Then you need to redo /etc/vfstab and reboot.

Have a CD handy incase something falls apart and you have to boot
single user mode from CD to correct it.

- Alan

> -----Original Message-----
> From: Asadoorian, Paul [mailto:Paul.Asadoorian@GTECH.COM]
> Sent: Tuesday, May 30, 2000 1:06 PM
> To: 'sun-managers@sunmanagers.ececs.uc.edu'
> Subject: Out of space & moving files
>
>
> I am trying to free up some space on one of my machines. I
> have added a new
> drive (c0t1d0s0) and want to move the /usr directory over to
> it. the /usr
> is on the / mount point which is full. I have booted into
> single user mode
> and tried to move and copy the files over, both give errors
> becuase file
> systems are read-only. I am running solaris 2.6 and the
> machine is an ultra
> 10.
>
> I will summarize...
>
>
> Paul Asadoorian
> Systems Administrator
> UWin!
>
>
>


attached mail follows:


On Tue, May 30, 2000 at 01:06:09PM -0400, Asadoorian, Paul wrote:
> I am trying to free up some space on one of my machines. I have added a
new
> drive (c0t1d0s0) and want to move the /usr directory over to it. the /usr
> is on the / mount point which is full. I have booted into single user
mode
> and tried to move and copy the files over, both give errors becuase file
> systems are read-only. I am running solaris 2.6 and the machine is an
ultra
> 10.
>
> I will summarize...

No real need to boot single user, but if you do, you'll need to
remount the file systems read-write (this is just mount -U in
BSD-style mount... not positive on Solaris, but from glancing at the
man page leaving out -r may be enough or you may also need to add -O).

Once you've got both disks mounted (I'll assume you've got the new
disk at /mnt), do this:

  # cd /usr ; tar cfp - . | ( cd /mnt ; tar xfBp - )

Then verify that what's in /mnt is the way it should be, rm -rf /usr,
umount /mnt and mount c0t1d0s0 at /usr (and set it that way in
/etc/vfstab).

       ~ g r @cs.swarthmore.edu


attached mail follows:



You have to remount the new partition:

  mount -m -o remount /
  mount -m -o remount /mnt
  
This will remount them rw without updating the mnttab file (this is the way
the
system does it at boot time).

Once they are remounted, just run your standard ufsdump/ufsrestore command:
  cd /usr
  ufsdump 0f - . | (cd /mnt ; ufsrestore vf - )
  
Hope that helps.

Kevin Colagio
kevin@web.xcdg.xerox.com
System Administrator, Webmaster, and Perpetual Student.


attached mail follows:


What you want to do is mount the disk on the / partition. run the command
rsync -rpl (src) (dest). This command syncs the file system with all the
permissions and sym links. When the copying is done, edit the vfstab to
mount the new disk as /usr and comment out the old mount point. Reboot the
machine.

-----Original Message-----
From: owner-sun-managers@sunmanagers.ececs.uc.edu
[mailto:owner-sun-managers@sunmanagers.ececs.uc.edu]On Behalf Of
Asadoorian, Paul
Sent: Tuesday, May 30, 2000 10:06 AM
To: 'sun-managers@sunmanagers.ececs.uc.edu'
Subject: Out of space & moving files

I am trying to free up some space on one of my machines. I have added a new
drive (c0t1d0s0) and want to move the /usr directory over to it. the /usr
is on the / mount point which is full. I have booted into single user mode
and tried to move and copy the files over, both give errors becuase file
systems are read-only. I am running solaris 2.6 and the machine is an ultra
10.

I will summarize...

Paul Asadoorian
Systems Administrator
UWin!


attached mail follows:



Hi Paul

One way to get this done is to boot from CD-ROM and mount
the appropriate filesystems and do the transfer.

And don't forget to update /etc/vfstab with the new location
of the /usr partition.

Hope this helps.

Paul

--
Paul Kloepfer           email: paul.kloepfer@enews.com
Sr. UNIX Admin          phone: 202-261-2625
Enews.com               fax: 202-466-2565
         - Your Online News Stand -

> -----Original Message----- > From: Asadoorian, Paul [mailto:Paul.Asadoorian@GTECH.COM] > Sent: Tuesday, May 30, 2000 01:06 PM > To: 'sun-managers@sunmanagers.ececs.uc.edu' > Subject: Out of space & moving files > > > I am trying to free up some space on one of my machines. I > have added a new > drive (c0t1d0s0) and want to move the /usr directory over to > it. the /usr > is on the / mount point which is full. I have booted into > single user mode > and tried to move and copy the files over, both give errors > becuase file > systems are read-only. I am running solaris 2.6 and the > machine is an ultra > 10. > > I will summarize... > > > Paul Asadoorian > Systems Administrator > UWin! > > >

attached mail follows:


make sure if you move, that you edit /etc/vfstab, or else you will be in
much pain...

-----Original Message-----
From: Asadoorian, Paul [mailto:Paul.Asadoorian@GTECH.COM]
Sent: Tuesday, May 30, 2000 6:06 PM
To: 'sun-managers@sunmanagers.ececs.uc.edu'
Subject: Out of space & moving files

I am trying to free up some space on one of my machines. I have added a new
drive (c0t1d0s0) and want to move the /usr directory over to it. the /usr
is on the / mount point which is full. I have booted into single user mode
and tried to move and copy the files over, both give errors becuase file
systems are read-only. I am running solaris 2.6 and the machine is an ultra
10.

I will summarize...

Paul Asadoorian
Systems Administrator
UWin!


attached mail follows:


dismount c0t1d0s0 and remount it. By default, single user mode mounts
read-only. When you remount, it should mount it read-write.

Carl

-----Original Message-----
From: Asadoorian, Paul [mailto:Paul.Asadoorian@GTECH.COM]
Sent: Tuesday, May 30, 2000 6:06 PM
To: 'sun-managers@sunmanagers.ececs.uc.edu'
Subject: Out of space & moving files

I am trying to free up some space on one of my machines. I have added a new
drive (c0t1d0s0) and want to move the /usr directory over to it. the /usr
is on the / mount point which is full. I have booted into single user mode
and tried to move and copy the files over, both give errors becuase file
systems are read-only. I am running solaris 2.6 and the machine is an ultra
10.

I will summarize...

Paul Asadoorian
Systems Administrator
UWin!


attached mail follows:



Hi paul. it is advisable, when moving the /usr directory, that you boot
off of a cdrom and mount your file systems in the /tmp directory. once
you do this, move the /usr directory to the new file system and then
create a symbolic link in the root directory. if you do not boot off of a
cdrom you will have big problems when you try to create a symbolic link
in the root partition after you move the /usr directory because the
libraries (which are in /usr/lib) required for this operation are not
where they are supposed to be.
 
hope this helps...

mike

On Tue, 30 May 2000, Asadoorian, Paul wrote:

> I am trying to free up some space on one of my machines. I have added a
new
> drive (c0t1d0s0) and want to move the /usr directory over to it. the
/usr
> is on the / mount point which is full. I have booted into single user
mode
> and tried to move and copy the files over, both give errors becuase file
> systems are read-only. I am running solaris 2.6 and the machine is an
ultra
> 10.
>
> I will summarize...
>
>
> Paul Asadoorian
> Systems Administrator
> UWin!
>
>
>


attached mail follows:


On Tue May 30 at 01:06:09 PM, Asadoorian, Paul wrote:

> and tried to move and copy the files over, both give errors becuase file
> systems are read-only. I am running solaris 2.6 and the machine is an
ultra

Simple solution. Remount them read-write...Or is there some reason that's
not working?

sean

-- 
Sean Harding sharding@dogcow.org        |"Well, contempt loves the silence 
http://www.dogcow.org/sean/             | It thrives in the dark"
                                        | --Natalie Merchant



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:08 CDT