* [gentoo-user] /usr and /home to another partition @ 2005-10-07 0:49 Matthias Langer 2005-10-07 1:06 ` Joe Menola 2005-10-07 1:07 ` W.Kenworthy 0 siblings, 2 replies; 14+ messages in thread From: Matthias Langer @ 2005-10-07 0:49 UTC (permalink / raw To: gentoo-user I want to move the /usr and /home directories to another partition, because I'm thinking of buying a new HD. It would be great if both directories were on the same partition, as splitting drives never seemed very appealing to me. As far as I know, one possibility would be to [with the boot-cd] # mv /usr /mnt/newHD/ # mv /home /mnt/newHD/ # ln -s /mnt/newHD/usr usr # ln -s /mnt/newHD/home home However, I'm not sure if this is the suggested method of doing so and to be honest, I'm not completley sure if this would even work. Any comments or suggestions ? -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 0:49 [gentoo-user] /usr and /home to another partition Matthias Langer @ 2005-10-07 1:06 ` Joe Menola 2005-10-07 1:52 ` Matthias Langer 2005-10-07 1:07 ` W.Kenworthy 1 sibling, 1 reply; 14+ messages in thread From: Joe Menola @ 2005-10-07 1:06 UTC (permalink / raw To: gentoo-user On Thursday October 6 2005 7:49 pm, Matthias Langer wrote: > I want to move the /usr and /home directories to another partition, > because I'm thinking of buying a new HD. It would be great if both > directories were on the same partition, as splitting drives never seemed > very appealing to me. As far as I know, one possibility would be to > [with the boot-cd] > > # mv /usr /mnt/newHD/ > # mv /home /mnt/newHD/ > # ln -s /mnt/newHD/usr usr > # ln -s /mnt/newHD/home home > > However, I'm not sure if this is the suggested method of doing so and to > be honest, I'm not completley sure if this would even work. > > Any comments or suggestions ? In theory I suppose that would work. Myself, I would copy the contents to /mnt/newHD/ then rename the original directories and create the links. The renamed directories can be deleted after you've verified positive results. And if it all craps out, the originals can simply be renamed back to /usr and /home. You should consider creating separate partitions for these though. At some point you may wish to blow out the install but retain your /home. Separate partitions makes this much easier. And also opens the possibility of sharing your /home with multiple installs. HTH -jm -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 1:06 ` Joe Menola @ 2005-10-07 1:52 ` Matthias Langer 2005-10-07 2:05 ` Hemmann, Volker Armin 2005-10-07 2:19 ` John Jolet 0 siblings, 2 replies; 14+ messages in thread From: Matthias Langer @ 2005-10-07 1:52 UTC (permalink / raw To: gentoo-user Joe Menola wrote: >On Thursday October 6 2005 7:49 pm, Matthias Langer wrote: > > >>I want to move the /usr and /home directories to another partition, >>because I'm thinking of buying a new HD. It would be great if both >>directories were on the same partition, as splitting drives never seemed >>very appealing to me. As far as I know, one possibility would be to >>[with the boot-cd] >> >># mv /usr /mnt/newHD/ >># mv /home /mnt/newHD/ >># ln -s /mnt/newHD/usr usr >># ln -s /mnt/newHD/home home >> >>However, I'm not sure if this is the suggested method of doing so and to >>be honest, I'm not completley sure if this would even work. >> >>Any comments or suggestions ? >> >> > >In theory I suppose that would work. Myself, I would copy the contents >to /mnt/newHD/ then rename the original directories and create the links. The >renamed directories can be deleted after you've verified positive results. >And if it all craps out, the originals can simply be renamed back to /usr >and /home. >You should consider creating separate partitions for these though. At some >point you may wish to blow out the install but retain your /home. Separate >partitions makes this much easier. And also opens the possibility of sharing >your /home with multiple installs. > >HTH -jm > > Well, maybe you are right and creating a /usr and a /home partition is the better choice. As I want to buy a 250GB drive, I'm thinking of 20G for /usr and 230GB for home, while still 16GB remain for /opt, /root, /bin .... . Now another genooist pointed out that it would be wiser to use rsync or tar instead of just # cp - r /usr /mnt/newHd_part_usr/ So, should I enter # rsync -r /usr /mnt/newHd_part_usr/ or are there some options I should activate to make sure I get what I want ? Thanks, Matthias -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 1:52 ` Matthias Langer @ 2005-10-07 2:05 ` Hemmann, Volker Armin 2005-10-07 12:03 ` Norberto Bensa 2005-10-07 2:19 ` John Jolet 1 sibling, 1 reply; 14+ messages in thread From: Hemmann, Volker Armin @ 2005-10-07 2:05 UTC (permalink / raw To: gentoo-user On Friday 07 October 2005 03:52, Matthias Langer wrote: > Joe Menola wrote: > >On Thursday October 6 2005 7:49 pm, Matthias Langer wrote: > >>I want to move the /usr and /home directories to another partition, > >>because I'm thinking of buying a new HD. It would be great if both > >>directories were on the same partition, as splitting drives never seemed > >>very appealing to me. As far as I know, one possibility would be to > >>[with the boot-cd] > >> > >># mv /usr /mnt/newHD/ > >># mv /home /mnt/newHD/ > >># ln -s /mnt/newHD/usr usr > >># ln -s /mnt/newHD/home home > >> > >>However, I'm not sure if this is the suggested method of doing so and to > >>be honest, I'm not completley sure if this would even work. > >> > >>Any comments or suggestions ? > > > >In theory I suppose that would work. Myself, I would copy the contents > >to /mnt/newHD/ then rename the original directories and create the links. > > The renamed directories can be deleted after you've verified positive > > results. And if it all craps out, the originals can simply be renamed > > back to /usr and /home. > >You should consider creating separate partitions for these though. At some > >point you may wish to blow out the install but retain your /home. Separate > >partitions makes this much easier. And also opens the possibility of > > sharing your /home with multiple installs. > > > >HTH -jm > > Well, maybe you are right and creating a /usr and a /home partition is > the better choice. As I want to buy a 250GB drive, I'm thinking of 20G > for /usr and 230GB for home, while still 16GB remain for /opt, /root, > /bin .... . > Now another genooist pointed out that it would be wiser to use rsync or > tar instead of just > # cp - r /usr /mnt/newHd_part_usr/ > So, should I enter > # rsync -r /usr /mnt/newHd_part_usr/ > or are there some options I should activate to make sure I get what I want > ? if you want to use copy, I would prefer cp -a ;) hm, go to the suse site - they have a step-by-step example to move whole directory-trees from one partition to another.. or had it some yoears ago. They used tar, for some reasons they mentioned and I forgot ;) -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 2:05 ` Hemmann, Volker Armin @ 2005-10-07 12:03 ` Norberto Bensa 2005-10-07 12:19 ` Matthias Langer 0 siblings, 1 reply; 14+ messages in thread From: Norberto Bensa @ 2005-10-07 12:03 UTC (permalink / raw To: gentoo-user Hemmann, Volker Armin wrote: > if you want to use copy, I would prefer cp -a ;) Use tar since cp wont preserve empty dirs. # cd /path/to/old/dir # tar cf - * | ( cd /path/to/new/dir && tar xf - ) > They used tar, for some reasons they mentioned and I forgot ;) :) -- Norberto Bensa 4544-9692 Ciudad de Buenos Aires, Argentina -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 12:03 ` Norberto Bensa @ 2005-10-07 12:19 ` Matthias Langer 0 siblings, 0 replies; 14+ messages in thread From: Matthias Langer @ 2005-10-07 12:19 UTC (permalink / raw To: gentoo-user Norberto Bensa wrote: >Hemmann, Volker Armin wrote: > > >>if you want to use copy, I would prefer cp -a ;) >> >> > >Use tar since cp wont preserve empty dirs. > ># cd /path/to/old/dir ># tar cf - * | ( cd /path/to/new/dir && tar xf - ) > > What about rsync -a ? > > > >>They used tar, for some reasons they mentioned and I forgot ;) >> >> > >:) > > > -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 1:52 ` Matthias Langer 2005-10-07 2:05 ` Hemmann, Volker Armin @ 2005-10-07 2:19 ` John Jolet 2005-10-07 5:16 ` Roy Wright 1 sibling, 1 reply; 14+ messages in thread From: John Jolet @ 2005-10-07 2:19 UTC (permalink / raw To: gentoo-user On Thursday 06 October 2005 20:52, Matthias Langer wrote: > Joe Menola wrote: > >On Thursday October 6 2005 7:49 pm, Matthias Langer wrote: > >>I want to move the /usr and /home directories to another partition, > >>because I'm thinking of buying a new HD. It would be great if both > >>directories were on the same partition, as splitting drives never seemed > >>very appealing to me. As far as I know, one possibility would be to > >>[with the boot-cd] > >> > Now another genooist pointed out that it would be wiser to use rsync or > tar instead of just > # cp - r /usr /mnt/newHd_part_usr/ > So, should I enter > # rsync -r /usr /mnt/newHd_part_usr/ > or are there some options I should activate to make sure I get what I want > ? > > Thanks, Matthias rsync -a will get all times and permissions, /etc. I would STRONGLY second what the other guy said about lvm, though. If you buy a new hard drive, don't just put filesystems and partitions on it, go the LVM route, make the logical volumes small, and don't use the whole drive for lvs, you can grow anything you want later. -- John Jolet Your On-Demand IT Department 512-762-0729 www.jolet.net john@jolet.net -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 2:19 ` John Jolet @ 2005-10-07 5:16 ` Roy Wright 0 siblings, 0 replies; 14+ messages in thread From: Roy Wright @ 2005-10-07 5:16 UTC (permalink / raw To: gentoo-user John Jolet wrote: >On Thursday 06 October 2005 20:52, Matthias Langer wrote: > > >>Joe Menola wrote: >> >> >>>On Thursday October 6 2005 7:49 pm, Matthias Langer wrote: >>> >>> >>>>I want to move the /usr and /home directories to another partition, >>>>because I'm thinking of buying a new HD. It would be great if both >>>>directories were on the same partition, as splitting drives never seemed >>>>very appealing to me. As far as I know, one possibility would be to >>>>[with the boot-cd] >>>> >>>> >>>> http://www.gentoo.org/doc/en/articles/partitioning-p1.xml worked nicely for me when I moved /home to a second drive... HTH, Roy -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 0:49 [gentoo-user] /usr and /home to another partition Matthias Langer 2005-10-07 1:06 ` Joe Menola @ 2005-10-07 1:07 ` W.Kenworthy 2005-10-07 7:34 ` Neil Bothwick 1 sibling, 1 reply; 14+ messages in thread From: W.Kenworthy @ 2005-10-07 1:07 UTC (permalink / raw To: gentoo-user If you want to move directories, avoid wholesale symlinking like this as it always ends in tears ... Using a liveCD, create your partitions and directories, then copy everything over (rsync or tar is best to make sure its accurate), change your fstab then reboot. When you are happy its working, you can recover the old directories at leisure. For the future: I found that since I stated using LVM, this sort of exercise becomes a lot easier, safer and has less downtime. BillK On Fri, 2005-10-07 at 02:49 +0200, Matthias Langer wrote: > I want to move the /usr and /home directories to another partition, > because I'm thinking of buying a new HD. It would be great if both > directories were on the same partition, as splitting drives never seemed > very appealing to me. As far as I know, one possibility would be to > [with the boot-cd] > > # mv /usr /mnt/newHD/ > # mv /home /mnt/newHD/ > # ln -s /mnt/newHD/usr usr > # ln -s /mnt/newHD/home home > > However, I'm not sure if this is the suggested method of doing so and to > be honest, I'm not completley sure if this would even work. > > Any comments or suggestions ? -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 1:07 ` W.Kenworthy @ 2005-10-07 7:34 ` Neil Bothwick 2005-10-07 9:40 ` capsel 2005-10-07 12:15 ` Matthias Langer 0 siblings, 2 replies; 14+ messages in thread From: Neil Bothwick @ 2005-10-07 7:34 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 607 bytes --] On Fri, 07 Oct 2005 09:07:41 +0800, W.Kenworthy wrote: > If you want to move directories, avoid wholesale symlinking like this as > it always ends in tears ... If you want two directories on the same partition, I prefer to mount them with --bind. I do this to have /usr, /var and /opt on a single partition, separate from/. /usr is mounted on the partition itself, which contains var and opt directories, which are mounted with the following fstab lines. /usr/var /var auto bind 0 0 /usr/opt /opt auto bind 0 0 -- Neil Bothwick Headline: "Explosion At Sperm Bank, Nurses Overcome" [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 7:34 ` Neil Bothwick @ 2005-10-07 9:40 ` capsel 2005-10-07 10:07 ` Neil Bothwick 2005-10-07 12:15 ` Matthias Langer 1 sibling, 1 reply; 14+ messages in thread From: capsel @ 2005-10-07 9:40 UTC (permalink / raw To: gentoo-user I tryed to do links to directories on other partition on my experimental server with SELinux. It had some problems with labeling filesystem. Is it possible to solve this issue? 2005/10/7, Neil Bothwick <neil@digimed.co.uk>: > On Fri, 07 Oct 2005 09:07:41 +0800, W.Kenworthy wrote: > > > If you want to move directories, avoid wholesale symlinking like this as > > it always ends in tears ... > > If you want two directories on the same partition, I prefer to mount them > with --bind. I do this to have /usr, /var and /opt on a single > partition, separate from/. /usr is mounted on the partition itself, which > contains var and opt directories, which are mounted with the following > fstab lines. > > /usr/var /var auto bind 0 0 > /usr/opt /opt auto bind 0 0 > > > -- > Neil Bothwick > > Headline: "Explosion At Sperm Bank, Nurses Overcome" > > > -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 9:40 ` capsel @ 2005-10-07 10:07 ` Neil Bothwick 0 siblings, 0 replies; 14+ messages in thread From: Neil Bothwick @ 2005-10-07 10:07 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 369 bytes --] On Fri, 7 Oct 2005 11:40:24 +0200, capsel wrote: > I tryed to do links to directories on other partition on my > experimental server with SELinux. It had some problems with labeling > filesystem. > Is it possible to solve this issue? Yes, use mount --bind instead. read the mail you quoted. -- Neil Bothwick Top Oxymorons Number 40: Same difference [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 7:34 ` Neil Bothwick 2005-10-07 9:40 ` capsel @ 2005-10-07 12:15 ` Matthias Langer 2005-10-07 13:11 ` Neil Bothwick 1 sibling, 1 reply; 14+ messages in thread From: Matthias Langer @ 2005-10-07 12:15 UTC (permalink / raw To: gentoo-user Neil Bothwick wrote: >On Fri, 07 Oct 2005 09:07:41 +0800, W.Kenworthy wrote: > > > >>If you want to move directories, avoid wholesale symlinking like this as >>it always ends in tears ... >> >> > >If you want two directories on the same partition, I prefer to mount them >with --bind. I do this to have /usr, /var and /opt on a single >partition, separate from/. /usr is mounted on the partition itself, which >contains var and opt directories, which are mounted with the following >fstab lines. > >/usr/var /var auto bind 0 0 >/usr/opt /opt auto bind 0 0 > > > Just to be sure, my fstab will contain something like this: /dev/hdx /mnt/nHd reiserfs defaults,noatime 0 2 /mnt/nHd/usr /usr auto bind 0 0 /mnt/nHd/home /home auto bind 0 0 As in http://www.gentoo.org/doc/en/articles/partitioning-p1.xml it is suggested to copy the contents of home in single user mode to be sure there are no open files, i'm considering copying the /usr directory after booting with the live-cd. Thank you all for your help ! Matthias -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] /usr and /home to another partition 2005-10-07 12:15 ` Matthias Langer @ 2005-10-07 13:11 ` Neil Bothwick 0 siblings, 0 replies; 14+ messages in thread From: Neil Bothwick @ 2005-10-07 13:11 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 367 bytes --] On Fri, 07 Oct 2005 14:15:21 +0200, Matthias Langer wrote: > Just to be sure, my fstab will contain something like this: > > /dev/hdx /mnt/nHd reiserfs defaults,noatime 0 2 > /mnt/nHd/usr /usr auto bind 0 0 > /mnt/nHd/home /home auto bind 0 0 That's correct. -- Neil Bothwick After two weeks of dieting, all I lost was two weeks. [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-10-07 13:18 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-10-07 0:49 [gentoo-user] /usr and /home to another partition Matthias Langer 2005-10-07 1:06 ` Joe Menola 2005-10-07 1:52 ` Matthias Langer 2005-10-07 2:05 ` Hemmann, Volker Armin 2005-10-07 12:03 ` Norberto Bensa 2005-10-07 12:19 ` Matthias Langer 2005-10-07 2:19 ` John Jolet 2005-10-07 5:16 ` Roy Wright 2005-10-07 1:07 ` W.Kenworthy 2005-10-07 7:34 ` Neil Bothwick 2005-10-07 9:40 ` capsel 2005-10-07 10:07 ` Neil Bothwick 2005-10-07 12:15 ` Matthias Langer 2005-10-07 13:11 ` Neil Bothwick
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox