Difference between revisions of "Mount and fsck"

From Biowikifarm Metawiki
Jump to: navigation, search
(Created page with "Some commands useful for mounting (mount), unmounting (umount) and file checking (fsck). 1. Permanent mounts in sudo nano /etc/fstab #after editing check with (else reboot...")
 
Line 12: Line 12:
 
  sudo fuser -km /mnt/storage; sudo umount mnt/storage; sudo fsck /dev/xvdb1
 
  sudo fuser -km /mnt/storage; sudo umount mnt/storage; sudo fsck /dev/xvdb1
 
  sudo fuser -km /mnt/dump; sudo umount mnt/dump; sudo fsck /dev/xvdc1
 
  sudo fuser -km /mnt/dump; sudo umount mnt/dump; sudo fsck /dev/xvdc1
 +
 +
4. Content of fstab as of 27.05.14
 +
<small>
 +
# /etc/fstab: static file system information.
 +
# Use 'blkid' to print the universally unique identifier for a
 +
# device; this may be used with UUID= as a more robust way to name devices
 +
# that works even if disks are added and removed. See fstab(5).
 +
#
 +
# added gh, 2014-05-25: OUTPUT OF: sudo ls -l /dev/disk/by-uuid
 +
# 3682291c-fcd1-46e5-aed8-3aa7c62be2fb -> ../../xvda1
 +
# 34b772ab-0277-49a3-bc56-9eae597ea0ec -> ../../xvdb1
 +
# 2ef1acf0-a437-4f83-bf75-ac8477a1df63 -> ../../xvdc1
 +
 +
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
 +
proc            /proc          proc    defaults        0      0
 +
# / was on /dev/xvda1 during installation
 +
UUID=3682291c-fcd1-46e5-aed8-3aa7c62be2fb /              ext3    barrier=0,errors=remount-ro 0      1
 +
## swap was on /dev/xvda5 during installation
 +
## UUID=e582e254-d32e-4ced-9d39-df5e5224b71c none swap sw  0 0
 +
/dev/xvdd      /media/cdrom0  udf,iso9660 user,noauto  0  0
 +
# OLD NON-UUID version:
 +
# /dev/xvdb1                              /mnt/storage ext4 barrier=0,rw,noatime,errors=remount-ro 0 0
 +
UUID=34b772ab-0277-49a3-bc56-9eae597ea0ec /mnt/storage ext4 barrier=0,rw,noatime,errors=remount-ro 0 0
 +
# OLD NON-UUID version:
 +
# /dev/xvdc1                              /mnt/dump ext4  barrier=0,rw,noatime,errors=remount-ro  0 0
 +
UUID=2ef1acf0-a437-4f83-bf75-ac8477a1df63 /mnt/dump ext4  barrier=0,rw,noatime,errors=remount-ro  0 0
 +
#
 +
##only for migration purposes
 +
##/dev/xvde1  /mnt/storage2  ext4 barrier=0,rw,noatime,errors=remount-ro 0 0
 +
##/dev/xvdf1  /mnt/dump2    ext3 barrier=0,rw,noatime,errors=remount-ro 0 0
 +
</small>

Revision as of 22:14, 27 May 2014

Some commands useful for mounting (mount), unmounting (umount) and file checking (fsck).

1. Permanent mounts in

sudo nano /etc/fstab
#after editing check with (else reboot may fail):
mount -fav # = fake/all in fstab/verbose

2. if root partition is corrupt, use:

shutdown -rF now

3. for other partitions use

sudo fuser -km /mnt/storage; sudo umount mnt/storage; sudo fsck /dev/xvdb1
sudo fuser -km /mnt/dump; sudo umount mnt/dump; sudo fsck /dev/xvdc1

4. Content of fstab as of 27.05.14

  1. /etc/fstab: static file system information.
  2. Use 'blkid' to print the universally unique identifier for a
  3. device; this may be used with UUID= as a more robust way to name devices
  4. that works even if disks are added and removed. See fstab(5).
  5. added gh, 2014-05-25: OUTPUT OF: sudo ls -l /dev/disk/by-uuid
  6. 3682291c-fcd1-46e5-aed8-3aa7c62be2fb -> ../../xvda1
  7. 34b772ab-0277-49a3-bc56-9eae597ea0ec -> ../../xvdb1
  8. 2ef1acf0-a437-4f83-bf75-ac8477a1df63 -> ../../xvdc1
  1. <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0

  1. / was on /dev/xvda1 during installation

UUID=3682291c-fcd1-46e5-aed8-3aa7c62be2fb / ext3 barrier=0,errors=remount-ro 0 1

    1. swap was on /dev/xvda5 during installation
    2. UUID=e582e254-d32e-4ced-9d39-df5e5224b71c none swap sw 0 0

/dev/xvdd /media/cdrom0 udf,iso9660 user,noauto 0 0

  1. OLD NON-UUID version:
  2. /dev/xvdb1 /mnt/storage ext4 barrier=0,rw,noatime,errors=remount-ro 0 0

UUID=34b772ab-0277-49a3-bc56-9eae597ea0ec /mnt/storage ext4 barrier=0,rw,noatime,errors=remount-ro 0 0

  1. OLD NON-UUID version:
  2. /dev/xvdc1 /mnt/dump ext4 barrier=0,rw,noatime,errors=remount-ro 0 0

UUID=2ef1acf0-a437-4f83-bf75-ac8477a1df63 /mnt/dump ext4 barrier=0,rw,noatime,errors=remount-ro 0 0

    1. only for migration purposes
    2. /dev/xvde1 /mnt/storage2 ext4 barrier=0,rw,noatime,errors=remount-ro 0 0
    3. /dev/xvdf1 /mnt/dump2 ext3 barrier=0,rw,noatime,errors=remount-ro 0 0