Skip to main content
Commonmark migration
Source Link

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,

    dd if=/dev/zero count=100 bs=1K of=foo ,

  • then mkfs -t ext3 foo,

    then mkfs -t ext3 foo,

  • then, as root, mount foo /mnt

    then, as root, mount foo /mnt

    unmount /mnt and delete foo when done.

unmount /mnt and delete foo when done.

as per request.

you have /dev/sda1 /dev/sda2

ls /mnt
#empty
mount /dev/sda1 /mnt/a
error mount point doesn't exist (1)
mkdir /mnt/a 
mount /dev/sda1 /mnt/a
ls /mnt
a
ls /mnt/a
# empty
mkdir /mnt/a/b
date > /mnt/a/b/foo.txt
mount /dev/sda2 /mnt/a/b
ls /mnt/a/b
# empty
umount /mnt/a
device busy (2) 
date > /mnt/a/b/bar.txt
ls /mnt/a/b
bar.txt
umount /mnt/a/b
ls /mnt/a/b
foo.txt
  • (1) you must mount on existing dir.
  • (2) /mnt/a can't be unmounted, because there is a mount point using it (/mnt/a/b )

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,
  • then mkfs -t ext3 foo,
  • then, as root, mount foo /mnt

unmount /mnt and delete foo when done.

as per request.

you have /dev/sda1 /dev/sda2

ls /mnt
#empty
mount /dev/sda1 /mnt/a
error mount point doesn't exist (1)
mkdir /mnt/a 
mount /dev/sda1 /mnt/a
ls /mnt
a
ls /mnt/a
# empty
mkdir /mnt/a/b
date > /mnt/a/b/foo.txt
mount /dev/sda2 /mnt/a/b
ls /mnt/a/b
# empty
umount /mnt/a
device busy (2) 
date > /mnt/a/b/bar.txt
ls /mnt/a/b
bar.txt
umount /mnt/a/b
ls /mnt/a/b
foo.txt
  • (1) you must mount on existing dir.
  • (2) /mnt/a can't be unmounted, because there is a mount point using it (/mnt/a/b )

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,

  • then mkfs -t ext3 foo,

  • then, as root, mount foo /mnt

    unmount /mnt and delete foo when done.

as per request.

you have /dev/sda1 /dev/sda2

ls /mnt
#empty
mount /dev/sda1 /mnt/a
error mount point doesn't exist (1)
mkdir /mnt/a 
mount /dev/sda1 /mnt/a
ls /mnt
a
ls /mnt/a
# empty
mkdir /mnt/a/b
date > /mnt/a/b/foo.txt
mount /dev/sda2 /mnt/a/b
ls /mnt/a/b
# empty
umount /mnt/a
device busy (2) 
date > /mnt/a/b/bar.txt
ls /mnt/a/b
bar.txt
umount /mnt/a/b
ls /mnt/a/b
foo.txt
  • (1) you must mount on existing dir.
  • (2) /mnt/a can't be unmounted, because there is a mount point using it (/mnt/a/b )
added 633 characters in body
Source Link
Archemar
  • 32.3k
  • 18
  • 75
  • 107

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,
  • then mkfs -t ext3 foo,
  • then, as root, mount foo /mnt

unmount /mnt and delete foo when done.

as per request.

you have /dev/sda1 /dev/sda2

ls /mnt
#empty
mount /dev/sda1 /mnt/a
error mount point doesn't exist (1)
mkdir /mnt/a 
mount /dev/sda1 /mnt/a
ls /mnt
a
ls /mnt/a
# empty
mkdir /mnt/a/b
date > /mnt/a/b/foo.txt
mount /dev/sda2 /mnt/a/b
ls /mnt/a/b
# empty
umount /mnt/a
device busy (2) 
date > /mnt/a/b/bar.txt
ls /mnt/a/b
bar.txt
umount /mnt/a/b
ls /mnt/a/b
foo.txt
  • (1) you must mount on existing dir.
  • (2) /mnt/a can't be unmounted, because there is a mount point using it (/mnt/a/b )

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,
  • then mkfs -t ext3 foo,
  • then, as root, mount foo /mnt

unmount /mnt and delete foo when done.

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,
  • then mkfs -t ext3 foo,
  • then, as root, mount foo /mnt

unmount /mnt and delete foo when done.

as per request.

you have /dev/sda1 /dev/sda2

ls /mnt
#empty
mount /dev/sda1 /mnt/a
error mount point doesn't exist (1)
mkdir /mnt/a 
mount /dev/sda1 /mnt/a
ls /mnt
a
ls /mnt/a
# empty
mkdir /mnt/a/b
date > /mnt/a/b/foo.txt
mount /dev/sda2 /mnt/a/b
ls /mnt/a/b
# empty
umount /mnt/a
device busy (2) 
date > /mnt/a/b/bar.txt
ls /mnt/a/b
bar.txt
umount /mnt/a/b
ls /mnt/a/b
foo.txt
  • (1) you must mount on existing dir.
  • (2) /mnt/a can't be unmounted, because there is a mount point using it (/mnt/a/b )
Source Link
Archemar
  • 32.3k
  • 18
  • 75
  • 107

This is very broad

  1. local partition are mounted as a whole. You cannont mount it partially.
  2. you can (and usually do a lot) mount partition over other partition. exisiting data is "hidden" (e.g. file foo.txt in /mnt/a/b/foo.txt is hidden when you mount "b" on /mnt/a/b )
  3. yes you can, it it advised to mount local over local, distant on distant or local, but you can mount local ext3 over an nfs over an ext3 over ...
  4. it depends on your need.
  5. mount point dissapear at boot unless writen in /etc/fstab.

You can create temporary device and mount point using

  • dd if=/dev/zero count=100 bs=1K of=foo ,
  • then mkfs -t ext3 foo,
  • then, as root, mount foo /mnt

unmount /mnt and delete foo when done.