* Re: [gentoo-user] moving /usr
@ 2006-03-10 15:43 Sergio Polini
2006-03-10 17:43 ` Mark Knecht
0 siblings, 1 reply; 13+ messages in thread
From: Sergio Polini @ 2006-03-10 15:43 UTC (permalink / raw
To: gentoo-user
Mark Knecht:
> http://forums.gentoo.org/viewtopic.php?t=121164
>
> I'll proceed in this manner unless I hear back that there is some
> problem with doing it this way.
There are several hints in that topic.
I did move my /usr to a new partition, so I'ld say:
1. create and format your new partition;
2. mount your new partition in /mnt/whatever;
3. copy the content of your /usr into this partition by:
cp -a /usr/* /mnt/whatever (the "-a" option is important; look at man
cp);
4. reboot frome a livecd;
5. mount your root filesystem and edit /etc/fstab:
/dev/hdXY /usr etc.
6. reboot from the hard disk to be sure that your new partition is well
mounted and works; run "mount" to check that /usr is on your new
partition; test this in other ways to be really sure ;-)
7. reboot again from a live cd;
8. mount your root filesystem in /mnt/something;
9. delete the old /usr directory to free the unused space:
cd /mnt/something/usr
rm -rf *
NB: do not delete /usr itself, just its contents, as /usr is the mount
point for the new partition;
10. cross your fingers and reboot from the hard disk ;-)
HTH
Sergio
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 15:43 [gentoo-user] moving /usr Sergio Polini @ 2006-03-10 17:43 ` Mark Knecht 2006-03-10 17:56 ` Alexander Skwar ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Mark Knecht @ 2006-03-10 17:43 UTC (permalink / raw To: gentoo-user On 3/10/06, Sergio Polini <sp_rm_it@yahoo.it> wrote: > Mark Knecht: > > http://forums.gentoo.org/viewtopic.php?t=121164 > > > > I'll proceed in this manner unless I hear back that there is some > > problem with doing it this way. > > There are several hints in that topic. > I did move my /usr to a new partition, so I'ld say: > 1. create and format your new partition; > 2. mount your new partition in /mnt/whatever; > 3. copy the content of your /usr into this partition by: > cp -a /usr/* /mnt/whatever (the "-a" option is important; look at man > cp); > 4. reboot frome a livecd; > 5. mount your root filesystem and edit /etc/fstab: > /dev/hdXY /usr etc. > 6. reboot from the hard disk to be sure that your new partition is well > mounted and works; run "mount" to check that /usr is on your new > partition; test this in other ways to be really sure ;-) > 7. reboot again from a live cd; > 8. mount your root filesystem in /mnt/something; > 9. delete the old /usr directory to free the unused space: > cd /mnt/something/usr > rm -rf * > NB: do not delete /usr itself, just its contents, as /usr is the mount > point for the new partition; > 10. cross your fingers and reboot from the hard disk ;-) > > HTH > Sergio Well...I did my best, but it wasn't good enough. The machine no longer boots to any level that a user could use. I'm told there are lots of messages on the screen about being unable to find files. (/usr/bin, /usr/sbin sort of things...) To bad for me...I guess I know what I'll be doing this weekend. I'm hoping they can find their Gentoo install disk, boot the machine and get it on the network with sshd running. That will give me a fighting chance of getting the darn thing fixed. Thanks to all for the help. I'm sure it was something stupid on my part and not anyone's instructions. Cheers, Mark -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 17:43 ` Mark Knecht @ 2006-03-10 17:56 ` Alexander Skwar 2006-03-10 18:05 ` Eric Bliss 2006-03-10 18:49 ` Sergio Polini 2 siblings, 0 replies; 13+ messages in thread From: Alexander Skwar @ 2006-03-10 17:56 UTC (permalink / raw To: gentoo-user Mark Knecht wrote: > Well...I did my best, but it wasn't good enough. The machine no longer > boots to any level that a user could use. Now that you've broke it, I'd like to suggest to learn and refrain from using old fashioned partitioning. Instead, I'd strongly suggest to use LVM instead. With LVM, it's no problem at all to increase the size of filesystems. Actually, the "proper" use of LVM includes that the filesystems will be increased when there's need; with LVM, it's normally suggested to make the filesystems as small as needed and then add space on them, when required. I'd suggest to read the LVM howto at http://tldp.org/HOWTO/LVM-HOWTO/ Alexander Skwar -- /* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. */ -- Larry Wall in toke.c from the perl source code -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 17:43 ` Mark Knecht 2006-03-10 17:56 ` Alexander Skwar @ 2006-03-10 18:05 ` Eric Bliss 2006-03-10 11:17 ` Josh Helmer 2006-03-10 18:49 ` Sergio Polini 2 siblings, 1 reply; 13+ messages in thread From: Eric Bliss @ 2006-03-10 18:05 UTC (permalink / raw To: gentoo-user On Friday 10 March 2006 09:43, Mark Knecht wrote: > Well...I did my best, but it wasn't good enough. The machine no longer > boots to any level that a user could use. I'm told there are lots of > messages on the screen about being unable to find files. (/usr/bin, > /usr/sbin sort of things...) > > To bad for me...I guess I know what I'll be doing this weekend. > > I'm hoping they can find their Gentoo install disk, boot the machine > and get it on the network with sshd running. That will give me a > fighting chance of getting the darn thing fixed. > > Thanks to all for the help. I'm sure it was something stupid on my > part and not anyone's instructions. > > Cheers, > Mark > Before you do that... did you also edit /etc/mtab in addition to /etc/fstab? Just a thought, since we are talking about separate partitions to mount. -- Eric Bliss systems design and integration, CreativeCow.Net -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 18:05 ` Eric Bliss @ 2006-03-10 11:17 ` Josh Helmer 2006-03-10 18:39 ` Eric Bliss 0 siblings, 1 reply; 13+ messages in thread From: Josh Helmer @ 2006-03-10 11:17 UTC (permalink / raw To: gentoo-user On Friday 10 March 2006 18:05, Eric Bliss wrote: > Before you do that... did you also edit /etc/mtab in addition to > /etc/fstab? > > Just a thought, since we are talking about separate partitions to mount. Don't touch mtab. mtab is auto-magically generated by mount. Josh -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 11:17 ` Josh Helmer @ 2006-03-10 18:39 ` Eric Bliss 2006-03-10 18:43 ` John Jolet 0 siblings, 1 reply; 13+ messages in thread From: Eric Bliss @ 2006-03-10 18:39 UTC (permalink / raw To: gentoo-user On Friday 10 March 2006 03:17, Josh Helmer wrote: > On Friday 10 March 2006 18:05, Eric Bliss wrote: > > Before you do that... did you also edit /etc/mtab in addition to > > /etc/fstab? > > > > Just a thought, since we are talking about separate partitions to mount. > > Don't touch mtab. mtab is auto-magically generated by mount. > > Josh Ah, okay. Learn something every day. I just remembered seeing mount information in that file when I was reading it (although why I was doing that, I now have no idea). Guess this would explain why. Now if only I could remember why I had even read the file in the past. You don't edit it during the original install process do you? -- Eric Bliss systems design and integration, CreativeCow.Net -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 18:39 ` Eric Bliss @ 2006-03-10 18:43 ` John Jolet 0 siblings, 0 replies; 13+ messages in thread From: John Jolet @ 2006-03-10 18:43 UTC (permalink / raw To: gentoo-user On Mar 10, 2006, at 12:39 PM, Eric Bliss wrote: > On Friday 10 March 2006 03:17, Josh Helmer wrote: >> On Friday 10 March 2006 18:05, Eric Bliss wrote: >>> Before you do that... did you also edit /etc/mtab in addition to >>> /etc/fstab? >>> >>> Just a thought, since we are talking about separate partitions to >>> mount. >> >> Don't touch mtab. mtab is auto-magically generated by mount. >> >> Josh > > Ah, okay. Learn something every day. I just remembered seeing mount > information in that file when I was reading it (although why I was > doing > that, I now have no idea). Guess this would explain why. Now if > only I > could remember why I had even read the file in the past. You don't > edit it > during the original install process do you? > before you chroot, you copy /proc/mounts to it so your chrooted environment matches.....maybe that's where you saw it. > -- > Eric Bliss > systems design and integration, > CreativeCow.Net > -- > gentoo-user@gentoo.org mailing list > -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 17:43 ` Mark Knecht 2006-03-10 17:56 ` Alexander Skwar 2006-03-10 18:05 ` Eric Bliss @ 2006-03-10 18:49 ` Sergio Polini 2006-03-10 19:37 ` Mark Knecht 2 siblings, 1 reply; 13+ messages in thread From: Sergio Polini @ 2006-03-10 18:49 UTC (permalink / raw To: gentoo-user Mark Knecht: > Well...I did my best, but it wasn't good enough. The machine no > longer boots to any level that a user could use. I'm told there are > lots of messages on the screen about being unable to find files. > (/usr/bin, /usr/sbin sort of things...) That happened to me too ;-) But the reason was quickly clear: I had deleted /usr instead of /usr/*! Remember: > 9. delete the old /usr directory to free the unused space: > cd /mnt/something/usr > rm -rf * > NB: do not delete /usr itself, just its contents, as /usr is the > mount point for the new partition; Let us suppose that your /etc/fstab looks like: /dev/hda1 /boot <type> <opts> <dump/pass> /dev/hda2 / <type> <opts> <dump/pass> /dev/hda3 /usr <type> <opts> <dump/pass> The first and simplest try: reboot from a livecd, then: mount /dev/hda2 /mnt/something ls /mnt/something/usr If /mnt/something/usr doesn't exist, then: mkdir /mnt/something/usr reboot You could check that the new /usr partition is there, before rebooting: mount /dev/hda3 /mnt/something_else ls /mnt/something_else The old /usr contents should be there. Why not? So, if your reboot doesn't work, reboot again from a livecd and check /etc/fstab. Let me/us know! Sergio -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 18:49 ` Sergio Polini @ 2006-03-10 19:37 ` Mark Knecht 2006-03-11 18:36 ` Mark Knecht 0 siblings, 1 reply; 13+ messages in thread From: Mark Knecht @ 2006-03-10 19:37 UTC (permalink / raw To: gentoo-user On 3/10/06, Sergio Polini <sp_rm_it@yahoo.it> wrote: > Mark Knecht: > > Well...I did my best, but it wasn't good enough. The machine no > > longer boots to any level that a user could use. I'm told there are > > lots of messages on the screen about being unable to find files. > > (/usr/bin, /usr/sbin sort of things...) > > That happened to me too ;-) > But the reason was quickly clear: I had deleted /usr instead > of /usr/*! > Remember: OK, so far I cannot get into the machine so I don't know how to double check that but I'm pretty sure I didn't do this. The issue in and around these instructions, for me was that: 1) I'm in a completely out of disk space situation 2) I'm trying to move /usr 3) /usr includes /usr/bin and /usr/sbin which is where all commands are to basically use the machine and make the changes. (mv, cp, ls and all the normal stuff.) so I 1) Copied everything to the new partition 2) Removed everything from the original /usr except /usr/bin and /usr/lib. The only copy of /usr/sbin is on the new partition. /usr/lib had to remain for me to use vim to edit fstab. 3) The new partition was labeled using e2label 4) fstab was edited to mount the new partition at the existing /usr direcotry which still contained /usr/bin and /usr/lib 5) As a backup, since I had removed most of /usr to create space I now made a new directory /usrBACKUP and placed a copy of what was left in /usr there so I could get to it if I needed to. 6) Unmounted /mnt/usr_temp and rebooted. The messages (I'm told over the phone by a 78 year old man who is hard of hearing) are in and around not being able to find /usr/sbin. I don't know what they really say as we didn't try to get that detailed. He has decided to ship the machine to me via FedEx and I'll have to fix it here when it arrives. He didn't want to mess with Knoppix or the Gentoo install disk as he felt it was way beyond what he could do. Again, thanks for the ideas below, but since the machine is 350 miles away it's hard to do the experiements below. I'll do them when it arrives next week. Cheers, Mark > > > 9. delete the old /usr directory to free the unused space: > > cd /mnt/something/usr > > rm -rf * > > NB: do not delete /usr itself, just its contents, as /usr is the > > mount point for the new partition; > > Let us suppose that your /etc/fstab looks like: > > /dev/hda1 /boot <type> <opts> <dump/pass> > /dev/hda2 / <type> <opts> <dump/pass> > /dev/hda3 /usr <type> <opts> <dump/pass> > > The first and simplest try: reboot from a livecd, then: > > mount /dev/hda2 /mnt/something > ls /mnt/something/usr > > If /mnt/something/usr doesn't exist, then: > > mkdir /mnt/something/usr > reboot > > You could check that the new /usr partition is there, before > rebooting: > > mount /dev/hda3 /mnt/something_else > ls /mnt/something_else > > The old /usr contents should be there. Why not? > So, if your reboot doesn't work, reboot again from a livecd and > check /etc/fstab. > > Let me/us know! > > Sergio > -- > gentoo-user@gentoo.org mailing list > > -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 19:37 ` Mark Knecht @ 2006-03-11 18:36 ` Mark Knecht 0 siblings, 0 replies; 13+ messages in thread From: Mark Knecht @ 2006-03-11 18:36 UTC (permalink / raw To: gentoo-user On 3/10/06, Mark Knecht <markknecht@gmail.com> wrote: > On 3/10/06, Sergio Polini <sp_rm_it@yahoo.it> wrote: > > Mark Knecht: > > > Well...I did my best, but it wasn't good enough. The machine no > > > longer boots to any level that a user could use. I'm told there are > > > lots of messages on the screen about being unable to find files. > > > (/usr/bin, /usr/sbin sort of things...) > > > > That happened to me too ;-) > > But the reason was quickly clear: I had deleted /usr instead > > of /usr/*! > > Remember: > > OK, so far I cannot get into the machine so I don't know how to double > check that but I'm pretty sure I didn't do this. > > The issue in and around these instructions, for me was that: > > 1) I'm in a completely out of disk space situation > 2) I'm trying to move /usr > 3) /usr includes /usr/bin and /usr/sbin which is where all commands > are to basically use the machine and make the changes. (mv, cp, ls and > all the normal stuff.) > > so I > > 1) Copied everything to the new partition > 2) Removed everything from the original /usr except /usr/bin and > /usr/lib. The only copy of /usr/sbin is on the new partition. /usr/lib > had to remain for me to use vim to edit fstab. > 3) The new partition was labeled using e2label > 4) fstab was edited to mount the new partition at the existing /usr > direcotry which still contained /usr/bin and /usr/lib > 5) As a backup, since I had removed most of /usr to create space I now > made a new directory /usrBACKUP and placed a copy of what was left in > /usr there so I could get to it if I needed to. > 6) Unmounted /mnt/usr_temp and rebooted. > > The messages (I'm told over the phone by a 78 year old man who is hard > of hearing) are in and around not being able to find /usr/sbin. I > don't know what they really say as we didn't try to get that detailed. > > He has decided to ship the machine to me via FedEx and I'll have to > fix it here when it arrives. He didn't want to mess with Knoppix or > the Gentoo install disk as he felt it was way beyond what he could do. > > Again, thanks for the ideas below, but since the machine is 350 miles > away it's hard to do the experiements below. I'll do them when it > arrives next week. > > Cheers, > Mark > > > > > > 9. delete the old /usr directory to free the unused space: > > > cd /mnt/something/usr > > > rm -rf * > > > NB: do not delete /usr itself, just its contents, as /usr is the > > > mount point for the new partition; > > > > Let us suppose that your /etc/fstab looks like: > > > > /dev/hda1 /boot <type> <opts> <dump/pass> > > /dev/hda2 / <type> <opts> <dump/pass> > > /dev/hda3 /usr <type> <opts> <dump/pass> > > > > The first and simplest try: reboot from a livecd, then: > > > > mount /dev/hda2 /mnt/something > > ls /mnt/something/usr > > > > If /mnt/something/usr doesn't exist, then: > > > > mkdir /mnt/something/usr > > reboot > > > > You could check that the new /usr partition is there, before > > rebooting: > > > > mount /dev/hda3 /mnt/something_else > > ls /mnt/something_else > > > > The old /usr contents should be there. Why not? > > So, if your reboot doesn't work, reboot again from a livecd and > > check /etc/fstab. > > > > Let me/us know! > > > > Sergio Hi Sergio, OK, the machine arrived here about an hour ago overnight express. It's now up and running. The mistake was mine, but I think it wasn't something that was very clearly warned about in the online docs, or at least I don't remember being warned about this. I created a new partition and copied all the information over. I labeled the partition USR using e2label and then carefully copied an existing line from elsewhere in the fstab file and changed the specifics to mount the partition, or so I thought. When the machine arrived here and I booted the new partition was not mounted, but I was able to immediately mount it by hand. Inspecting the fstab file quickly revealed that the line I had copied from elsewhere in the fstab file had the options 'noauto,noatime' sort of line. I removed noauto, rebooted, and the machine appears to be working fine. Since the machine is here I'll do a thorough set of updates and hopefully get it shipped out again on Monday. Live and learn! Thanks for your help! Thanks, Mark -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] moving /usr @ 2006-03-10 14:53 Mark Knecht 2006-03-10 15:04 ` Ghaith Hachem 2006-03-10 16:16 ` Hemmann, Volker Armin 0 siblings, 2 replies; 13+ messages in thread From: Mark Knecht @ 2006-03-10 14:53 UTC (permalink / raw To: gentoo-user Hi, I have an out of disk space problem machine. It looks like moving /usr to a new partition would be the best thing to do. How can I do this safely? Thanks, Mark -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 14:53 Mark Knecht @ 2006-03-10 15:04 ` Ghaith Hachem 2006-03-10 16:16 ` Hemmann, Volker Armin 1 sibling, 0 replies; 13+ messages in thread From: Ghaith Hachem @ 2006-03-10 15:04 UTC (permalink / raw To: gentoo-user i think this should be easy, make the new partition copy the contenet of /usr to it change your fstab to include the new modifications i'm not sure how to delete the old one after it's mounted maybe mount -o bind? or just boot a live cd and delete the content of your old /usr from there when you restart it shoudl be working fine On 3/10/06, Mark Knecht <markknecht@gmail.com> wrote: > Hi, > I have an out of disk space problem machine. It looks like moving > /usr to a new partition would be the best thing to do. How can I do > this safely? > > Thanks, > Mark > > -- > gentoo-user@gentoo.org mailing list > > -- Cheers, Ghaith -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] moving /usr 2006-03-10 14:53 Mark Knecht 2006-03-10 15:04 ` Ghaith Hachem @ 2006-03-10 16:16 ` Hemmann, Volker Armin 1 sibling, 0 replies; 13+ messages in thread From: Hemmann, Volker Armin @ 2006-03-10 16:16 UTC (permalink / raw To: gentoo-user On Friday 10 March 2006 15:53, Mark Knecht wrote: > Hi, > I have an out of disk space problem machine. It looks like moving > /usr to a new partition would be the best thing to do. How can I do > this safely? go to the suse support database. Look up your question. They recommend tar (I did it once with their instructions and it worked perfectly). -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-03-11 18:41 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-03-10 15:43 [gentoo-user] moving /usr Sergio Polini 2006-03-10 17:43 ` Mark Knecht 2006-03-10 17:56 ` Alexander Skwar 2006-03-10 18:05 ` Eric Bliss 2006-03-10 11:17 ` Josh Helmer 2006-03-10 18:39 ` Eric Bliss 2006-03-10 18:43 ` John Jolet 2006-03-10 18:49 ` Sergio Polini 2006-03-10 19:37 ` Mark Knecht 2006-03-11 18:36 ` Mark Knecht -- strict thread matches above, loose matches on Subject: below -- 2006-03-10 14:53 Mark Knecht 2006-03-10 15:04 ` Ghaith Hachem 2006-03-10 16:16 ` Hemmann, Volker Armin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox