Bought a 6-pack of 4GB USB thumb drives for various backups. I installed them on liminf01, liminf03, and kfserver01. Used the following commands to format and mount them, since CentOS 5.10 did not automatically mount them. I originally went with the default FAT32 filesystems, but rsync filed to create symlinks, surprise!
$ ls -al /dev/sd* brw-r----- 1 root disk 8, 0 Apr 9 17:59 /dev/sda brw-r----- 1 root disk 8, 1 Apr 9 17:59 /dev/sda1 brw-r----- 1 root disk 8, 2 Apr 9 18:00 /dev/sda2 brw-r----- 1 root disk 8, 3 Apr 9 17:59 /dev/sda3 brw-r----- 1 root disk 8, 16 Apr 16 09:00 /dev/sdb
$ sudo /sbin/fdisk /dev/sdb
If prompted, switch off DOS-compatible mode and change units to sectors.
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): c DOS Compatibility flag is not set Command (m for help): u Changing display/entry units to sectors
Delete the existing partition.
Command (m for help): d Selected partition 1
Create the new partition, using the defaults to use the whole disk.
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First sector (2048-7821279, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-7821279, default 7821279): Using default value 7821279
List the partition table to confirm the changes.
Command (m for help): p Disk /dev/sdf1: 4004 MB, 4004495360 bytes 124 heads, 62 sectors/track, 1017 cylinders, total 7821280 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdf1p1 2048 7821279 3909616 83 Linux
Write (save) the new partition table.
Command (m for help): w The partition table has been altered!
I used ext3 because CentOS 5.10 did not support ext4. I also labeled the partition as “backup.”
$ mkfs.ext3 -L backup /dev/sdb1 mke2fs 1.41.12 (17-May-2010) Filesystem label=backup OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 244800 inodes, 977660 blocks 48883 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1002438656 30 block groups 32768 blocks per group, 32768 fragments per group 8160 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 24 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
On netmon01, the new partition was automatically mounted when I removed and inserted the drive. On liminf01, liminf03, and kfserver01 that was not the case.
I created the directory that I wanted it mounted on.
$ sudo mkdir /media/backup
Then I added the partition to /etc/fstab.
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0 /dev/sdb1 /media/backup ext3 defaults 1 3
Finally I mounted it.
$ sudo mount -a $ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 447G 9.2G 414G 3% / /dev/sda1 99M 38M 57M 40% /boot tmpfs 2.9G 0 2.9G 0% /dev/shm /dev/sdc1 3.7G 2.5G 1.1G 70% /media/backup