Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
02-05-2014, 11:26 PM
|
#16
|
Moderator
Registered: Mar 2008
Posts: 22,185
|
OK, way past time to shake hands guys.
|
|
2 members found this post helpful.
|
02-06-2014, 04:46 AM
|
#17
|
Member
Registered: Oct 2013
Posts: 109
Rep:
|
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.
|
02-06-2014, 06:49 PM
|
#18
|
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604
|
Quote:
Originally Posted by YellowApple
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
|
|
|
02-06-2014, 06:59 PM
|
#19
|
Senior Member
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223
Original Poster
Rep:
|
Quote:
Originally Posted by Richard Cranium
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.
|
|
|
02-06-2014, 07:28 PM
|
#20
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
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
|
|
|
02-06-2014, 08:07 PM
|
#21
|
Member
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95
Rep:
|
Quote:
Originally Posted by Kustom42
Again, lets all get along and try to help each other
|
Fair enough.
Quote:
Originally Posted by dederon
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
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.
|
|
|
02-06-2014, 10:27 PM
|
#22
|
Moderator
Registered: Mar 2008
Posts: 22,185
|
A possible choice might be to move and resize partitions even if you had to copy off to some external media.
|
|
|
02-07-2014, 03:13 AM
|
#23
|
Senior Member
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223
Original Poster
Rep:
|
Thanks for the tips, man!
I am still not getting rid off windows but I am definitely saving your tips
|
|
|
02-07-2014, 03:27 AM
|
#24
|
Member
Registered: Sep 2004
Location: Japan
Distribution: RHEL9.4
Posts: 735
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 11:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|