FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-01-2010, 10:47 PM
Gary Golden
 
Default world symlinking

Hi, list.
I keep changes of my /etc with git and I would like to include
/var/lib/portage/world file into the repository.

Can I safely do:

mv /var/lib/portage/world /etc/portage
ln -s /etc/portage /var/lib/portage/world

Will portage update handle it properly?
Using hardlinks seems to be more cleaner way, but for some reason I
don't want to use it for this task.

Have a nice day!

--
Gary Golden
 
Old 11-02-2010, 06:08 AM
Daniel Pielmeier
 
Default world symlinking

2010/11/2 Gary Golden <mail@garygolden.me>:
> Hi, list.
> I keep changes of my /etc with git and I would like to include
> /var/lib/portage/world file into the repository.
>
> Can I safely do:
>
> mv /var/lib/portage/world /etc/portage
> ln -s /etc/portage /var/lib/portage/world
>
> Will portage update handle it properly?
> Using hardlinks seems to be more cleaner way, but for some reason I
> don't want to use it for this task.

It should work. Just try it out, but make a copy of your world file
before. Should be easy to switch back if anything fails.

Afaik, the creation of the symbolic link should look like this:
ln -s /etc/portage/world /var/lib/portage/world

--
Daniel Pielmeier
 
Old 11-02-2010, 08:54 AM
Gary Golden
 
Default world symlinking

On 11/02/2010 12:08 PM, Daniel Pielmeier wrote:
> 2010/11/2 Gary Golden <mail@garygolden.me>:
>> Hi, list.
>> I keep changes of my /etc with git and I would like to include
>> /var/lib/portage/world file into the repository.
>>
>> Can I safely do:
>>
>> mv /var/lib/portage/world /etc/portage
>> ln -s /etc/portage /var/lib/portage/world
>>
>> Will portage update handle it properly?
>> Using hardlinks seems to be more cleaner way, but for some reason I
>> don't want to use it for this task.
>
> It should work. Just try it out, but make a copy of your world file
> before. Should be easy to switch back if anything fails.
>
> Afaik, the creation of the symbolic link should look like this:
> ln -s /etc/portage/world /var/lib/portage/world
>

Thanks for the correction, you're right, of course.
Nevertheless, I've considered that using hardlinks is most porper way to
solve this task. It basically do what I need, make another reference to
the file under needed directory; without introducing compexity.

--
Gary Golden
 
Old 11-02-2010, 09:46 AM
Alan McKinnon
 
Default world symlinking

Apparently, though unproven, at 11:54 on Tuesday 02 November 2010, Gary Golden
did opine thusly:

> On 11/02/2010 12:08 PM, Daniel Pielmeier wrote:
> > 2010/11/2 Gary Golden <mail@garygolden.me>:
> >> Hi, list.
> >> I keep changes of my /etc with git and I would like to include
> >> /var/lib/portage/world file into the repository.
> >>
> >> Can I safely do:
> >>
> >> mv /var/lib/portage/world /etc/portage
> >> ln -s /etc/portage /var/lib/portage/world
> >>
> >> Will portage update handle it properly?
> >> Using hardlinks seems to be more cleaner way, but for some reason I
> >> don't want to use it for this task.
> >
> > It should work. Just try it out, but make a copy of your world file
> > before. Should be easy to switch back if anything fails.
> >
> > Afaik, the creation of the symbolic link should look like this:
> > ln -s /etc/portage/world /var/lib/portage/world
>
> Thanks for the correction, you're right, of course.
> Nevertheless, I've considered that using hardlinks is most porper way to
> solve this task. It basically do what I need, make another reference to
> the file under needed directory; without introducing compexity.


hard links will only work if /etc/portage and /var/lib/portage are on the same
filesystem. Frequently, they are not.


--
alan dot mckinnon at gmail dot com
 
Old 11-02-2010, 09:46 AM
Gary Golden
 
Default world symlinking

