LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-05-2014, 11:26 PM   #16
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,185

Rep: Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648

OK, way past time to shake hands guys.
 
2 members found this post helpful.
Old 02-06-2014, 04:46 AM   #17
dederon
Member
 
Registered: Oct 2013
Posts: 109

Rep: Reputation: 56
This is offtopic, but: i really like this feature in plan 9. one consequence is, that you dont need a $PATH variable - just mount every directory, which contains binaries, to /bin.
 
1 members found this post helpful.
Old 02-06-2014, 06:49 PM   #18
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Quote:
Originally Posted by YellowApple View Post
Pardon me? I'm not flaming, and I'm not waving an e-peen. I merely put forward a suggestion; OP can take it or leave it.



Again: pardon? I never stated anything along those lines, nor intended to imply it.



Union mounts are very common in LiveCD/DVD/USB environments, and UnionFS and aufs are the two most prevalent in-kernel implementations of the concept for Linux.



Very well.

A union mount allows multiple filesystems to be mounted simultaneously; the end result looks like a single filesystem, with a single mountpoint. This concept is commonly used in Unix-like operating systems; Plan 9 - Bell Labs' successor to Unix - makes extensive use of such filesystem combination, and is an awesome example of union mounts done right. There are multiple methods of implementing union mounts in Linux, two of them being UnionFS and aufs.

In the case of UnionFS, then - so long as your kernel supports it - you can easily make two filesystems accessible with one mountpoint:

Code:
mount -t unionfs -o dirs=/mnt/user-partition-1:/mnt/user-partition-2 none /home
For aufs:

Code:
mount -t aufs -o br=/mnt/user-partition-1:/mnt/user-partition-2 none /home
Both of the above assume that you've already established mountpoints for your two partitions that need to be mounted as /home.

There's also unionfs-fuse if your kernel doesn't include UnionFS or aufs and you don't feel like compiling kernel modules. That tool is also quite simple:

Code:
unionfs-fuse /mnt/user-partition-1:/mnt/user-partition-2 /home
I'm not sure about the availability of any of these in Slackware, though I do know that Slax (which is based on Slackware) previously used UnionFS and now uses aufs as of version 6. Debian has both unionfs-fuse and aufs.



Eeyup.


This is an excellent follow up post, thanks for providing information on your solution +1 rep. Again, lets all get along and try to help each other
 
Old 02-06-2014, 06:59 PM   #19
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
Quote:
Originally Posted by Richard Cranium View Post
Since everyone else is busy showing how smart they are, I guess that I'll ask.

Why do you want to do this? Is there content on both partitions that you want to merge? Do you want to use both drives to store your stuff?
The plan was: delete Windows partitions, merge it with /home partition.
 
Old 02-06-2014, 07:28 PM   #20
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
without going into detail, I see two options for your 'merge'

lvm and btrfs

btrfs would be easier on a 'live' system,
assuming ext3/4 you can convert to btrfs, you would then remove the ext3/4 snapshot ( you now have a 'none-reversable' btrfs )
then add devices, bad example assuming home is sda1 and your extra partition is sda2
Code:
btrfs device add /dev/sda2 /home
in real life more complicated, since you should make backups etc.

the lvm route is probably considered more stable, I like btrfs but not documented as much as lvm

with lvm you would be best starting from scratch, I.e. backup everything. and then apply lvm

as initially stated, I offer no real detail
set aside some time to read about both lvm and btrfs and consider the pros and cons of each

hope that helps


PS in all honesty I would start from scatch with either lvm or btrfs
or even just go traditional ext4 with a sain partition layout, especially if you have only the one drive
 
Old 02-06-2014, 08:07 PM   #21
YellowApple
Member
 
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95

Rep: Reputation: 37
Quote:
Originally Posted by Kustom42 View Post
Again, lets all get along and try to help each other
Fair enough.

Quote:
Originally Posted by dederon View Post
This is offtopic, but: i really like this feature in plan 9. one consequence is, that you dont need a $PATH variable - just mount every directory, which contains binaries, to /bin.
Yup. You can also union-mount the /net directory with those of remote machines as a quick-and-easy way of implementing NAT, firewalls, VPNs, and other network goodness, too; you can do the same thing with /proc for distributed computing. Really cool stuff.

Quote:
Originally Posted by moisespedro View Post
The plan was: delete Windows partitions, merge it with /home partition.
Do you already have an existing /home? If not, then LVM would, in fact, be a good solution for this. Assuming the partitions are /dev/sda2 and /dev/sdb2...

Code:
pvcreate /dev/sda2 /dev/sdb2      # establishes the old partitions as LVM physical volumes
vgcreate LVM /dev/sda2 /dev/sdb2  # creates a new volume group with the above-created PVs
lvcreate -n home -L 20G LVM       # creates a 20GB logical volume on the above-created VG
vgchange -ay                      # activates any available volume groups
mkfs.ext4 /dev/LVM/home           # creates an ext4 filesystem on the above-created LV
mount /dev/LVM/home /home         # mounts the above-created filesystem on /home
If you do, then the above steps are still useful, but you can replace the "mount" with a union mount like I've been advocating:

Code:
mv /home /opt/                                       # move your documents to a new spot
mkdir /mnt/extra-home                                # create the intermediate mountpoint
mount /dev/LVM/home /mnt/extra-home                  # mount the above-created LV
unionfs-fuse -o cow /mnt/extra-home:/opt/home /home  # merge the above-created LV and your existing documents
This will overlay your newly-created LVM-based home partitions on top of your existing documents. The "-o cow" enables copy-on-write, which means that - instead of the old home being modified - any modifications to your files will take place on the new partitions. What's handy about this is that you can adapt this to hack together a quick-and-dirty snapshotting system for your /home (which - along with the ability to transform a read-only CD FS into a read/write FS for live environments - is another common use of union mounts).

It might be possible to skip the step involving the moving of your original /home; most of my own use of union mounts on Linux involves distinct filesystems being merged on boot, so I haven't played around with a command like "unionfs-fuse -o cow /mnt/extra-home /home" to see if it will do as asked (put differently: I don't know for sure if it will behave like Plan 9's "bind" command).

Alternately, it's probably better if you just move the entirety of your /home onto the LVM VG in your case. Depends on how much there is to move, as well as your existing /home setup.

Last edited by YellowApple; 02-06-2014 at 08:09 PM.
 
Old 02-06-2014, 10:27 PM   #22
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,185

Rep: Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648Reputation: 3648
A possible choice might be to move and resize partitions even if you had to copy off to some external media.
 
Old 02-07-2014, 03:13 AM   #23
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
Thanks for the tips, man!

I am still not getting rid off windows but I am definitely saving your tips
 
Old 02-07-2014, 03:27 AM   #24
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735

Rep: Reputation: 154Reputation: 154
I second the lvm option. It is an elegant working solution without breaking things and weird configs. Just plain simple straight forward. I would have given that exact same answer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding new partitions to existing mount point sanei05 Linux - Server 7 01-22-2014 06:59 AM
Two partitions one mount point? 1337 Linux - Newbie 8 04-30-2009 11:58 PM
puppy+grub saves ram installed mount point as HD install mount point agualust Linux - Newbie 0 04-10-2009 12:23 PM
setting mount point on partitions v1nc3nt Linux - Newbie 4 03-07-2006 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:33 AM.

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