I currently have a single logical drive and would like to mount another drive to a single folder on a centos 7 system. The current disk configuration looks like this.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.3T 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 1.3T 0 part
├─centos-root 253:0 0 1.2T 0 lvm /
├─centos-swap 253:1 0 4G 0 lvm [SWAP]
└─centos-home 253:2 0 160G 0 lvm /home
sr0 11:0 1 1024M 0 rom
I want to mount an empty 2TB hard drive to /var/www/mysite.com/public_html/content where content is an empty subdirectory so that I can start serving content from that folder.
After reading here and here and this StackExchange thread I'm still a bit nervous that I will break something. It's not a mission critical commercial application, so it wouldn't be the end the world. Even still I may jump from a short ladder if it messes everything up too bad.
The filesystem type for root and home are xfs, which I think is something I'll need to specify in the mount command.
What is the correct commandline syntax for mounting the drive in the way described above? Aside from popping the drive in and typing a mount command, what else am I missing, like will the folder inherit the ownership and permissions of the parent directory?
/dev/sdb1
. The advantage of an LV is that it's easily extended later if you need more space on it. – cas Aug 13 '17 at 09:19/etc/fstab
that the system will use to automount the fs on every reboot. Try running it without the final pipe tosudo tee
to see what it will actually add to/etc/fstab
. – cas Aug 15 '17 at 01:31