On 11/02/2010 03:53 PM, Coert Waagmeester wrote:
> Gary Golden wrote:
>> On 11/02/2010 12:08 PM, Daniel Pielmeier wrote:
>>> 2010/11/2 Gary Golden <mail@garygolden.me>:
>>>> Hi, list.
>>>> I keep changes of my /etc with git and I would like to include
>>>> /var/lib/portage/world file into the repository.
>>>>
>>>> Can I safely do:
>>>>
>>>> mv /var/lib/portage/world /etc/portage
>>>> ln -s /etc/portage /var/lib/portage/world
>>>>
>>>> Will portage update handle it properly?
>>>> Using hardlinks seems to be more cleaner way, but for some reason I
>>>> don't want to use it for this task.
>>> It should work. Just try it out, but make a copy of your world file
>>> before. Should be easy to switch back if anything fails.
>>>
>>> Afaik, the creation of the symbolic link should look like this:
>>> ln -s /etc/portage/world /var/lib/portage/world
>>>
>>
>> Thanks for the correction, you're right, of course.
>> Nevertheless, I've considered that using hardlinks is most porper way to
>> solve this task. It basically do what I need, make another reference to
>> the file under needed directory; without introducing compexity.
>>
>
> What about a bind mount?
>
> Rgds,
> Coert
>
>

Indeed, it is another solution for this.
But its disadvantage is that it requires additional configuration (fstab
at least)
If /var would be on another fs, then I would use bind mount, though


--
Gary Golden
 
Old 11-02-2010, 09:53 AM
Coert Waagmeester
 
Default world symlinking

Gary Golden wrote:

On 11/02/2010 12:08 PM, Daniel Pielmeier wrote:

2010/11/2 Gary Golden <mail@garygolden.me>:

Hi, list.
I keep changes of my /etc with git and I would like to include
/var/lib/portage/world file into the repository.

Can I safely do:

mv /var/lib/portage/world /etc/portage
ln -s /etc/portage /var/lib/portage/world

Will portage update handle it properly?
Using hardlinks seems to be more cleaner way, but for some reason I
don't want to use it for this task.

It should work. Just try it out, but make a copy of your world file
before. Should be easy to switch back if anything fails.

Afaik, the creation of the symbolic link should look like this:
ln -s /etc/portage/world /var/lib/portage/world



Thanks for the correction, you're right, of course.
Nevertheless, I've considered that using hardlinks is most porper way to
solve this task. It basically do what I need, make another reference to
the file under needed directory; without introducing compexity.



What about a bind mount?

Rgds,
Coert
 
Old 11-02-2010, 04:41 PM
Stroller
 
Default world symlinking

On 2/11/2010, at 10:46am, Alan McKinnon wrote:
> ...
> hard links will only work if /etc/portage and /var/lib/portage are on the same
> filesystem. Frequently, they are not.

For small values of frequently.

Stroller.
 
Old 11-02-2010, 05:19 PM
Volker Armin Hemmann
 
Default world symlinking

On Tuesday 02 November 2010, Stroller wrote:
> On 2/11/2010, at 10:46am, Alan McKinnon wrote:
> > ...
> > hard links will only work if /etc/portage and /var/lib/portage are on the
> > same filesystem. Frequently, they are not.
>
> For small values of frequently.
>
> Stroller.

for every sane system out there.

/var is a candidate for surprisingly filling up / to 100% so it is a smart and
sane choice to put it on its own partition where damage will be reduced to
some log files or an aborted emerge.
 
Old 11-02-2010, 05:29 PM
Gary Golden
 
Default world symlinking

> /var is a candidate for surprisingly filling up / to 100% so it is a smart and
> sane choice to put it on its own partition where damage will be reduced to
> some log files or an aborted emerge.
>
>

It is safe for everyday laptop with 500Gb to have solid /

--
Gary Golden
 
Old 11-02-2010, 05:32 PM
Volker Armin Hemmann
 
Default world symlinking

On Tuesday 02 November 2010, Gary Golden wrote:
> > /var is a candidate for surprisingly filling up / to 100% so it is a
> > smart and sane choice to put it on its own partition where damage will
> > be reduced to some log files or an aborted emerge.
>
> It is safe for everyday laptop with 500Gb to have solid /

hope and wishfull thinking. Cute.
 

Thread Tools




All times are GMT. The time now is 04:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org