LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-10-2004, 04:38 PM   #1
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Rep: Reputation: 30
/ full need to repartition not sure what to do


i filled / up. don't ask how!

currently i am partitioned as:

hda1 win98
hda2 win98
hda3 win98
hda4 extended
hda5 /
hda6 /swp

i then have LOADS of free space as i just got a new hard disk.

i would actually like a separate /usr and /home in the extended partition - rather than make / bigger (actually would like to make it smaller!)

my questions are:

1) can simply edit fstab to mount /usr and /home in new partitions?

2) how do i resize the linux filesystems after i resize the partitions with booit NG?
 
Old 01-10-2004, 05:48 PM   #2
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 392

Rep: Reputation: 55
Re: / full need to repartition not sure what to do

Quote:
Originally posted by dibblethewrecke

1) can simply edit fstab to mount /usr and /home in new partitions?

2) how do i resize the linux filesystems after i resize the partitions with booit NG?
1. Yes, after you edit/resize/add/remove partitions, you must update /etc/fstab to reflect the new state of affairs.

2. It depends on which filesystems you're using. If you're using resierfs (find out by looking in /etc/fstab), use the "resize_reiserfs" command.

Back up anything important before you start messing around with this stuff.

Lyle
 
Old 01-10-2004, 08:16 PM   #3
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Original Poster
Rep: Reputation: 30
creating /usr partition after install

ahhhhhhhhhhhhhh, relief!

breathing space at last!

created a new /home partition but didn't remove old partition from fstab and the system wouldn't boot at all. Used Damn Small Linux to get in to my / partition and edit fstab using vi - an app i have only used to set up ppp in DSL once! Oh for the want of one little #!

Fixed now tho!

So, I now have some breathing space on /

I still need to enlarge / or create /usr in my acres of free space

creating a new /home was easy as you can do it as root but how can i do /usr?

could i create the partition on my system -> hda8
boot into damn small
rename /usr to /usr2
mount hda8 and create /usr, copy /usr2 over
edit fstab
/dev/hda8 /usr ext3 defaults 0 0

would that work? suggestions?!

after i move /usr (if i can) how can i resize /? because it will be huge and / is tiny without usr! can you resize ext3?

Last edited by dibblethewrecke; 01-10-2004 at 08:30 PM.
 
Old 01-10-2004, 09:51 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"how can i do /usr?"

mkdir /newusr
mount /dev/hda8 /newusr
cp -pR /usr/* /newusr
edit fstab
/dev/hda8 /usr ext3 defaults 0 0

Then reboot. If it works OK then
boot into damn small
mount / partition on /spare1
rm /spare1/usr/* -R
rmdir /spare1/newusr


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 01-11-2004, 12:14 AM   #5
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Quote:
how can i resize /?
You may use "GNU parted"
Regards
 
Old 01-12-2004, 07:06 AM   #6
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Original Poster
Rep: Reputation: 30
cheers, jailbait, that looks good, I have a few questions tho:

Quote:
"how can i do /usr?"

mkdir /newusr
mount /dev/hda8 /newusr
cp -pR /usr/* /newusr
edit fstab
/dev/hda8 /usr ext3 defaults 0 0
so here I have copied /usr to /newusr, does the cp -pR retain permissions?

also, when i edit fstab shouldn't it be

/dev/hda8 /newusr ext3 defaults 0 0

then, i don't really understand the next steps! i know i need to delete /usr and rename /usrnew to /usr...could you explain a bit more, please?

Quote:
Then reboot. If it works OK then
boot into damn small
mount / partition on /spare1
rm /spare1/usr/* -R
rmdir /spare1/newusr
 
Old 01-12-2004, 10:17 AM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"so here I have copied /usr to /newusr, does the cp -pR retain permissions?"

Yes. -p means preserve permissions. See:
man cp

"also, when i edit fstab shouldn't it be
/dev/hda8 /newusr ext3 defaults 0 0
then, i don't really understand the next steps! i know i need to delete /usr and rename /usrnew to /usr...could you explain a bit more, please?"

It should be:
/dev/hda8 /usr ext3 defaults 0 0
At that point you have all of /usr duplicated in 2 locations. You have one copy on /usr and a second copy on /dev/hda8. The fstab entry says to make the /dev/hda8 copy available on the /usr mountpoint after you reboot. The copy on /usr disappears. It is physically still there but it is not accessable anymore. At that point you also have no further use for /newusr which is merely an empty directory after reboot. You can delete /newusr any time after you reboot. /newusr doesn't have to be deleted with damn small Linux.

You cannot rename mount points so before you reboot you could not rename /newusr to /usr. Because some of the /usr directories are on the PATH you cannot rename or delete /usr before or after you reboot.

So to get rid of the old /usr tree hidden on / and actually free up the space you have to boot into damn small Linux, mount your / partition and delete everything on /usr but leave the empty /usr directory as a mount point.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 01-12-2004, 11:47 AM   #8
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Original Poster
Rep: Reputation: 30
cheers, that's excellent. I think I am actually just going to make / larger rather than have a separate /usr but only for the time being.

useful information tho about how fstab and mounting works. the command for preserve permissions is something i should have looked at earlier. i copied my /home directory around in a gui and lost all the permissions. i reset all of them to -rwx-rx-rx -dibble -users is that correct?

so, let me make sure i understand this.

all tho /usr has been copied to a dir /usrnew on /dev/hda8 when it is actually mounted at reboot it becomes /usr and you can't delete the old /usr because it is "hidden" by the new /usr on hda8. That's right isn't it?
 
Old 01-12-2004, 03:44 PM   #9
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"i reset all of them to -rwx-rx-rx -dibble -users is that correct?"

-rwxr-xr-x -dibble -users is what most of the permissions should be for directories and executable files. For non executable files most of the permissions should be -rw-r--r-- -dibble -users You may have a few odd files that need permissions different than the two normal permissions.

"all tho /usr has been copied to a dir /usrnew on /dev/hda8 when it is actually mounted at reboot it becomes /usr and you can't delete the old /usr because it is "hidden" by the new /usr on hda8. That's right isn't it?"

You only have one /usr directory. IIt is located in your / partition. It can function as a mount point or as a directory but not both at the same time.

You cannot have two mount points pointing to the same partition at the same time. So at no time are both /usrnew and /usr mount points for /dev/hda8 simultaneously.

At one point in the sequence of events I described you have all of the /usr tree duplicated. One copy is on /dev/hda8. The other copy is on /usr. You can use /usr to access the /usr tree on the / partition or you can use /usr as a mount point for /dev/hda8, but you cannot do both simultaneously.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 01-12-2004 at 03:47 PM.
 
Old 01-13-2004, 03:56 AM   #10
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Original Poster
Rep: Reputation: 30
cheers again jailbait

as i said i decided not to do that for the time being - this what i did do (by way of a thread finisher):

my partitions were:

hda1 win98
hda2 win98
hda3 win98
hda4 extended
hda5 /
hda6 /swp
hda7 /home

after I added the new home. using bootit NG i used "slide" to move /swp and /home to give me 1028 megs of space AFTER /. I then used parted to resize /, which is an ext3 filesystem.

that's about it. cheers guys. dibble.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
repartition memory hari_seldon99 Linux - Laptop and Netbook 0 10-03-2004 02:55 PM
How can I safely repartition.... BajaNick Linux - Software 5 12-30-2003 05:01 PM
repartition problem fideli Linux From Scratch 3 12-12-2003 08:46 AM
Reformat / Repartition Hamma Linux - Software 4 12-02-2003 03:06 PM
How to repartition Manny88 Linux - Software 2 09-19-2003 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration