با سلام دوستان من نیاز دارم
/var
را از
/sdb3
به یک دیسک جدید
/sdb1
که روی
/mnt/var
مونت کرده ام منتقل بکنم. چطور اینکار را باید انجام بدهم.
دستور العمل زیر را دنبال کرده م ولی در مرحله ی 6 دستور
cp -ax * /mnt/var
اجرا نمیشود و پیغام میگیرم که var مشغول است.
1. First you need some unallocated space to create the partitions for each mountpoint (/var, /home, /tmp). Use Gparted for this.
2. Then you need to create the filesystems for those partitions (can be done with Gparted too) or use:
mkfs.ext4 /dev/sdaX
for example to create a new ext4 filesystem on the /dev/sdaX device (replace /dev/sdaX with your own device)
3. Mount the new filesystem under /mnt
mkdir /mnt/var
mount /dev/sdaX /mnt/var
4. Go to single-user mode so that there is no rw activity on the directory during the process
init 1
5. Enter your root password.
6. Backup data in var only (not the /var directory itself)
cd /var
cp -ax * /mnt/var
7. Rename the /var directory after your data has been transferred successfully.
cd /
mv var var.old
8. Make the new var directory
mkdir var
9. Unmount the new partition.
umount /dev/sdaX
10. Remount it as /var
mount /dev/sdaX /var
11. Edit /etc/fstab file to include the new partition, with /var being the mount point, so that it will be automatically mounted at boot.
/dev/sdaX /var ext4 defaults 0 0
12. Repeat steps 1-11 for /home and /tmp.
13. Finally return to multitasking mode.
init 5
ببخشید مرحله 7 دستور
cd /
mv var var.old
اجرا نمیشود و پیغام میگیرم که var مشغول است
من برای انتقال نمیخوام از
rsync -a /mnt/var_old/ /mnt/var/
برای اینکار استفاده بکنم راهکار چیست.
دوستان کسی میتونه کمک بکنه
ممنونم
/var
را از
/sdb3
به یک دیسک جدید
/sdb1
که روی
/mnt/var
مونت کرده ام منتقل بکنم. چطور اینکار را باید انجام بدهم.
دستور العمل زیر را دنبال کرده م ولی در مرحله ی 6 دستور
cp -ax * /mnt/var
اجرا نمیشود و پیغام میگیرم که var مشغول است.
1. First you need some unallocated space to create the partitions for each mountpoint (/var, /home, /tmp). Use Gparted for this.
2. Then you need to create the filesystems for those partitions (can be done with Gparted too) or use:
mkfs.ext4 /dev/sdaX
for example to create a new ext4 filesystem on the /dev/sdaX device (replace /dev/sdaX with your own device)
3. Mount the new filesystem under /mnt
mkdir /mnt/var
mount /dev/sdaX /mnt/var
4. Go to single-user mode so that there is no rw activity on the directory during the process
init 1
5. Enter your root password.
6. Backup data in var only (not the /var directory itself)
cd /var
cp -ax * /mnt/var
7. Rename the /var directory after your data has been transferred successfully.
cd /
mv var var.old
8. Make the new var directory
mkdir var
9. Unmount the new partition.
umount /dev/sdaX
10. Remount it as /var
mount /dev/sdaX /var
11. Edit /etc/fstab file to include the new partition, with /var being the mount point, so that it will be automatically mounted at boot.
/dev/sdaX /var ext4 defaults 0 0
12. Repeat steps 1-11 for /home and /tmp.
13. Finally return to multitasking mode.
init 5
ببخشید مرحله 7 دستور
cd /
mv var var.old
اجرا نمیشود و پیغام میگیرم که var مشغول است
من برای انتقال نمیخوام از
rsync -a /mnt/var_old/ /mnt/var/
برای اینکار استفاده بکنم راهکار چیست.
دوستان کسی میتونه کمک بکنه
ممنونم
کامنت