Understanding the Mounting of a Filesystem
- by Tom H.
I'm new to linux and want to check my understanding of how mounting/filesystems work. I read related manpages, but just want to be sure.
I have a partition say /dev/sda5 that is currently mounted to /home with various subdirs.
It is my understanding that this means /dev/sda5 has its own portable filesystem that can be moved anywhere in the main filesystem.
Questions:
If I unmount /dev/sda5 from /home (# umount /home) and then mount it to /var/www/ (which is empty) (# mount -t ext3 /dev/sda5 /var/www) and replace the fstab entry, with /dev/sda5 /var/www ext3 defaults,noatime,nodev 1 2 and # mount -a,
Q1) are all of the contents of /home
now accessible under /var/www/ (i.e.
/home/username -> /var/www/username)?
Q2) Are all of the permissions from
the /home filesystem kept intact in
this new location?
Anything else I should be concerned with? Just want to make sure I don't go wipe/corrupt anything. Coming from Windows the filesystem architecture takes getting used to (though I'm loving the flexibility!).