Operating System - Linux
1820879 Members
4232 Online
109628 Solutions
New Discussion юеВ

mount other disks or partitions to the / (root)directory

 
SOLVED
Go to solution
Jagadesh
Frequent Advisor

mount other disks or partitions to the / (root)directory

Is it possible to mount other disks or partitions to the / (root)directory?
5 REPLIES 5
Stuart Browne
Honored Contributor
Solution

Re: mount other disks or partitions to the / (root)directory

If you mean can you mount something to "/mountpoint/", then yes, easily.

If you mean to mount another filesystem as "/" whilst on a running system (ick!), then the answer isn't so simple.

If you've got no other subsiduary mounts (except your new root), you can toy with the 'pivot_root' command (beware, it's kinda dangerous to do on writable filesystems). This is what is used when you boot your system to swap the boot filesystem (or initrd) to be the physical root partition.

Can I ask why you would want to do this to a working, running system?
One long-haired git at your service...
Jagadesh
Frequent Advisor

Re: mount other disks or partitions to the / (root)directory

Thanks for the reply.

The linux server which we are currenlty using is not a production machine, as per the requirement we need to do some test cases like (mounting other partitions on root.. etc).

Regards
Jagadesh

Mark Grant
Honored Contributor

Re: mount other disks or partitions to the / (root)directory

Jagadesh,

There is no way you are going to be able to mount another filesystem over root on a running system, it just won't happen. However, as Stuart says, you can have plenty of filesystem mount within "/", like "/mymount" and "/another".
Never preceed any demonstration with anything more predictive than "watch this"
Claudio Cilloni
Honored Contributor

Re: mount other disks or partitions to the / (root)directory

LVM lets you to do this, but I don't know how to mount the / root filesystem on a LVM logical volume. Maybe it's possibile...

I heard that the latest SUSE distribution comes with LVM as default volume management, so (if it is true) the / filesystem should be contained in a volume group (like HP-UX systems) and extending it should (hopefully!) be easier.

Ciao
Claudio
Martin P.J. Zinser
Honored Contributor

Re: mount other disks or partitions to the / (root)directory

What should be possible is to install differnt
/ (root)s on various disks, keep common data on a separate disk and then switch between them at boot time using approriate bootmanager settings.